You are not logged in.
Hi,
I have an Intel NUC running Kodi in Arch. It is connected to a projector via HDMI. CEC/HDMI Link can become handy. I want the projector to switch on when I power on the NUC, or the NUC to power on when I start the projector. I also want the projector to power off when I shut down KODI. This all is working fine. However, sometimes I play audio only, either after stopping watching a some video content. (Sometimes I keep the projector hard powered off from the socket, so it can not respond to CEC requests, but I can start the NUC only for audio playback; I have a software controllable power socket!).
However, the (small, QOL I admit) problem: I do not want the NUC to power off when I power off the projector.
One solution could be the projector CEC settings, but there is no applicable setting for this; the power-on link can be bidirectional (which is exactly what I need), however power off is only off/on, there is no directional setting. I can not set that setting off since then the projector would always stay on (despite shutting down the NUC).
I've tried to disable Power and Suspend keys as per wiki. I have in /etc/systemd/logind.conf:
[Login]
HandleSuspendKey=ignore
HandleHibernateKey=ignoreHowever, seems like systemd is ignoring these settings. When I power off the projector via it's remote, the KODI box still suspends or powers off. I get this in journal when powering off the projector:
heinä 11 13:36:23 archnuke systemd-logind[303]: Suspend key pressed short.
heinä 11 13:36:23 archnuke systemd-logind[303]: Suspending...
heinä 11 13:36:23 archnuke systemd-logind[303]: Suspend key pressed short.
heinä 11 13:36:24 archnuke systemd[1]: Reached target Sleep.
heinä 11 13:36:24 archnuke systemd[1]: Starting System Suspend...
heinä 11 13:36:24 archnuke systemd-sleep[661]: Entering sleep state 'suspend'...
heinä 11 13:36:24 archnuke kernel: PM: suspend entry (deep)
heinä 11 13:36:24 archnuke kernel: Filesystems sync: 0.006 secondsWhich is not what I'd expect given the configuration I've set. The key type reported in journal will change according to what I've set in BIOS for CEC function, as will the result - but it seems I can not disable it via logind.conf.
Is there something I've missed? Some other configuration to prevent handling these keys (hibernate,poweroff)?
FWIW there are several power buttons or sleep buttons as reported by evtest, some which correspond to the physical buttons on the NUC and some seem to be reserved to the CEC events only.
Last edited by Wild Penguin (2022-07-11 11:13:05)
Offline
Ok, I think I've solved this!
I double checked stuff, and it occurred to me that systemd (or whatever is parsing the configuration file) might not like comments after options. I did have a comment there (a personal note relating to the events/BIOS handling). Like this:
HandleSuspendKey=ignore # BIOS setting affect what kind of key the system (Kernel) sees...Some configuration files (IMHO correctly) ignore comments on the same line after a non-comment section preceding it. Some fail parsing those lines and seem to panic.
Removing the comment - and systemd now doesn't suspend anymore (despite receiving the keypress events)!
Last edited by Wild Penguin (2022-07-21 08:39:21)
Offline