-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Repeatedly tries to open and close ALSA devices in background forever, causing disk to fill up with errors #419
Comments
This looks like it is an issue with ALSA itself, unless it occurs only in MATE. Note that when there is no sound card on bare metal, mate-media and the libmatemixer backend normally fall back to a "dummy" output so the applet doesn't crash and also can be tested. If this is MATE-only, then something that should fall back to the dummy device is failing to do so. I have never worked in VMs and don't have any working machines with no or only removable sound right now, so I cannot work on this one myself. Will leave fixing this for other team members that can duplicate it |
The dummy device was added a long time ago (I forget where in the code)
so that the volume control applet would not crash when no audio device is present.
What devices are constantly trying to open? This is definately a bug, and not
one I've had when no audio device was recognized on a certain laptop that had unsupported sound
hardware. We need to find out if this is a MATE issue or an ALSA issue.
|
Actually, after a bunch of wading through source code, I think the problem is actually here, where libmatemixer noisily searches for ALSA devices once per second. Also note that the ALSA backend always opens successfully, a strategy that I feel is based on incorrect assumptions. 😛 |
Since we need to respond to added and removed sound devices, this looks like we need to ensure that the dummy device is only added once-or if that doesn't work, we need to disable logging its creation more than once. Replacing this with an event-driven loop would be best of all, but that's not something I am up to coding and would require a lot of testing before release or we get folks who cannot get their USB sound recognized. |
As a workaround, consider writing a script to delete~/.xsession-errors at intervals, or setting the file to read-only and owned by root so it cannot be written to. Revert this when you need to debug your session. Also: on a machine with no sound device that is NOT going to be used with a USB/removable sound device, you could uninstall mate-media and libmatemixer, if necessary creating an empty dummy package version of them to satisfy any dependencies on them. |
I ran git blame on that code, the code underneath the comments dates to 2014 and I've had machines with no usable sound that didn't spam the logs. |
Expected behaviour
To not run out of diskspace due to ~/.xsession-errors growing at nearly 1Kbyte/sec:
Actual behaviour
~/.xsession-errors gains these message once per second:
Steps to reproduce the behaviour
Use MATE in a VM (LXD container in my case) lacking sound hardware.
MATE general version
1.26.0 I guess?
Package version
1.26.0-1+deb12u1
Linux Distribution
Debian 12
Link to bugreport of your Distribution (requirement)
#942082
The text was updated successfully, but these errors were encountered: