SUMMARY Firefox and some of firefox forks, prevent sleep, but yet never stop preventing sleep even when the application is not running anymore! (Firefox issue? or KDE isue?) STEPS TO REPRODUCE 1. Use firefox or floorp (tested both) 2. Use team or other application that would prevent sleep (video playing) 3. Quit the application and the web browser 4. Wait for ever for the computer to go to sleep. OBSERVED RESULT Computer never goes to sleep, Firefox is preventing it, even if firefox is not running on the computer. EXPECTED RESULT When firefox close or when the application is not playing videos anymore, then the sleep prevention is stopped! SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora 42 KDE Plasma Version: 6.3 KDE Frameworks Version: 6.14 Qt Version: 6.9 ADDITIONAL INFORMATION Firefox 139.0.4 Flatpak Floorp 11.27.0 (flatpak)
Created attachment 182178 [details] Screenshot of the power managment widget and running applications No firefox or floorp running, yet they are preventing the computer to go to sleep because they are 'playing video'!
I'm not able to reproduce this in git-master or on Fedora 42 I pinned the Power applet to monitor if sleep was being blocked System set to sleep after 1 minute of inactivity 1. Open Firefox and Dragon Player or Haruna 2. Play a video in Dragon Player / Haruna 3. Close Dragon Player / Haruna The notice in the power applet that Haruna / Dragon Player is inhibiting sleep is removed The system can be made to sleep. If not invoked manually the system will go to sleep after the 1 minute timer Firefox and the media players are installed from native packages I re-tested with Celluloid, installed from flathub flatpak Can you let us know if you see the same behavior with a new user? Also, I noticed the version of Plasma in this bug report is 6.3.91. Are you running a beta version of Fedora?
(In reply to TraceyC from comment #2) > 1. Open Firefox and Dragon Player or Haruna > 2. Play a video in Dragon Player / Haruna > 3. Close Dragon Player / Haruna So you are testing either Haruna is blocking sleep, not Firefox!? I don't even have Haruna installed at all, is that a Firefox forks?! > Firefox and the media players are installed from native packages I have flatpak Firefox as stated, and I never talked about media players. > I re-tested with Celluloid, installed from flathub flatpak I don't know what Celluloid is, Is it a Firefox forks? > Can you let us know if you see the same behavior with a new user? My computer is 3 days newly installed. > Also, I noticed the version of Plasma in this bug report is 6.3.91. Are you > running a beta version of Fedora? Discover does not display the plasma version, so I don't actually know. I would think it's the last stable from Fedora. Few more notes to add: - The block reset after reboot, So I think there is just an unblock that is not being sent when firefox closed. - It does not happen when playing a video on youtube, as soon as I stop a youtube video, the block is removed. - It seems to happen on Microsoft team, That's the only 'video' site I had to use yesterday. - it's highly possible it's not a KDE bug but a Firefox or Team website bug. - KDE should still not allow an application that is not running to block sleep.
Changing the version to 6.3.5 as `dnf list --installed | grep plasma` show 6.3.5-1.fc42 version
(In reply to kde-bugs.m3ae6 from comment #3) > So you are testing either Haruna is blocking sleep, not Firefox!? I don't > even have Haruna installed at all, is that a Firefox forks?! I was following your testing steps. # 2 said to use an application that would prevent sleep with a video playing. Haruna, Dragon Player and Celluloid are video players that will block sleep. 1. Use firefox or floorp (tested both) - I used Firefox 2. Use team or other application that would prevent sleep (video playing) - I used Haruna or Dragon Player or Celluloid > > Firefox and the media players are installed from native packages > I have flatpak Firefox as stated, and I never talked about media players. While you didn't mentione media players, you mentioned something that would play video that would prevent sleep. The video players I tested with do that. > > Can you let us know if you see the same behavior with a new user? > My computer is 3 days newly installed. Can you still please test with a new user? Sometimes, there's a value in a cache file that causes problems. > Discover does not display the plasma version, so I don't actually know. I > would think it's the last stable from Fedora. Thanks for clarifying. > - It seems to happen on Microsoft team, That's the only 'video' site I had > to use yesterday. I hadn't realized from your initial message you were using the Teams website. Unfortunately, even after signing into Teams, I don't see anything that allows me to make a test call to test video. I used the Jitsi website to re-test instead. After closing that tab, and Firefox, the system did go to sleep at the timeout I had set. I also tested with Floorp from flatpak, by playing videos on YouTube. I was unable to reproduce. > - it's highly possible it's not a KDE bug but a Firefox or Team website bug. Can you reproduce this bug with any website other than Teams?
> Can you still please test with a new user? Sometimes, there's a value in a > cache file that causes problems. I had the same issue with a new user. > I hadn't realized from your initial message you were using the Teams > website. Unfortunately, even after signing into Teams, I don't see anything > that allows me to make a test call to test video. I used the Jitsi website > to re-test instead. After closing that tab, and Firefox, the system did go > to sleep at the timeout I had set. I can confirm that Team is really annoying, and you do need to do a call to test the video and audio. So I also need to wait until I need to make a call with it to test. > Can you reproduce this bug with any website other than Teams? At the moment, only Team have been causing this bug (I will keep on eye for other over time), other video website I have tried have been owrking as expected (preventing sleep only when video is playing). So it would be fair to think that there is a bug in the team webapp. While it would not be reasonable to expect KDE to fix Team. It may be beneficial to setup a system to make sure a non running application does not prevent sleep. aka in this situation, Firefox should not prevent sleep when Firefox is not even a running process.
Thanks for helping to narrow this down. I agree that what's actionable for us is that after the thing preventing sleep is closed, plasmashell should no longer prevent sleep.
Have we verified that Firefox isn't actually still running, but stuck? When this happens, what does `ps -e | grep -i firefox` say? If there's nothing there, then please run `systemctl restart --user plasma-xdg-desktop-portal-kde.service` and then see if the phantom inhibition gets removed.
Updating status pending a bit more information from the reporter, described in the previous comment. Thanks!
๐๐งน โ ๏ธ 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!
Got to go on Team again, so I could try, and it did the same thing. (In reply to Nate Graham from comment #8) > Have we verified that Firefox isn't actually still running, but stuck? When > this happens, what does `ps -e | grep -i firefox` say? Empty indeed. > If there's nothing there, then please run `systemctl restart --user > plasma-xdg-desktop-portal-kde.service` and then see if the phantom > inhibition gets removed. This worked to make it disappear!
I got to run a few test (it's really annoying that team does not allow for test call!) - It only happen on video call, not voice only call. Test 1 - Boot PC - Start firefox - Go on Team - Start a video call - Lock happen, as it should - close the call - Lock does not disappear (bug) - close team webpage and or firefox - Lock still present - `systemctl restart --user plasma-xdg-desktop-portal-kde.service` - lock disappear - Start firefox - Go on Team - Start a video call - Lock happen, as it should - close the call - Lock disappear, as it should Test 2 - Boot PC - Start firefox - Go on Team - Start a video call - Lock happen, as it should - `systemctl restart --user plasma-xdg-desktop-portal-kde.service` - Lock disappear (kind of expected, even if not desired) - close the call - close firefox Test 3 - Boot PC - `systemctl restart --user plasma-xdg-desktop-portal-kde.service` - Work as expected from now on