STEPS TO REPRODUCE 1. Set 'action when laptops lid is closed' to 'suspend (to RAM)' 2. Start youtube video in a browser (Firefox or Chromium) OBSERVED RESULT You can see media controls appear and also a message in powerdevil applet(?), that Chromium/Firefox 'suppresses power management because there is a video playing'. But when you close the laptop lid, laptop goes to sleep. Sidenote: Media playback in Chromium or Firefox is very often not recognised, in that case it is understandable that laptop goes to sleep. This could be solved by 'suppressesing power management' anytime media controls are active. But when testing this it was recognised correctly and it didn't help anyway. EXPECTED RESULT Laptop doesn't go to sleep when there is a video or audio playing. SOFTWARE/OS VERSIONS KDE Frameworks Version: 5.55 Qt Version: 5.12.1 ADDITIONAL INFORMATION On wayland, I have 'pause music when going to sleep(?)' disabled because it used to un-pause already paused music when going to sleep.
Also happens with qbittorent, which is not related to media playback.
It's the application's responsibility to prevent suspend when it's doing something. However, closing the lid *always* suspends the machine since it's an explicit user ineraction just like pressing the Sleep button. This is to avoid the user closing the lid, expecting the machine to suspend, and then putting it in a bag where it may overheat because an app decided to keep the machine on.
(In reply to Kai Uwe Broulik from comment #2) > It's the application's responsibility to prevent suspend when it's doing > something. However, closing the lid *always* suspends the machine since it's > an explicit user ineraction just like pressing the Sleep button. > > This is to avoid the user closing the lid, expecting the machine to suspend, > and then putting it in a bag where it may overheat because an app decided to > keep the machine on. But it works on Xorg though...