https://github.com/dleidert/btn-touch-mod
Linux kernel module to unblank GNOME screensaver on BTN_TOUCH events
https://github.com/dleidert/btn-touch-mod
Last synced: 3 months ago
JSON representation
Linux kernel module to unblank GNOME screensaver on BTN_TOUCH events
- Host: GitHub
- URL: https://github.com/dleidert/btn-touch-mod
- Owner: dleidert
- Created: 2022-06-12T13:18:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-31T17:35:57.000Z (over 2 years ago)
- Last Synced: 2025-01-12T01:15:00.955Z (4 months ago)
- Language: C
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# btn-touch-mod module
This module is supposed to run a helper script `unblank-screen` whenever a
`BTN_TOUCH` key event appears. The helper script runs a dbus command to turn
off the GNOME screensaver.## Installation
The module is provided as an out-of-tree kernel module installable as Debian
dkms package. Just run```
apt-get install ./btn-touch-dkms_0.0.1_amd64.deb
```## Testing
This is how one can test (requires the `evemu-tools` package):
```
$ gdbus call --session --dest=org.gnome.ScreenSaver --object-path=/org/gnome/ScreenSaver --method=org.gnome.ScreenSaver.GetActive
(true,)
$ sudo evemu-event /dev/input/by-id/usb-Weida_Hi-Tech_CoolTouch_System-event-if00 --type EV_KEY --code 330 --value 1 --sync
$ sudo evemu-event /dev/input/by-id/usb-Weida_Hi-Tech_CoolTouch_System-event-if00 --type EV_KEY --code 330 --value 0 --sync
$ gdbus call --session --dest=org.gnome.ScreenSaver --object-path=/org/gnome/ScreenSaver --method=org.gnome.ScreenSaver.GetActive
(false,)
```And this should appear in the `syslog` then:
```
panel1 kernel: [ 740.395478] btn_touch_mod: BTN_TOUCH requesting unblanking screen.
panel1 kernel: [ 740.395486] btn_touch_mod: BTN_TOUCH unblanking screen successful.
```## Limitations
The program is hardcoded to set the UID to 1000 and one might need to adjust
`btn_touch_ids` to register for the correct device.If anybody has some suggestions how to improve it, please feel free to send me
your comments.