Bug 450543

Summary: Screen lock/sleep are not inhibited when playing content in web browsers on Wayland
Product: [Unmaintained] Powerdevil Reporter: Ramon Marquez <remarqueze>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: fanzhuyifan, kde, nate, voidpointertonull+bugskdeorg
Priority: NOR    
Version First Reported In: 5.24.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ramon Marquez 2022-02-18 22:20:45 UTC
SUMMARY
***
the screen is not inhibited when playing content, in this case it is about online radios (Accuradio). This despite having the system configured to turn off the screen in 3 minutes
***


STEPS TO REPRODUCE
1. I open the Accuradio online radio service 
2. I leave the content playing without doing any activity on the computer
3. Screen is not inhibited even though more than 3 minutes have elapsed

OBSERVED RESULT

When I play content on some online radio service (in my case, Accuradio), the screen remains on and active despite having the system configured to turn it off in 3 minutes, if it remains in idle status

EXPECTED RESULT

That when playing content from online radios, the screen is suspended or turned off if there is no activity or input events after 3 minutes.

SOFTWARE/OS VERSIONS
 
Linux/KDE Plasma: 5.24
(available in About System)
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

This error happens in both Firefox and Chrome under Wayland session (I don't use X11/Xorg). A noteworthy fact is that this error did not appear in previous versions of Plasma, including the previous 5.24.0
Comment 1 Nate Graham 2022-02-21 22:46:19 UTC
Does the Battery & Brightness app list any apps inhibiting sleep and screen lock when the webpage plays media?

Does it work when you play a video in YouTube?

Do you have plasma-browser-integration installed?
Comment 2 Ramon Marquez 2022-02-22 06:42:37 UTC
(In reply to Nate Graham from comment #1)
> Does the Battery & Brightness app list any apps inhibiting sleep and screen
> lock when the webpage plays media?

I use a desktop PC so I don't see the battery option. As for the power options there is no list of apps

> Does it work when you play a video in YouTube?

On YouTube, the screen is also not inhibited when playing videos without being in full screen mode

> Do you have plasma-browser-integration installed?

Yeah, in both google chrome and firefox
Comment 3 Nate Graham 2022-02-22 17:34:34 UTC
is `powerdevil` running?

If so, then this is an issue in the browsers themselves not sending the necessary inhibitions.
Comment 4 Ramon Marquez 2022-02-22 21:59:50 UTC
(In reply to Nate Graham from comment #3)
> is `powerdevil` running?
> 
> If so, then this is an issue in the browsers themselves not sending the
> necessary inhibitions.

Yeah, that process is running. However, do a test and this error only occurs under the Wayland session because in X11 it doesn't give that error, the inhibits work correctly in both browsers if you log in under X11
Comment 5 Nate Graham 2022-02-22 22:01:26 UTC
That's strange, it works for me on Wayland.
Comment 6 Pedro V 2023-11-18 10:52:39 UTC
I believe there's no power management inhibition for audio as discussed in Bug 335729 .

On the other hand I can't confirm inhibition not working for videos, it's fine for me on Wayland:
- Firefox (Flatpak, no plasma-browser-integration) inhibits power management when the current tab is playing video (not even full screen), but gives up on the inhibition when switching to another tab
- mpv inhibits power management when playing a video, but also removes the inhibition when it's minimized
Comment 7 fanzhuyifan 2024-08-11 15:58:53 UTC
I think there has been some misunderstanding -- reading the original report, inhibit is used to mean "turn off", and the report is about the screen NOT turning off.

I cannot reproduce on wayland, git master. With firefox nightly playing music from accuradio, the screen correctly turns off.

What browser are you using?
Comment 8 Bug Janitor Service 2024-08-26 03:47:26 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2024-09-10 03:47:00 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.