Comments (10)
Also, runtime power management may interfere. You can use powertop
utility to find out whenever power management is enabled for various devices. It's in "Tunables" tab.
If PM was enabled, try to disable it and test again.
from apulse.
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 apulse
, and compare results. Perhaps, there is something wrong in the way apulse
handles audio.
from apulse.
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.
from apulse.
so I can test anything else you want to offer
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 buffer_size
. It turned out that on the current machine I have a limit of 940 frames. Periods can't be shorter than that. So if application asks for 300 frames period and 1200 frames buffer, which is completely fine with buffer having four periods, it gets 940 frames period and 1200 frames buffer. That made buffer x-run happen almost immediately.
Now buffer sizes are enlarged as needed. So it's worth to try v0.1.10, which have changes mentioned above.
from apulse.
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.
from apulse.
from apulse.
@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.
from apulse.
from apulse.
Firefox's content process is constantly pegging one of my CPU cores, even when I'm not playing audio
If I had similar issue, first step was to try to run perf top
first while running distribution-supplied Firefox version, to find out where CPU time is spent. Next step is to try the same with Firefox built from source with debug information enabled. That could reduce scope of suspected code.
from apulse.
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.
from apulse.
Related Issues (20)
- Error when starting application with apulse HOT 1
- Firejailed browsers no sound (Firefox & Brave) HOT 1
- Firefox 71.0b6 no sound HOT 2
- No alsa sound in FF 69 HOT 1
- Capture PCM output of apulse HOT 2
- No sound with FF 73 (working with FF 72) HOT 1
- Apulse does not work with alsa ioplug HOT 1
- apulse with firefox 68.6.esr (devuan) HOT 7
- chromium/brave error in trisquel etiona/ubuntu 18.0 HOT 9
- patchelf not working HOT 2
- fluidsynth 2.1.3 can't find pa_threaded_mainloop_get_api symbol HOT 2
- viber complains for old version of PulseAudio server HOT 1
- Fix building with PulseAudio 13
- Audio lags behind by .5 seconds on Factorio HOT 3
- Capture device leaves browser with locks held
- apulse should not even exist HOT 2
- Is this project unmaintained? HOT 3
- apulse + firefox reader view causes speech to fail for other applications
- What is more secure, apulse or PipeWire? HOT 2
- Telegram doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apulse.