Youtube prevents Firefox from sleep
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: xracoonx, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Start a video on youtube
Actual results:
Mac was prevented from sleep and showing "Yes" under the "Preventing Sleep" column for "FirefoxCP Web Content" on the Energy tab of Activity Monitor.
Expected results:
It is not prevented from sleep.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
This is on purpose.
Any software playing videos will suspend auto-sleep and the screen saver from kicking.
Don't want your screen saver to appear while you're watching something
(In reply to Jean-Yves Avenard [:jya] from comment #1)
This is on purpose.
Any software playing videos will suspend auto-sleep and the screen saver from kicking.
Don't want your screen saver to appear while you're watching something
Thanks for the quick response. I see the intention however, I think Firefox is doing it wrong and potentially dangerous. Hence, I urge you to not mark this as WONTFIX.
Preventing sleep, at least the way Firefox is doing it, means that even when the lid is closed the computer will keep running. So, if you have muted your computer or the tab while a video is playing, you might not notice that it is still running, close the lid and drop it into your bag.
Safari is not preventing sleep this way and still does not go into sleep when the video is running and the lid is open.
There is another problem that might be related (or a separate bug, please let me know). If a youtube video on Firefox is running and the user is switched, the video keeps playing in the background. Now, imagine that the new user does not know the password of the other user, then this user cannot use the computer with audio (unless this user wants to listen to the other user's sound).
Again, Safari does not show this bug.
Comment 3•6 years ago
|
||
(In reply to xracoonx from comment #2)
Preventing sleep, at least the way Firefox is doing it, means that even when the lid is closed the computer will keep running. So, if you have muted your computer or the tab while a video is playing, you might not notice that it is still running, close the lid and drop it into your bag.
Firefox doesn't prevent sleep as such. It prevents the screen saver from kicking in. The OS will then decide after a specific time when it should go to sleep or hibernate after the screen saver has kicked in. So no screen saver -> no sleep.
If your laptop doesn't turn off when you close the lid, it won't be due to Firefox but a OS bug. The only time it should happen on mac is if there's an external screen connected.
Closing the lid should always put the laptop to sleep, regardless of Firefox playing a video or not.
I've seen this bug happening on mac, regardless of firefox even being opened.
You should raise the bug with Apple.
What you say might be true and (In reply to Jean-Yves Avenard [:jya] from comment #3)
(In reply to xracoonx from comment #2)
Preventing sleep, at least the way Firefox is doing it, means that even when the lid is closed the computer will keep running. So, if you have muted your computer or the tab while a video is playing, you might not notice that it is still running, close the lid and drop it into your bag.
Firefox doesn't prevent sleep as such. It prevents the screen saver from kicking in. The OS will then decide after a specific time when it should go to sleep or hibernate after the screen saver has kicked in. So no screen saver -> no sleep.
If your laptop doesn't turn off when you close the lid, it won't be due to Firefox but a OS bug. The only time it should happen on mac is if there's an external screen connected.
Closing the lid should always put the laptop to sleep, regardless of Firefox playing a video or not.
I've seen this bug happening on mac, regardless of firefox even being opened.
You should raise the bug with Apple.
While what you say might be true, it is not a very satisfactory answer. Even if the way Firefox behaves is due to a bug in macOS (I am on the latest update), there are ways to get the behavior Firefox is intended to have without running into the bug, as Safari shows. So at least while the bug is not resolved on the macOS side, it would be good if Firefox would use whatever feature Safari is using to prevent sleep.
Comment 5•6 years ago
|
||
And what I'm saying is that there's nothing Firefox can do over what it is already doing. Normally, closing the lid will put the mac to sleep, regardless of a video playing or not.
You may have not seen it this time when using Safari, but it can happen just as much as it can with Firefox.
When you close the lid on a mac, 99% of the time it will go to sleep, unfortunately there are times it won't, regardless of the application you are currently using.
Try several times, you'll see for yourself, with or without Firefox playing a video.
I am having this problem now, without videos playing. pmset -g, see output below. coreaudio is preventing sleep. Sometimes it is listed twice. Quitting and restarting Firefox will get stop coreaudio being listed as preventing sleep, and the machine will, in fact, sleep. I suspect that after a video has played, or perhaps Teams or another video conferencing application in the browser has been run , something isn't being closed. The result is that the lid can close but the machine will not sleep, and the laptop is out of battery in the morning when I open it up next. This when there is no external monitor attached (anymore).
105.0a1 (2022-07-28) (64-bit), MacOS 10.15.7
laptop:~ % pmset -g
System-wide power settings:
VACTDisabled 1
Currently in use:
standby 1
standbydelaylow 3600
womp 0
halfdim 0
hibernatefile /var/vm/sleepimage
proximitywake 0
powernap 0
gpuswitch 2
networkoversleep 0
disksleep 10
standbydelayhigh 14400
sleep 60 (sleep prevented by coreaudiod) <-----------------------
hibernatemode 0
ttyskeepawake 1
displaysleep 15 (display sleep prevented by coreaudiod)
tcpkeepalive 1
highstandbythreshold 50
acwake 0
lidwake 1
Description
•