-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio glitchiness in Firefox after its been left open for a while #50
Comments
This will be hard to reproduce (for me), as I tend to do the opposite: close and start browser quite often. By the way, when audio glitches appear, do they appear if you run some other audio application too? In other words, if you experience audio stuttering, try to mute all Firefox tabs, and start audio player. Does it play audio fine? It's also worth to try run audio player through both ALSA and |
Also, runtime power management may interfere. You can use If PM was enabled, try to disable it and test again. |
Sorry it took me so long, but it took a while for the problem to crop up again. There are no problems with ALSA using VLC. There are problems playing audio in any other tab. And powertop only reports on my CPU, where I've actually turned off throttling due to other issues. That said, it seems that Firefox's content process is using up more CPU on idle than I would expect. It seems to be maxing out one of my cores. Since restarting the content process fixes it, I don't think my CPU is being throttled down. It may be a runaway thread in Firefox. I didn't have them back when I was using the ALSA backend, but that was a different version of Firefox. Since I have no real need to use my computer right now, I can try to leave it in its current condition, so I can test anything else you want to offer. That said, I am aware the problem may have nothing to do with apulse. I do have a similar problem on my Windows computer sometimes. Though it seems to happen without any cores being maxed out. |
Sorry, I have no ideas left. I could guess there are buffer underruns/overruns, they sound like clicks or stuttering. But that hypothesis doesn't explain why one need to keep application running for so long to make the bug appear. Recently, I've added some code that handles x-runs and prevents them: ec575ce...86f0841. Main part of the fix is the code which calculates Now buffer sizes are enlarged as needed. So it's worth to try v0.1.10, which have changes mentioned above. |
What soundcard / driver are you using? What kernel version? What is firefox actually doing? (strace or gdb backtrace). And, by "ALSA works using VLC", do you mean playing a file for 12 hours or leaving it running ? Could very well be the sound card is going into powersave and not coming out properly. Off the top of my head I don't recall if VLC leaves the card open while not in use. Firefox should be closing it when not in use specifically to allow power save. |
If it is a powersave problem, it seems odd that it would stay glitchy in
Firefox, but if I then pull up VLC, VLC's audio is fine.
However, if I open a new tab and play some other audio in Firefox, it
remains messed up.
I do think it's CPU related, since Firefox wants to keep one of my cores
nearly pegged all the time now.
I suspect the problem is actually with Firefox's PulseAudio backend, rather
than with apulse. But I wanted to confirm it's not a problem with apulse
before reporting it to Mozilla, as the guy developing that backend seems
quite hostile to users.
…On Wed, Apr 19, 2017 at 6:17 PM, h1z1 ***@***.***> wrote:
What soundcard / driver are you using? What kernel version? What is
firefox actually doing? (strace or gdb backtrace). And, by "ALSA works
using VLC", do you mean playing a file for 12 hours or leaving it running ?
Could very well be the sound card is going into powersave and not coming
out properly. Off the top of my head I don't recall if VLC leaves the card
open while not in use. Firefox should be closing it when not in use
specifically to allow power save.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#50 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFNSrjpcKsqYIhjugTD1eNIxyUU1DJ3nks5rxpYWgaJpZM4M4Nw9>
.
|
@trlkly have you had a look at powertop? The corresponding option is "Enable Audio codec power management" ("Bad" means, that power optimisations are disabled). If you have a USB audio card, have a glance at USB powersaving options too. |
I already pointed out that powertop doesn't work for me. To be more
specific, it tells me I don't have the timer_stats module. I am not
finding a lot of information on how to enable that.
But since you guys keep bringing it up, I've looked at how to check
this setting a different way, using the /sys partition.
/sys/module/snd_hda_intel/parameters/power_save_controller is on. I
have now turned it off.
However, /sys/module/snd_hda_intel/parameters/power_save is already
set to 0, which should mean powersaving was disabled.
I could make sure that that first setting is problematic, but what I
read suggests that it shouldn't matter: powersaving was already turned
off by setting it to 0 seconds.
I don want to clarify out that Firefox's content process is constantly
pegging one of my CPU cores, even when I'm not playing audio (or
video). I can otherwise use Firefox, however.
…On Thu, Apr 20, 2017 at 4:51 AM, Alexander-- ***@***.***> wrote:
@trlkly have you had a look at powertop? The corresponding option is "Enable
Audio codec power management" ("Bad" means, that power optimisations are
disabled). If your audio card is usb-based, you should also look at USB
powersaving option.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If I had similar issue, first step was to try to run |
I've not encountered this for a while, so I'm going to tentatively close it. If I know my luck, if it's gonna come back, it will come up now that I've done so. So I might as well hurry it along. |
I don't know if the problem is with Firefox (as it has similar problems on Windows), but I thought I'd try here first.
I tend leave Firefox open for long periods of time. I find that, when I come back after a long period (12 hours or more) and then load a video, the audio is all glitchy and stuttery, as if there is not enough memory and it is having to cache to disk. But my I don't use a swap partition on my Linux distro, so that's not it. I also hear similar problems when a process is running the CPU at 100%, but that is also not the case with this bug.
The Windows issue I mention earlier often clears up as the video continues playing. But, with this bug, only restarting Firefox works to fix it.
If I have left Firefox on a particular video tab, sometimes that video's audio is fine. But any other videos (whether from another tab or loading from somewhere else) is quite glitchy sounding.
So, tl;dr version: Firefox (52.0.2) audio stutters really badly on videos if I have left Firefox open for a long period of time (>12 hours). Restarting Firefox fixes the problem.
The stuttering is similar to what happens when the CPU is overtaxed, or when the computer is running out of memory, but neither is the case for this bug.
The text was updated successfully, but these errors were encountered: