Explain 444 perms, fix wording
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Anthony Wang 2024-03-21 19:21:22 -04:00
parent c7eef030e2
commit 187d538193
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ

View file

@ -56,12 +56,12 @@ It turns out the 30 second timeout is [hardcoded in the source code](https://git
Maybe there's a better way to solve this. If you know of a better solution, please let me know! It's definitely a bit upsetting that I need to mess with PAM config files, udev rules, systemd override files, and recompile fprintd to get my fingerprint reader to work properly, but I guess that's the struggle of Linux sometimes. I wish Lenovo could provide better support for Linux on my laptop model, since they do sell a preinstalled Ubuntu version of that model.
Edit: I did find a slightly better solution. Linux has an obscure feature called [USB persist](https://www.kernel.org/doc/html/latest/driver-api/usb/persist.html) that reuses the data structures for a USB device instead of rebuilding it after a suspend. I tried enabling this for my fingerprint reader and it works! Now my reader doesn't even need to be initialized during the wake-up process. To enable persist, I changed the udev rule to this:
Edit: I found a slightly better solution. Linux has an obscure feature called [USB persist](https://www.kernel.org/doc/html/latest/driver-api/usb/persist.html) that reuses the data structures for a USB device instead of rebuilding it after a suspend. I tried enabling this for my fingerprint reader and it works! Now my reader doesn't even need to be initialized during the wake-up process, which avoids the problem from earlier. To enable persist, I changed the udev rule to this:
```
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="06cb", ATTRS{idProduct}=="00fc", ATTR{power/persist}="1", RUN="/usr/bin/chmod 444 %S%p/../power/persist"
```
Now I don't even need the systemd override anymore, but I still need to recompile fprintd which is annoying.
I noticed that this kept on getting disabled for some reason after each wake-up, so I changed the file to have permissions 444 to stop that. With this solution, I no longer need the systemd override anymore, but still need to recompile fprintd which is annoying.
Oh, and if you managed to reach the end of this post and understood everything, congratulations, you deserve a bowl of [Biángbiáng noodles](https://functional.cafe/@loke/112120713973565564)!