Friday, July 21, 2023

Void Linux, Elogind, Pcmanfm Trash and Mounted Dirives in Sidebar, and Ignore Laptop Lid Closed

Please do your own research, following some strangers advice on the internet can end up with a broken computer.

With that said here's my two cents worth.

Elogind manages user logins and system power, as a standalone version of systemd-logind. elogind provides necessary features for most desktop environments and Wayland compositors.  This comes from the Void Linux "Session and Seat Management" section from the Void documentation website.

Elogind and Pcmanfm

Normally on a systemd Linux likeArch or Debian I would just install udiskie, gvfs, and ntfs-3g and call it good.  This would auto-magically have the trash folder show up in the sidebar.  I then would have udiskie -ta & in my autostart.sh program and this would take care of having mounted disk drives like thumbdrives show up in the sidebar.  Void is a little different.  I do the above but I need to do a little more. I installed elogind and enabled the service creating a symlink from the /etc/sv/elogind to the /var/service/elogind (sudo ln -s /etc/sv/elogind /var/service/).  You might have to start the service by running sudo sv up elogind.  If you are using window manager like dwm or bspwm and using a login manager like sddm or lightdm which uses /usr/share/xsession/bspwm you would simply change the line exec=bspwm to exec=dbus-run-session bspwm.  Using startx you would make the same change.

Elogind and Ignoring a Closed Laptop Lid

Again, normally on a systemd Linux install you would go to /etc/systemd/logind.conf and edit a line to HandleLidSwitch=ignore.  On Void using elogind you do the same but it would be editing /etc/elogind/logind.conf.  Just edit the line to HandleLidSwitch=ignore.

The Void part of this comes from The Void Linux man page for logind.conf.


Getting Synaptic Touchpad Working in Linux

Take these directions at your own risk.

Sometimes setting up a laptop on a "window manager (wm) only" Linux fresh install with no Desktop Environment (de) installed can be fun sometimes.  Things that we take for granted, let's say touchpads on our laptops can be hard to set up.  As the title says, let's get our touchpad working.

Like a good Linux user we go to the Arch Wiki, so let's steer our browsers over to the Touchpad Synaptics page to get things working.  This worked on both my arc install using my Lenovo IdeaPad Flex 5 14ALC7 and also my Lenovo Thinkpad T520.

Using the xinput --list I get the following output:

[larry@void ~]$ xinput --list
⎡ Virtual core pointer                                    id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                   id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              id=12    [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                       id=13    [slave  pointer  (2)]
⎣ Virtual core keyboard                                 id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                id=5    [slave  keyboard (3)]
    ↳ Power Button                                      id=6    [slave  keyboard (3)]
    ↳ Video Bus                                           id=7    [slave  keyboard (3)]
    ↳ Sleep Button                                       id=8    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=11    [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                       id=14    [slave  keyboard (3)]

This identifies your touchpad among other devices on your laptop.  If you don't see your touchpad then you probably have other problems that I haven't had to deal with.  

Another tool that might help is use this to view all your input devices.  You will get a long list, too long for me to post.  The cat command simply prints out the contents of a file.

cat /proc/bus/input/devices

Here's the output of the above file that shows the information on the touchpad.

I: Bus=0011 Vendor=0002 Product=0007 Version=01b1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input24
U: Uniq=
H: Handlers=mouse1 event17
B: PROP=9
B: EV=b
B: KEY=6420 30000 0 0 0 0
B: ABS=260800011000003

Following the Arch Wiki page in section 2.1I created the file
/etc/X11/xorg.conf.d/70-synaptics.conf and pasted the following:

Section "InputClass"
    Identifier "touchpad"
    Driver "synaptics"
    MatchIsTouchpad "on"
        Option "TapButton1" "1"
        Option "TapButton2" "3"
        Option "TapButton3" "2"
        Option "VertEdgeScroll" "on"
        Option "VertTwoFingerScroll" "on"
        Option "HorizEdgeScroll" "on"
        Option "HorizTwoFingerScroll" "on"
        Option "CircularScrolling" "on"
        Option "CircScrollTrigger" "2"
        Option "EmulateTwoFingerMinZ" "40"
        Option "EmulateTwoFingerMinW" "8"
        Option "CoastingSpeed" "0"
        Option "FingerLow" "30"
        Option "FingerHigh" "50"
        Option "MaxTapTime" "125"
EndSection

Make sure you remove the . . . from what is listed on the page.  It's just above the "EndSection"

On my IdeaPad I had to remove more lines to get the speed correct.

A word of caution.  Typos or unknown commands can cause boot problems.  If you have a problem drop into a tty (ctrl + alt + F2) and remove the file and try again after you reboot.

I am just a hobbyist and this is mostly for future me in, well the future.