|
| 1 | +# Framework 13 AMD Fingerprint Wake Workaround |
| 2 | + |
| 3 | +Automatic workaround for Framework 13 AMD fingerprint reader not working after suspend/resume. |
| 4 | + |
| 5 | +## Problem |
| 6 | + |
| 7 | +On Framework 13 AMD laptops, the Goodix fingerprint reader sometimes fails to reconnect after waking from suspend. This requires a manual reboot to restore functionality. |
| 8 | + |
| 9 | +**Tracking Issue**: https://github.com/FrameworkComputer/SoftwareFirmwareIssueTracker/issues/102 |
| 10 | + |
| 11 | +## Solution |
| 12 | + |
| 13 | +This script automatically detects your fingerprint reader hardware and creates a systemd service that: |
| 14 | +- Monitors for the fingerprint reader after each wake |
| 15 | +- Automatically resets the USB controller if the reader is missing |
| 16 | +- Restarts the fprintd service to restore functionality |
| 17 | +- Logs all actions for debugging |
| 18 | + |
| 19 | +**No hardcoded values** - works across different Framework 13 AMD configurations and fingerprint reader variants (Goodix, Synaptics, ELAN). |
| 20 | + |
| 21 | +## Supported Hardware |
| 22 | + |
| 23 | +- **Laptop**: Framework 13 AMD (tested on AI 300) |
| 24 | +- **Fingerprint Reader**: Goodix |
| 25 | +- **Distributions**: Any Linux distribution with systemd |
| 26 | + |
| 27 | +## Installation |
| 28 | + |
| 29 | +One-line install: |
| 30 | + |
| 31 | + curl -sSL https://raw.githubusercontent.com/FrameworkComputer/linux-docs/refs/heads/main/Fingerprint-Wake-Workaround/install-fingerprint-wake.sh | bash |
| 32 | + |
| 33 | +The installer will auto-detect your hardware and show you exactly what was found. |
| 34 | + |
| 35 | +## Testing |
| 36 | + |
| 37 | +After installation, test the workaround: |
| 38 | + |
| 39 | + journalctl -t fp-rebind -f |
| 40 | + |
| 41 | +Then suspend your system and resume. Check if fingerprint reader works and view the logs. |
| 42 | + |
| 43 | +## Uninstallation |
| 44 | + |
| 45 | +One-line uninstall: |
| 46 | + |
| 47 | + curl -sSL https://raw.githubusercontent.com/FrameworkComputer/linux-docs/refs/heads/main/Fingerprint-Wake-Workaround/uninstall-fingerprint-wake.sh | bash |
| 48 | + |
| 49 | +## How It Works |
| 50 | + |
| 51 | +1. **Detection Phase**: Scans USB devices to find your fingerprint reader |
| 52 | +2. **Path Resolution**: Follows sysfs symlinks to find the PCI controller |
| 53 | +3. **Driver Detection**: Identifies which driver (xhci_hcd/xhci-pci) is in use |
| 54 | +4. **Service Creation**: Generates a systemd service with detected values |
| 55 | +5. **Wake Monitoring**: After each suspend/resume, checks if reader is present |
| 56 | +6. **Automatic Recovery**: If missing, unbinds and rebinds the USB controller |
| 57 | + |
| 58 | +## Files Created |
| 59 | + |
| 60 | +- `/etc/local/bin/run-after-wake-for-fprint.sh` - Wake monitoring script |
| 61 | +- `/etc/systemd/system/run-after-wake-for-fprint.service` - Systemd service unit |
| 62 | + |
| 63 | +## Troubleshooting |
| 64 | + |
| 65 | +View service logs: |
| 66 | + |
| 67 | + journalctl -t fp-rebind --since "24 hours ago" |
| 68 | + |
| 69 | +Check service status: |
| 70 | + |
| 71 | + systemctl status run-after-wake-for-fprint.service |
| 72 | + |
| 73 | +Test the script manually: |
| 74 | + |
| 75 | + sudo systemctl start run-after-wake-for-fprint.service |
| 76 | + |
| 77 | +## Contributing |
| 78 | + |
| 79 | +Issues and pull requests welcome! Please test on your Framework 13 AMD before submitting. |
| 80 | + |
| 81 | +## License |
| 82 | + |
| 83 | +MIT License - feel free to use and modify. |
| 84 | + |
| 85 | +## Credits |
| 86 | + |
| 87 | +Inspired by kariudo's original implementation: https://github.com/kariudo/framework-13-fingerprint-fix |
| 88 | + |
| 89 | +This version improves upon the original by: |
| 90 | +- Auto-detecting all hardware values instead of hardcoding |
| 91 | +- Supporting multiple fingerprint reader variants |
| 92 | +- Working across different PCI configurations |
| 93 | +- Providing detailed diagnostic output during installation |
0 commit comments