Bug 17947

Summary: Power Management Button Events defaults to systemd handling because not selected
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: KDE maintainers <kde>
Status: RESOLVED OLD QA Contact:
Severity: normal    
Priority: Normal CC: doktor5000, geiger.david68210, jyri2000, mageia, marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: plasma5 CVE:
Status comment:

Description Frank Griffin 2016-03-10 18:12:31 CET
From the dev ML:

David Walser wrote on 10/03/16 15:09:
> Frank Griffin <ftg@...> writes:
>> Under KDE, Systems Settings -> Power Management had controls for what 
>> happens if you close the laptop cover.  These seem to have disappeared.  
>> Does anybody know where they went under the latest Plasma ?
>>
>> With latest cauldron, my laptop (which runs all the time on AC and has 
>> always been set to do nothing other than turn off the screen when the 
>> lid is closed) is suddenly suspending when the lid is closed.
>
> This is a systemd misfeature.

No it's not.

> You can fix it by adding "HandleLidSwitch=ignore" to /etc/systemd/logind.conf

That's NOT how it should be done!

Users shouldn't have to configure this, it's up to the DE to tell
systemd that they want to handle this and provide it's own configurations.

GNOME does this properly and presents the users with a UI to control
what is wanted (and can vary based on other factors - like when a power
supply is attached or an external display is connected).

Only really bare bones DEs with no built-in power management should get
the default behaviour provided by systemd (which considersonly a "safety
first" principle).

Plasma should fall into the same camp as GNOME here and very much should
NOT require users to go fiddling with /etc/systemd/logind.conf.

If Plasma isn't doing this then it's either badly packaged, or the
feature is not implemented [correctly] and should be addressed.

Col
Comment 1 Jüri Ivask 2016-03-11 08:22:36 CET
Hmm, I do have "Turn off screen" option in System Settings -> Power Management -> Energy Saving -> Button events handling -> When laptop lid closed and it seems to work OK...

CC: (none) => jyri2000

Comment 2 Frank Griffin 2016-03-11 16:25:24 CET
Ahh, OK, sort of.  

First off, Button events isn't visible when the display comes up --- you have to scroll down and across to see it.  

Second, I didn't have Button events selected for any of the three power settings.  If this is in fact causing the use of the systemd stuff when Plasma should always be handling it, then we ought to ship with this enabled, even if we leave the default setting of "Do nothing".

Third, I turned on Button events for all three power settings, and set the behavior to Turn Screen Off.  That works, and prevents the suspend, but when you open the lid, you have to hit a key to get the screen to come back on, and it comes back on dimmed, even on AC.  Is this expected ?
Frank Griffin 2016-03-11 16:26:45 CET

Summary: No laptop cover Power Management => Power Management Button Events defaults to systemd handling because not selected

Comment 3 Florian Hubold 2016-03-12 14:42:14 CET
Can you show the output of

systemd-inhibit --list

CC: (none) => doktor5000

Comment 4 Frank Griffin 2016-03-12 15:04:44 CET
[root@ftglap ssh]# systemd-inhibit --list
     Who: PowerDevil (UID 501/ftg, PID 19133/kded5)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
     Why: KDE handles power events
    Mode: block

     Who: NetworkManager (UID 0/root, PID 21410/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: Telepathy (UID 501/ftg, PID 25583/mission-control)
    What: shutdown:sleep
     Why: Disconnecting IM accounts before suspend/shutdown...
    Mode: delay

3 inhibitors listed.
Comment 5 Frank Griffin 2016-03-12 15:08:47 CET
Of course, this is now with Button events selected.
Marja Van Waes 2016-03-12 19:55:48 CET

CC: (none) => marja11
Assignee: bugsquad => mageia

Samuel Verschelde 2016-08-25 16:22:49 CEST

Assignee: mageia => kde

Comment 6 Nicolas Lécureuil 2017-03-17 17:20:17 CET
is it still valid on current cauldron ?

CC: (none) => mageia

Comment 7 Frank Griffin 2019-02-19 20:58:37 CET
I can't tell because of bug#21160.
Comment 8 David GEIGER 2024-03-03 16:53:51 CET
No more activities here from years so closing as old!

Status: NEW => RESOLVED
CC: (none) => geiger.david68210
Resolution: (none) => OLD