Bug 488115

Summary: power button shows when no such hardware button exists
Product: [Plasma] plasmashell Reporter: dofficialgman
Component: Power management & brightnessAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: jpetso, natalie_clarius, nate
Priority: NOR Keywords: usability
Version First Reported In: 6.2.4   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dofficialgman 2024-06-06 15:13:08 UTC
SUMMARY

power button is hardcoded to always show as available https://invent.kde.org/plasma/powerdevil/-/blob/master/kcmodule/profiles/PowerKCM.cpp#L228

10 years ago there was an api for this but it was removed https://invent.kde.org/plasma/powerdevil/-/commit/57244ee8df47d3343e7557f108825580b7c59f2f#d0694e2e943e9bc5a464298284074971804e7b75_85_83

On systems where there is no physical power button the setting will still show confusing users. Additionally, if such systems have a hardware sleep button, the user may be think that this setting allows for configuring the sleep button (which it does not).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version:
Comment 1 Nate Graham 2024-06-07 14:42:43 UTC
Are you able to share what kind of hardware it is? If it doesn't have a power button, how do you turn it on when it's off?
Comment 2 dofficialgman 2024-09-11 20:13:49 UTC
(In reply to Nate Graham from comment #1)
> Are you able to share what kind of hardware it is? If it doesn't have a
> power button, how do you turn it on when it's off?

Nintendo Switch. Custom kernel and rest of bootstack as necessary.

I only thing that matters is the button that is used to actually turn the system on from fully off is mapped as a "sleep" button for the best compatibility with most linux distros. The users expect the button to function as a sleep button by default but it would be nice still for the button to be map-able on KDE since it used to have the ability to do so.
Comment 3 Nate Graham 2024-09-16 15:38:31 UTC
I think the Steam Deck does something similar, though perhaps in reverse: it has a power button that puts the device to sleep when pressed once, and you have to long-press it to make it behave as a power button.