A lightweight, always-on systemd daemon for Framework 13 laptops. Every 15 seconds, it checks whether your lid is open or closed and if any external displays are connected. When docked with the lid closed, it automatically disables fingerprint authentication (fprintd) and falls back to password login; when you open the lid, it re-enables fingerprint authentication.
On Framework 13 machines under Fedora, the system often asks for a fingerprint when the lid is closed and docked, but the scanner is not accessible with the lid down. In GNOME, there’s no built-in fallback, so users must reopen the lid or cancel commands. This daemon solves that by toggling fprintd off when closed and docked (forcing a password prompt) and turning it back on when the lid opens.
This daemon avoids using the legacy ACPI daemon (acpid) because on Fedora, systemd-logind intercepts lid events directly, preventing acpid from firing scripts. We are not using inotify on /proc/acpi/button/lid/LID0/state because that file does not emit filesystem change events under the virtual /proc filesystem. Instead, we use a simple, polling-based systemd daemon that checks lid state and display connections every 15 seconds, ensuring consistent behavior across suspends and hardware configurations.
- Place the source and spec in your RPM build tree:
mkdir -p ~/rpmbuild/{SPECS,SOURCES} cp fw-lid-fprint-daemon-1.0.tar.gz ~/rpmbuild/SOURCES/ cp fw-lid-fprint-daemon.spec ~/rpmbuild/SPECS/
- Build the package:
rpmbuild -ba ~/rpmbuild/SPECS/fw-lid-fprint-daemon.spec - Install the resulting RPM:
sudo dnf install ~/rpmbuild/RPMS/noarch/fw-lid-fprint-daemon-1.0-1.noarch.rpm
- Copy
laptop-lid-daemon.shto/usr/local/bin/and make it executable:sudo install -m 755 laptop-lid-daemon.sh /usr/local/bin/
- Copy
laptop-lid-daemon.serviceto/etc/systemd/system/:sudo install -m 644 laptop-lid-daemon.service /etc/systemd/system/
- Reload and start the daemon:
sudo systemctl daemon-reload sudo systemctl enable --now laptop-lid-daemon.service
Once installed, the daemon runs continuously. It logs only when the lid or docking state changes:
journalctl -f -t lid-daemon- Closed & docked: “LID CLOSED + DOCKED → mask & stop fprintd”
- Closed & undocked: “LID CLOSED + UNDOCKED → leave fprintd alone”
- Open: “LID OPEN → unmask & start fprintd”
To check the service status:
systemctl status laptop-lid-daemon.service- Poll Interval: Modify the
sleep 15line in/usr/local/bin/laptop-lid-daemon.shfor faster or slower checks. - Connector Paths: By default, the script inspects
/sys/class/drm/*-DP-*/statusand/sys/class/drm/*-HDMI-A-*/status. Update these patterns if your setup uses different interfaces.
- Clone the repository:
git clone https://github.com/andypiper/fw-lid-fprint-daemon.git cd fw-lid-fprint-daemon - Build and install the RPM for testing:
rpmbuild -ba fw-lid-fprint-daemon.spec sudo dnf install ~/rpmbuild/RPMS/noarch/fw-lid-fprint-daemon-1.0-1.noarch.rpm journalctl -f -t lid-daemon
Contributions and bug reports are welcome:
- Fork the repo and create a feature branch.
- Commit your changes with clear messages.
- Submit a pull request for review.
Please open an issue first for major features or breaking changes.
This project is MIT licensed. See LICENSE for details.
Author: Andy Piper
GitHub: @andypiper
Email: [email protected]