Bug 485204 - PowerDevil KCM setting "Even when an external monitor is connected" is not consistently applied
Summary: PowerDevil KCM setting "Even when an external monitor is connected" is not co...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (show other bugs)
Version: 6.2.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
: 483519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-04-07 21:38 UTC by ConfuSomu
Modified: 2024-12-18 21:40 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ConfuSomu 2024-04-07 21:38:42 UTC
The PowerDevil KCM setting "Even when an external monitor is connected" is not consistently applied.

My laptop is connected to AC power and an external display (via DisplayPort over USB-C → HDMI) and has its lid closed. The user is not logged out. The display layout is such that only the external display is used.

When waking it up from suspend, it correctly displays the screen locker on my external display. The screen locker asks for my fingerprint(*) which I provide it by opening the laptop lid (which turns on the internal display and shows the same screen locker) and placing my finger on the reader sensor. After that, the computer is unlocked and I correctly see my desktop (KWin, plasmashell, etc.) on the external display with the internal one being off.

When I then close the laptop lid, the computer goes back to sleep (when it should not due to my configuration). I then press on a USB keyboard key to wake it back up and I am greeted with kscreenlocker where I can type my password to unlock it. I can finally use it connected to an external display with the lid closed.

STEPS TO REPRODUCE
1. Lock your screen (such as with Meta + L).
2. Open the laptop lid and unlock (to desktop).
3. Close the laptop lid.

OBSERVED RESULT
The external display loses signal as the computer goes to sleep.

EXPECTED RESULT
The computer should not go to sleep and the system should stay as-is.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.7.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i7-1260P
Memory: 15.3 Gio of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: Framework
Product Name: Laptop (12th Gen Intel Core)
System Version: A6

ADDITIONAL INFORMATION

I think that this bug might have started after replacing the currently running kwin_wayland when testing unrelated things? It shouldn't have affected anything as I passed it the same command line (in addition to --replace).

I noticed that the battery applet does not display any warning about sleeping/lid being inhibited due to an external monitor being connected. I believe it showed that in the past?

(*) The first screen locker requires me to use my fingerprint and does not accept a password due to my SDDM PAM configuration. Though it shouldn't affect the screen locker, as the system was already unlocked initially. I will have to take a look at my configuration.
Comment 1 Natalie Clarius 2024-04-08 23:29:08 UTC
> I think that this bug might have started after replacing the currently running kwin_wayland when testing unrelated things? It shouldn't have affected anything as I passed it the same command line (in addition to --replace).

Does it also happen in a session with the original kwin_wayland running? Could well be that replacing kwin (which keeps track of screens and lid state) got it out of whack.
Comment 2 Natalie Clarius 2024-04-08 23:31:13 UTC
And can you say when the applet stops displaying the warning? It is completely gone or does it only disappear e.g. after opening the laptop lid?
Comment 3 Natalie Clarius 2024-04-08 23:31:32 UTC
.
Comment 4 Natalie Clarius 2024-04-09 23:30:12 UTC
*** Bug 483519 has been marked as a duplicate of this bug. ***
Comment 5 ConfuSomu 2024-04-12 18:43:14 UTC
> Does it also happen in a session with the original kwin_wayland running?

This does not happen in a session with the original kwin_wayland running, such as after logging out and then logging back in. At this stage, the inhibition warning is displayed in the battery applet.

> And can you say when the applet stops displaying the warning? It is completely gone or does it only disappear e.g. after opening the laptop lid?

I tried reproducing the bug in a new session, but haven't been able to (no packages or configurations were updated in the meantime). I don't remember when the warning originally disappeared.

In a new session, after replacing kwin_wayland, the warning was still displayed, even if I suspended the laptop and woke it back up, and opened or closed the lid after unlocking.

Interestingly, when unplugging my laptop from the external display/DisplayPort, the applet still displayed the same inhibition warning. When closing the lid, it didn't suspend. This does not happen with the original kwin_wayland. I can reproduce this bug in new sessions (after a log out and log in).

No presentation mode or sleep inhibition is manually activated through the Plasma applets.

Thank you!
Comment 6 Bug Janitor Service 2024-04-27 03:46:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Nate Graham 2024-05-07 14:48:11 UTC
I've been noticing this myself--maybe the same issue, maybe something related.

When I unplug my laptop from its external screen (connected via a USB-C dock), the widget still shows the "Your laptop is configured not to sleep when closing the lid while an external monitor is connected." message.

When this happens, I can restart the Powerdevil systemd service to fix it. So it recognizes the state correctly on launch, but sometimes fails to notice changes in real-time.
Comment 8 Brad Penney 2024-05-23 10:00:06 UTC
I am also facing this issue.  Here are my specs:
ADDITIONAL INFORMATION
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.8.10-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Zenbook UP6502ZD_UP6502ZD
System Version: 1.0

In short - if I close my laptop lid, even while working on an external monitor, the computer enters suspend mode.  My laptop lid must be open in order for the laptop to function, even if not using the built-in screen.