Name: thinkpad-l15g2a-suspend-fix Version: 1.0 Release: 4%{?dist} Summary: Suspend-related quirk fixes for ThinkPad L15 Gen2 AMD (fprintd + CapsLock LED) License: MIT URL: https://example.invalid/thinkpad-l15g2a-suspend-fix BuildArch: noarch Source0: fprintd-sleep-hook.sh Source1: capslock-led-fix.sh Source2: 90-fingerprint-power.rules Requires: systemd-udev Requires: fprintd %description Two independent fixes for suspend/resume quirks observed on a ThinkPad L15 Gen2 AMD (Ryzen 5000U / Cezanne): * A systemd-sleep hook that stops fprintd.service before suspend and lets it restart cleanly via D-Bus activation on resume, avoiding a corrupted fprintd state caused by the fingerprint reader being mid-operation when the system suspends. * A udev rule that permanently disables USB autosuspend for the Synaptics Prometheus fingerprint reader (06cb:00bd), overriding the distro default autosuspend policy (/usr/lib/udev/rules.d/60-autosuspend.rules) which would otherwise re-enable it on every device (re)enumeration. * A systemd-sleep hook that resyncs the CapsLock indicator LED to its pre-suspend logical state on resume, working around keyboard controllers/EC firmware that can leave the physical LED out of sync with the actual CapsLock state after a suspend/resume cycle. All fixes are inert on hardware that doesn't match (the udev rule is scoped to idVendor/idProduct 06cb:00bd; the CapsLock hook is a no-op if no matching /sys/class/leds/*capslock*/brightness exists). On Fedora Atomic (Silverblue/Kinoite/etc, where /usr is immutable), install with: rpm-ostree install thinkpad-l15g2a-suspend-fix systemctl reboot On classic Fedora (Workstation/Server), a plain package install applies immediately, no reboot needed: sudo dnf install thinkpad-l15g2a-suspend-fix Verify after install (and, on Atomic, after the reboot): cat /sys/bus/usb/devices/*/idVendor # find the 06cb device cat /sys/bus/usb/devices//power/control # should read "on" journalctl -t capslock-led-fix # populated after the next resume Known limitation: the CapsLock LED hook does not fix every stuck-LED case. On some resumes the physical LED lights up while the kernel's own LED state (/sys/class/leds/*capslock*/brightness) reads 0 throughout -- the EC is driving the LED through a path that never touches the OS. This has been confirmed by testing both a direct LED write and a full atkbd driver reconnect (writing "atkbd" to /sys/bus/serio/devices/serio0/drvctl); neither affected the stuck LED, while a real physical CapsLock keypress reliably did. This is a known class of Lenovo EC firmware quirk, not specific to this model or a defective keyboard unit -- similar EC state-restoration bugs after resume have been reported on other Lenovo laptops. No software fix is possible for this variant; pressing CapsLock twice is the only known remedy. The hook still fixes the other, genuinely kernel-visible desync case, it's just not a complete guarantee. %prep # nothing to unpack, sources are used as-is %build # nothing to build %install install -D -m 0755 %{SOURCE0} %{buildroot}%{_prefix}/lib/systemd/system-sleep/fprintd.sh install -D -m 0755 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-sleep/capslock-led-fix.sh install -D -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/udev/rules.d/90-fingerprint-power.rules %files %{_prefix}/lib/systemd/system-sleep/fprintd.sh %{_prefix}/lib/systemd/system-sleep/capslock-led-fix.sh %{_prefix}/lib/udev/rules.d/90-fingerprint-power.rules %post if [ -x /usr/bin/udevadm ] && [ -d /run/udev ]; then udevadm control --reload-rules || : udevadm trigger --action=add --subsystem-match=usb || : fi %postun if [ -x /usr/bin/udevadm ] && [ -d /run/udev ]; then udevadm control --reload-rules || : fi %changelog * Wed Sep 09 2026 anifyuliansyah - 1.0-4 - Document known limitation: the CapsLock LED hook cannot fix EC-driven stuck-LED cases that never surface in kernel LED state (confirmed via direct LED write and full atkbd reconnect, both ineffective; only a real keypress clears it). * Wed Sep 09 2026 anifyuliansyah - 1.0-3 - Translate %%description to English and fix maintainer identity in changelog entries. * Wed Sep 09 2026 anifyuliansyah - 1.0-2 - Add install/verify instructions to %%description for easier adoption (dnf classic path, rpm-ostree/Atomic path, verification commands). * Wed Sep 09 2026 anifyuliansyah - 1.0-1 - Initial package: fprintd suspend hook, fingerprint reader autosuspend udev rule, and CapsLock LED resume resync hook.