Bug 485876 - Power managment control shows "On laptop lid closed" for game console
Summary: Power managment control shows "On laptop lid closed" for game console
Status: RESOLVED UPSTREAM
Alias: None
Product: Powerdevil
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 5.27.5
Platform: SteamOS Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-21 04:53 UTC by Justin Zobel
Modified: 2024-04-23 02:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot (16.43 KB, image/png)
2024-04-21 04:53 UTC, Justin Zobel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Zobel 2024-04-21 04:53:25 UTC
Created attachment 168727 [details]
Screenshot

Powerdevil assumes any device with a battery is a laptop, but that isn't correct. This is a screenshot from my Steam Deck.

Suggestion: Replace "laptop" with "device".
Comment 1 Natalie Clarius 2024-04-21 16:16:22 UTC
But a steam deck doesn't have a lid, does it? So the bug is rather that it shows the message at all if closing the lid is not a thing.
Comment 2 Natalie Clarius 2024-04-21 16:18:00 UTC
Do you have the "When laptop lid closed" option in power management system settings?
Comment 3 Justin Zobel 2024-04-22 03:28:00 UTC
Yes it mentions lid things in the Power Settings as well.
Comment 4 Justin Zobel 2024-04-22 06:04:55 UTC
I've changed the title of this one so we can tackle it in a broad way for the whole of Powerdevil.
Comment 5 Natalie Clarius 2024-04-23 01:02:51 UTC
Could you please paste the output of  

 qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.LidIsPresent
Comment 6 Justin Zobel 2024-04-23 01:08:33 UTC
qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.LidIsPresent
true
Comment 7 Natalie Clarius 2024-04-23 01:26:45 UTC
Then it's a bug in UPower incorrectly reporting your device as having a lid, and not something we can fix in KDE.  

Though that method is deprecated and will eventually have to be replaced by something else in KDE, so not worth filing a report in UPower for.
Comment 8 Justin Zobel 2024-04-23 01:28:19 UTC
How eventually?
Comment 9 Natalie Clarius 2024-04-23 01:30:03 UTC
See https://invent.kde.org/plasma/powerdevil/-/issues/22.
Comment 10 Justin Zobel 2024-04-23 01:33:13 UTC
Thanks I'll follow along there.
Comment 11 Jakob Petsovits 2024-04-23 02:59:58 UTC
(In reply to Natalie Clarius from comment #7)
> Then it's a bug in UPower incorrectly reporting your device as having a lid,
> and not something we can fix in KDE.  
> 
> Though that method is deprecated and will eventually have to be replaced by
> something else in KDE, so not worth filing a report in UPower for.

UPower has not only restored lid switch handling, but also un-deprecated it. They've since released two new versions with the release notes featuring "Continue to support lid handling" and removing the "Note that this is the last release of UPower with lid handling".

Lid switch handling in UPower is back for good. It absolutely makes sense now to report this upstream.

For more background, see https://invent.kde.org/plasma/powerdevil/-/issues/22#note_859555 and the UPower issue linked from there.