Bug 491577 - Locks screen even while playing video on YouTube
Summary: Locks screen even while playing video on YouTube
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.0.5
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-11 14:08 UTC by php4fan
Modified: 2024-12-18 14:16 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2024-08-11 14:08:14 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

I have Screen Locking configured to lock screen after 5 minutes of inactivity. Usually, if a video is playing in Chrome (e.g. YouTube), that counts as "activity", and as expected, it will prevent the screen from automatically locking if I'm not interacting with anything.

However, this sometimes start failing. Right now, for example, I'm playing a video on youtube (which actually I put on play just for the express purpose of preventing the screen from locking), and yet, if I don't touch the keyboard or mouse in 5 minutes, the screen locks.

I wonder if this is related to the following:
A few hours ago, the screen suddenly froze for a few seconds for no reason, and then (a) the screen flashed black for a split second; (b) several applications closed for no reason with no error message (including Chrome, Gimp and a few others, but not all the applications that I had open); and (c) the task manager (or whatever it's called) at the bottom of the screen disappeared for a split second, suggesting maybe kwin or Plasmashell or something had crashed and restarted.
I'm not sure if that's when the playing-video-doesn't-prevent-screen-lock issue started.

STEPS TO REPRODUCE
1. make sure screen locking is set up to lock screen automatically after 5 minutes of inactivity
2. play a video on YouTube (make sure it lasts way more than 5 minutes)
3. don't touch the keyboard or mouse for 5 minutes

OBSERVED RESULT
The screen locks. 

EXPECTED RESULT
The screen shouldn't lock because a video is playing. 

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.6.41-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1502ZA_F1502ZA
System Version: 1.0
Comment 1 fanzhuyifan 2024-08-11 15:49:03 UTC
What browser are you using?
If you click the battery icon, do you see anything inhibiting sleep?

So the browser is responsible for inhibiting sleep, and if it is not correctly doing that, this should be reported to the browser.
E.g., when I use firefox nightly to play youtube videos, I see firefox listed as inhibiting sleep and screenlock.
Comment 2 php4fan 2024-08-11 20:17:07 UTC
The issue stopped after suspending and waking up, so unfortunately I cannot test until it happens again.

I didn't know about the sleep-prevention info in the battery icon. I'll check next time it happens. Now it does show Chrome preventing sleep, but it also actually works. If I find Chrome is listed there when the issue happens, that will definitely rule out Chrome as the culprit; but if it's not listed, we still won't know whether it's Chrome "forgetting" to inhibit sleep, or the system failing to register that Chrome asked to inhibit sleep.

Given the apparent crash of something window-related (Plasmashell or kwin or something) a few minutes or hours prior, it seemed to me somewhat more likely to be an issue on the system side rather than on Chrome's side - but of course, I don't know, could be a Chrome bug.

I'll also try playing videos with other applications next time this happens.
Comment 3 Bug Janitor Service 2024-08-26 03:47:32 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 4 Bug Janitor Service 2024-09-10 03:47:06 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.
Comment 5 php4fan 2024-12-18 14:16:18 UTC
Recently I verified that when this issue happened, Chrome was usually not listed among the apps inhibiting screen lock, so I reported the issue to Chrome.

But just now it happened again, and this time Chrome WAS listed as inhibiting screen lock and sleep.