You are not logged in.

#1 2024-06-04 16:47:25

Qvest
Member
Registered: 2024-06-04
Posts: 5

[SOLVED] Audio switches output devices with some pacman operations

Solved in post #2


Hello, some pacman operations (be it installing or removing packages, or upgrading packages) make my audio devices switch between each other (my laptop's sound and the headphones I have), and this also makes easy effects (installed through flatpak) "reset" my preset autoloading, so I have to manually open easy effects and re-enable autoloading otherwise, when changing between them, the presets will not switch, despite the fact I already enabled preset autoloading. This happens (from what I saw in the pacman output) when executing post-transaction hooks.

An example, uninstalling strawberry under kde plasma 6: (this also happens when installing the same package after uninstalling it)

 sudo pacman -Rs strawberry
verificando dependências...
:: upower requer opcionalmente usbmuxd: Read charge status of iOS devices
:: vlc requer opcionalmente aalib: ASCII art video output
:: vlc requer opcionalmente libcaca: colored ASCII art video output
:: vlc requer opcionalmente libshout: shoutcast/icecast output plugin
:: vlc requer opcionalmente twolame: TwoLAME mpeg2 encoder plugin

Pacotes (15) aalib-1.4rc5-18  cdparanoia-10.2-9  gst-plugins-base-1.24.3-1  gst-plugins-good-1.24.3-1
             imlib2-1.12.2-2  kdsingleapplication-1.1.0-1  libcaca-0.99.beta20-4  libebur128-1.2.6-1
             libgpod-0.8.3-15  libshout-1:2.4.6-2  sg3_utils-1.47-1  twolame-0.4.0-3  usbmuxd-1.1.1-3
             wavpack-5.7.0-1  strawberry-1.0.23-4

Tamanho total removido:  30,10 MiB

:: Deseja remover estes pacotes? [S/n] s
:: Executando hooks pré-transação...
(1/1) Removing old entries from the info directory file...
:: Processando alterações do pacote...
( 1/15) removendo strawberry                                       [####################################] 100%
( 2/15) removendo libgpod                                          [####################################] 100%
( 3/15) removendo usbmuxd                                          [####################################] 100%
( 4/15) removendo sg3_utils                                        [####################################] 100%
( 5/15) removendo libebur128                                       [####################################] 100%
( 6/15) removendo kdsingleapplication                              [####################################] 100%
( 7/15) removendo gst-plugins-good                                 [####################################] 100%
( 8/15) removendo wavpack                                          [####################################] 100%
( 9/15) removendo twolame                                          [####################################] 100%
(10/15) removendo libshout                                         [####################################] 100%
(11/15) removendo libcaca                                          [####################################] 100%
(12/15) removendo imlib2                                           [####################################] 100%
(13/15) removendo aalib                                            [####################################] 100%
(14/15) removendo gst-plugins-base                                 [####################################] 100%
(15/15) removendo cdparanoia                                       [####################################] 100%
:: Executando hooks pós-transação...
(1/5) Reloading system manager configuration...
(2/5) Reloading device manager configuration...
(3/5) Arming ConditionNeedsUpdate...
(4/5) Updating icon theme caches...
(5/5) Updating the desktop file MIME type cache... 

I don't know how to begin troubleshooting this specific issue. Pipewire Troubleshooting doesn't seem to have something similar and looking around the internet I haven't found anyone with this specific issue. Any help is appreciated and if needed, I can provide specific logs. Thank you for your time.

Last edited by Qvest (2024-06-04 17:55:31)

Offline

#2 2024-06-04 17:25:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: [SOLVED] Audio switches output devices with some pacman operations

That's a side effect of

(2/5) Reloading device manager configuration...

which lead udev rules getting retriggered which basically simulates all your devices getting replugged and relevant integrations getting retriggered.

I'm personally a strong proponent of not doing this, and it can be sidestepped with a

sudo touch /etc/systemd/do-not-udevadm-trigger-on-update

Some other refs https://gitlab.archlinux.org/archlinux/ … /issues/26 and https://bugs.archlinux.org/task/77789

Offline

#3 2024-06-04 17:43:19

Qvest
Member
Registered: 2024-06-04
Posts: 5

Re: [SOLVED] Audio switches output devices with some pacman operations

Reading through some of these threads, does this workaround causes major problems with the system? It seems that it would fix the problem but I didn't test it yet afraid of breaking it

Edit: just tested it and it solves the problem, and after a reboot it also works as expected. Should I be weary of anything regarding this fix?

Last edited by Qvest (2024-06-04 17:56:43)

Offline

#4 2024-06-05 07:38:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: [SOLVED] Audio switches output devices with some pacman operations

Generally, no. Unless you're on some "exotic" config it's technically possible that e.g. dm-raid configurations get a new property on update that they "need" to see reapplied. But I haven't yet seen any practical usecase or breakage resulting from this (I can see those potentially exist in some corner cases, but compared to the vast majority of potentially undesired interactions one triggers every time, doesn't justify it, IMO), and as mentioned in the gitlab thread, we're the only larger distribution that runs this command unconditionally. Fedora, Debian and Ubuntu all do not run this outside of the one systemd version that reccommended doing this.

It might be more usable/relevant if you care about uptime and keep your system running for months on end so that some udev changes accumulate without getting reapplied and they potentially getting expected on newer major versions... but you'll run into standard kernel updates where'll you'll reboot anyway much earlier in any normal cases.

Offline

#5 2024-06-06 22:53:16

Qvest
Member
Registered: 2024-06-04
Posts: 5

Re: [SOLVED] Audio switches output devices with some pacman operations

I see, thanks for your answer

Offline

Board footer

Powered by FluxBB