[SOLVED] button events handling error

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] button events handling error

Postby nexus » Aug 26th, '24, 09:35

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?
Last edited by nexus on Oct 22nd, '24, 13:30, edited 1 time in total.
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05

Re: button events handling error

Postby doktor5000 » Aug 26th, '24, 18:49

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 ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby nexus » Aug 26th, '24, 23:57

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.
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05

Re: button events handling error

Postby doktor5000 » Aug 27th, '24, 17:12

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.html
Also 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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby nexus » Aug 28th, '24, 00:46

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.
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05

Re: button events handling error

Postby doktor5000 » Aug 28th, '24, 15:59

Please post the output as root of
Code: Select all
journalctl -ab | grep -i powerdevil
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby nexus » Aug 28th, '24, 17:14

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
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05

Re: button events handling error

Postby doktor5000 » Aug 28th, '24, 17:59

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 ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby nexus » Aug 29th, '24, 12:12

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
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05

Re: button events handling error

Postby alopez » Aug 29th, '24, 18:19

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.
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France

Re: button events handling error

Postby doktor5000 » Aug 29th, '24, 19:02

You're facing the same problem since the last updates and it worked previously ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby alopez » Aug 29th, '24, 20:08

Exactly.
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France

Re: button events handling error

Postby doktor5000 » Aug 30th, '24, 16:20

Do you also have the same message in your logs ?

Code: Select all
org.kde.powerdevil: failed to inhibit systemd powersave handling
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18042
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: button events handling error

Postby alopez » Aug 30th, '24, 16:29

No, but since I'm using Gnome, I guess it is expected.
User avatar
alopez
 
Posts: 65
Joined: Aug 17th, '13, 18:26
Location: France

Re: button events handling error

Postby nexus » Oct 22nd, '24, 13:29

After the last update (probably systemd) the power button handling was fixed.
nexus
 
Posts: 36
Joined: Jan 16th, '18, 16:05


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron