Page 1 of 1
[SOLVED] button events handling error

Posted:
Aug 26th, '24, 09:35
by nexus
After last update stop work option "Power Management"->"Energy Saving"->Button events handling"->"When power button pressed".
Always run "Shut down" even if "Sleep" option is selected or "Turn off screen" (maybe others too). Someone know what heppend or how fix this?
Re: button events handling error

Posted:
Aug 26th, '24, 18:49
by doktor5000
Hi there, some more information would be appreciated.
This is with Mageia 9 and plasma/KDE ? Also, did you reboot or at least logout/login after the last update ?
Re: button events handling error

Posted:
Aug 26th, '24, 23:57
by nexus
Mga9/plasma/kde on dell latitude 5530. Of course computer was turned off/restarted.
Previously, when you pressed the power key, a message appeared with a choice of various options: sleeping, rebooting etc. After several updates on Sunday, regardless of the selected option, when i press the power key, computer turns off. I dont know what happened. Have others experienced a similar problem?
Temporarily i assign another key to enter in sleep mode.
Re: button events handling error

Posted:
Aug 27th, '24, 17:12
by doktor5000
Well relevant recent updates were only for systemd & kernel.
For systemd there might have been some changes regarding the inhibitors, see e.g.
https://www.freedesktop.org/software/sy ... hibit.htmlAlso post the output of
- Code: Select all
systemd-inhibit --list
For plasma powerdevil should inhibit the power button:
- Code: Select all
WHO UID USER PID COMM WHAT WHY >
ModemManager 0 root 14981 ModemManager sleep ModemManager needs to reset devices >
NetworkManager 0 root 14922 NetworkManager sleep NetworkManager needs to turn off networks >
UPower 0 root 14878 upowerd sleep Pause device polling >
PowerDevil 1000 doktor5000 16153 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events >
You may also want to check /etc/systemd/logind.conf as the default is HandlePowerKey=poweroff
Re: button events handling error

Posted:
Aug 28th, '24, 00:46
by nexus
After run command
- Code: Select all
systemd-inhibit --list
i not see PowerDevil
- Code: Select all
WHO UID USER PID COMM WHAT WHY MODE
ModemManager 0 root 1176 ModemManager sleep ModemManager needs to reset devices delay
UPower 0 root 1056 upowerd sleep Pause device polling delay
Screen Locker 1000 jm 2928 ksmserver sleep Ensuring that the screen gets locked before going to sleep delay
3 inhibitors listed.
Maybe this is the reason why the plasma applet "Button events handling" doesnt work.
You may also want to check /etc/systemd/logind.conf as the default is HandlePowerKey=poweroff
This option is mark as comment by default. If I activate it, the suspend function assignment actually works. But this is not the best solution.
Re: button events handling error

Posted:
Aug 28th, '24, 15:59
by doktor5000
Please post the output as root of
- Code: Select all
journalctl -ab | grep -i powerdevil
Re: button events handling error

Posted:
Aug 28th, '24, 17:14
by nexus
after run
- Code: Select all
journalctl -ab | grep -i powerdevil
i see many positions with "failed" word
- Code: Select all
sie 27 17:55:13 localhost systemd[2486]: Starting plasma-powerdevil.service...
sie 27 17:55:13 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
sie 27 17:55:13 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 27 17:55:13 localhost systemd[2486]: Started plasma-powerdevil.service.
sie 27 17:55:13 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: Handle button events action could not check for screen configuration
sie 27 17:55:13 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
sie 27 18:02:47 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
sie 27 23:38:58 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 28 10:41:53 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 28 13:57:38 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 28 16:07:05 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 28 16:29:21 localhost org_kde_powerdevil[2998]: org.kde.powerdevil: failed to inhibit systemd powersave handling
Re: button events handling error

Posted:
Aug 28th, '24, 17:59
by doktor5000
Please undo any changes to /etc/systemd/logind.conf and then reboot, and post the same output again.
Also, what display manager do you use, sddm ?
And if the problem still persists, what happens if you boot one of the older kernels, still the same issue ?
Re: button events handling error

Posted:
Aug 29th, '24, 12:12
by nexus
original and current file /etc/systemd/logind.conf looks like this
- Code: Select all
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the logind.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/logind.conf' to display the full config.
#
# See logind.conf(5) for details.
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#UserStopDelaySec=10
#HandlePowerKey=poweroff
#HandlePowerKeyLongPress=ignore
#HandleRebootKey=reboot
#HandleRebootKeyLongPress=poweroff
#HandleSuspendKey=suspend
#HandleSuspendKeyLongPress=hibernate
#HandleHibernateKey=hibernate
#HandleHibernateKeyLongPress=ignore
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#RebootKeyIgnoreInhibited=no
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodesMax=
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192
#StopIdleSessionSec=infinity
and the output looks similar to before
- Code: Select all
sie 29 11:40:50 localhost systemd[2514]: Starting plasma-powerdevil.service...
sie 29 11:40:51 localhost org_kde_powerdevil[3027]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
sie 29 11:40:51 localhost org_kde_powerdevil[3027]: org.kde.powerdevil: failed to inhibit systemd powersave handling
sie 29 11:40:51 localhost systemd[2514]: Started plasma-powerdevil.service.
sie 29 11:40:51 localhost org_kde_powerdevil[3027]: org.kde.powerdevil: Handle button events action could not check for screen configuration
sie 29 11:40:51 localhost org_kde_powerdevil[3027]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
Also, what display manager do you use, sddm ?
yes sddm
not have old kernels but updates from sunday did not concern the kernel
Re: button events handling error

Posted:
Aug 29th, '24, 18:19
by alopez
I'm facing the same problem but using Mageia 9/Gnome.
Using a previous kernel changed nothing in my case. However, `systemctl suspend` does work. It seems that the power button is not triggering the suspended mode and always powering down the PC.
My /etc/systemd/logind.conf file has all the options commented out.
[EDIT] After setting
- Code: Select all
HandlePowerKey=suspend
in /etc/systemd/logind.conf it started to work again. Thanks for the help.
Re: button events handling error

Posted:
Aug 29th, '24, 19:02
by doktor5000
You're facing the same problem since the last updates and it worked previously ?
Re: button events handling error

Posted:
Aug 29th, '24, 20:08
by alopez
Exactly.
Re: button events handling error

Posted:
Aug 30th, '24, 16:20
by doktor5000
Do you also have the same message in your logs ?
- Code: Select all
org.kde.powerdevil: failed to inhibit systemd powersave handling
Re: button events handling error

Posted:
Aug 30th, '24, 16:29
by alopez
No, but since I'm using Gnome, I guess it is expected.
Re: button events handling error

Posted:
Oct 22nd, '24, 13:29
by nexus
After the last update (probably systemd) the power button handling was fixed.