linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.4k stars 722 forks source link

Cinnamon Volume Control using a lot of Pulse Audio connections #12180

Open ukoda opened 2 weeks ago

ukoda commented 2 weeks ago

Distribution

Linux Mint 21.3 - from EDGE ISO

Package version

Cinnamon 6.0.4

Graphics hardware in use

i7-1355U with Intel Iris Xe Graphics

Frequency

Always

Bug description

After running for a long time Pulse Audio stopped accepting connections. Rebooting resolved the problem but using "pactl list clients" showed multiple "Cinnamon Volume Control" connections with the number increasing over time. After an uptime of 28 hours I am seeing 11 of these connections. I am assuming given enough time they will consume all Pulse Audio connections. Unsure what the "Cinnamon Volume Control" actually is and searching has not helped. I have the default sound applet on the default panel and an external USB volume control knob.

I realise this may be a Pulse Audio or Gnome issue but I'm starting here given the application name reported.

Steps to reproduce

Boot and run system as normal. Periodically use "pactl list clients | grep application.name" to check on how many applications are using Pulse Audio.

Expected behavior

I would expect Pulse Audio client connections to be stable over time depending on what apps I was running. I would expect to only see one or two instances of the "Cinnamon Volume Control" in the client connections.

Additional information

An snippet of the "pcatl list client" output for one connection:

Client #35999
    Driver: protocol-native.c
    Owner Module: 12
    Properties:
        application.name = "Cinnamon Volume Control"
        native-protocol.peer = "UNIX socket client"
        native-protocol.version = "35"
        application.id = "org.gnome.VolumeControl"
        application.icon_name = "multimedia-volume-control"
        application.version = "6.0.0"
        application.process.id = "1858"
        application.process.user = "david"
        application.process.host = "shigoto"
        application.process.binary = "cinnamon"
        application.language = "en_NZ.UTF-8"
        window.x11.display = ":0"
        application.process.machine_id = "946eaeb097784e6bbdfdac10384010a0"
        application.process.session_id = "c2"
ukoda commented 1 week ago

I got five days out of it before the problem reoccurred. Tried restarting Pulse Audio with no luck as the "Cinnamon Volume Control" connections remained at about 54. Maybe I'm not restarting Pulse Audio correctly. Regardless I had to reboot again. I'm running Linux, not Windows, so would prefer a solution that did involve a reboot. Next time I will try to force a Cinnamon restart without killing all my apps etc.

claudiux commented 1 week ago

Using pipewire instead of pulseaudio, I get this result:

$ pactl list clients | grep "application.name"
        application.name = "pipewire"
        application.name = "WirePlumber"
        application.name = "WirePlumber [export]"
        application.name = "Cinnamon Volume Control Media Keys"
        application.name = "xdg-desktop-portal"
        application.name = "speech-dispatcher-dummy"
        application.name = "Cinnamon Volume Control"
        application.name = "Radio Volume Control"
        application.name = "Cinnamon Volume Control"
        application.name = "Firefox"
        application.name = "pactl"

That seems normal.

ukoda commented 1 week ago

@claudiux Would 54 volume controls be consider normal? Basically it grows by about 10 a day until it breaks my system. I'm still wondering what "Cinnamon Volume Control" actually is? I am assuming it is not the one on the default panel as there is only one of those.

claudiux commented 1 week ago

It seems to me that one "Cinnamon Volume Control" is used to control the output device, and another one for the input device.

frantzmff commented 1 week ago

Would 54 volume controls be consider normal? Basically it grows by about 10 a day until it breaks my system. I'm still wondering what "Cinnamon Volume Control" actually is? I am assuming it is not the one on the default panel as there is only one of those.

I am also dealing with the exact same bug. It appears the "Cinnamon Volume Control" is the Sound applet which can be removed from the panel. Note after removing the Sound applet, I had to restart Cinnamon to kill all of these orphaned volume connections by running "cinnamon --replace" from the command line. I think you can use the PulseAudio Volume Control instead if needed.

Note I started a long thread about this issue here: https://forums.linuxmint.com/viewtopic.php?p=2465446#p2465446

ukoda commented 1 week ago

@frantzmff Thanks for that. Since I have a physical USB volume I have simply removed the sound applet from the panel. It looks good so far. If it stays ok I could close this issue with your post as the solution. However it is really only a work around, so I'm not sure if closing it is the right thing to do. While the problem is solved for me it is still going to bite other people until the root cause is found and fixed.

DirkHaar commented 1 week ago

can you change the title, Pulase to Pulse?

frantzmff commented 1 week ago

If it stays ok I could close this issue with your post as the solution. However it is really only a work around, so I'm not sure if closing it is the right thing to do. While the problem is solved for me it is still going to bite other people until the root cause is found and fixed.

@ukoda Please don't close it. This has been driving me crazy for months. It is a bug that needs to be fixed.

ukoda commented 1 week ago

@frantzmff It is 16 hours now and no bogus pulse audio connection, just what you would normally expect. So it looks like no more downtime dealing with it. Yes, I decided to leave the issue open as not everyone has the luxury of a hardware volume control and it should be fixed.

frantzmff commented 1 week ago

@ukoda Yes, I am currently over 20 hours with no issues. 48 hours is about the longest I lasted without audio breaking when the Cinnamon Volume Control was running.

There is a software alternative, the PulseAudio Volume Control, but it is an over-engineered, multi-tabbed monstrosity. The Cinnamon Volume Control should be fixed.

claudiux commented 1 week ago

PulseAudio will be replaced with Pipewire in LM22. There is a way to do that in LM21.3: https://linux.claudeclerc.fr/linuxaddict:astuces:pipewire (French language but you can translate it).

frantzmff commented 1 week ago

@claudiux Thanks. Now that I seem to have this working, I'd rather not mess around with Pipewire.

Qwinn1 commented 5 days ago

PulseAudio will be replaced with Pipewire in LM22. There is a way to do that in LM21.3: https://linux.claudeclerc.fr/linuxaddict:astuces:pipewire (French language but you can translate it).

This problem has been plaguing me too. And in my desperate attempt to stop it, I went ahead with those directions and replaced pulseaudio with pipewire.

Cinnamon still spawns multiple "Cinnamon Volume Control" connections. Doesn't fix the issue at all.

The good news is, I did find an easy way to deal with it. Just restart cinnamon. And the only thing you need to do for that is to hit Control-Alt-Escape. That's it. All the extra connections immediately disappear per pactl list clients

Still hope this gets fixed though. It remains an annoying bug regardless.

Qwinn1 commented 5 days ago

I just figured out what causes this issue.

Most of my boxes are on a KVM switch. And every single time I switch my KVM to a box, it causes that box to spawn another Cinnamon Volume Control connection. Easy to reproduce, once you know what's causing it.

For the record, I feed my sound through my HDMI cable to my monitor. That may well be a contributing factor, since the video is in fact being switched on and off when the kvm is employed.

frantzmff commented 5 days ago

@Qwinn1 I use a KVM on my computer but switching is not spawning new Cinnamon Volume Control connections for me. I just tested switching 5 times.

A separate issue is that I am noticing Spotify pulse audio connections slowly creeping up over time.

ukoda commented 5 days ago

For the sake of completeness I should mention I also use a KVM, but have not changed the system selection with it in a while. The extra Cinnamon Volume Controls connections were appearing even while the KVM was not changing.