Hi @paragonnov! Great stuff. Thank you very much for developing this.
I have a little problem with the sleep-power-control.service
. It does not start as intended:
$ sudo systemctl status sleep-power-control.service
× sleep-power-control.service - Sleep Power Control Based on Display and Sleep State
Loaded: loaded (/etc/systemd/system/sleep-power-control.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sun 2025-06-29 22:09:12 BST; 12h ago
Duration: 467ms
Process: 871 ExecStart=/usr/local/bin/sleep_power_control (code=exited, status=1/FAILURE)
Main PID: 871 (code=exited, status=1/FAILURE)
CPU: 465ms
Jun 29 22:09:12 clockworkpi systemd[1]: sleep-power-control.service: Scheduled restart job, restart counter is at 5.
Jun 29 22:09:12 clockworkpi systemd[1]: Stopped sleep-power-control.service - Sleep Power Control Based on Display and Sleep State.
Jun 29 22:09:12 clockworkpi systemd[1]: sleep-power-control.service: Start request repeated too quickly.
Jun 29 22:09:12 clockworkpi systemd[1]: sleep-power-control.service: Failed with result 'exit-code'.
Jun 29 22:09:12 clockworkpi systemd[1]: Failed to start sleep-power-control.service - Sleep Power Control Based on Display and Sleep State.
From what I see it cannot find a USB device:
$ sudo /usr/local/bin/sleep_power_control
Traceback (most recent call last):
File "sleep_power_control.py", line 62, in <module>
Exception: there's no matched kb
[PYI-15095:ERROR] Failed to execute script 'sleep_power_control' due to unhandled exception!
In the source code I find out you are looking for these ids=["feed:0000", "1eaf:0003"]
. But non of these is present in my system:
$ lsusb
Bus 001 Device 004: ID 1eaf:0024 Leaflabs uConsole
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I am running bookworm as provided by @Rex. Ref: Bookworm 6.6.y for the uConsole and DevTerm
I guess 1eaf:0024
looks kind of similar to what you are looking for. Do you think I can just add it to the list and recompile the package or the problem may be more complex than that?
Thanks!