fix: prevent powertop autosuspend on touchpad for idle detection

Merged
SH
7mo ago
+4-3

Summary

  • Adds udev rule to keep touchpad power control as on, preventing powertop --auto-tune from enabling autosuspend on the PIXA3854 touchpad
  • Fixes hypridle not detecting mouse/touchpad input on battery, causing false idle triggers (screen dim, lock, suspend) even during active use

Root cause

powertop --auto-tune sets touchpad power/control to auto, which allows the kernel to suspend the touchpad after brief inactivity on battery. When suspended, touchpad events don't reach Hyprland, so hypridle thinks the system is idle.

Test plan

  • Rebuild and switch on matic
  • Verify cat /sys/bus/i2c/devices/i2c-PIXA3854:00/power/control shows on after reboot
  • Confirm screen doesn't dim/lock while actively using touchpad on battery

Summary by cubic

Prevents touchpad autosuspend so idle detection works on battery and stops false screen dim/lock. Also ignores lid-close events so hypridle manages suspend consistently.

  • Bug Fixes
    • Add udev rule to keep PIXA3854 touchpad power/control set to on, overriding powertop --auto-tune and restoring input events to hypridle.
    • Set logind HandleLidSwitch to ignore on battery and AC, relying on hypridle timers for suspend.