Terrible audio quality after suspend, switching to Pipewire in dom0 does not work

I have problems with terrible sound quality after the laptop has been in sleep mode. I tried:
´qubes-dom0-update --switch-audio-server-to=pipewire´
But dom0 terminal spits out the answer:
´Another instance of qubes-dom0-update is already running!´
How can I solve this? I think I need to switch from pulseaudio to pipewire in dom0. How to install pipewire?

Maybe you had Qubes Update tool running or another ´qubes-dom0-update running in another terminal?
Try to run it again.

No qubes-dom0-update was running in another terminal and even after a restart the output is the same. Installing specific packages work without problem. So is there a way to install pipewire with another command? Which packages should be installed?

It’s a bug, I reported it here:

You can apply this patch in dom0 for it to work:

[user@dom0 ~]$ cat ~/qubes-dom0-update-patch 
206,212c206,214
< LOCKFILE="/var/run/qubes/qubes-dom0-update.lock"
< exec 9>"${LOCKFILE}"
< [ "$ID" == 0 ] && chgrp qubes "${LOCKFILE}" && chmod g+w "${LOCKFILE}"
< flock -n 9
< if [[ ${?} -ne 0 ]]; then
<     echo "Another instance of qubes-dom0-update is already running!"
<     exit 1
---
> if [ -n "$SWITCHING_AUDIO_IN_PROGRESS" ]; then
>     LOCKFILE="/var/run/qubes/qubes-dom0-update.lock"
>     exec 9>"${LOCKFILE}"
>     [ "$ID" == 0 ] && chgrp qubes "${LOCKFILE}" && chmod g+w "${LOCKFILE}"
>     flock -n 9
>     if [[ ${?} -ne 0 ]]; then
>         echo "Another instance of qubes-dom0-update is already running!"
>         exit 1
>     fi
[user@dom0 ~]$ sudo patch /usr/bin/qubes-dom0-update ~/qubes-dom0-update-patch
patching file /usr/bin/qubes-dom0-update

Okay, thank you, but if I type cat ~/qubes-dom0-update-patch , I get only: “File or directory not found”. What is to do here?

Thank you.

PR Submitted

Since copy/pasting patches to dom0 is a little bit hard, it might easier for you to do the patch manually. I submitted a smaller patch and you could apply it easily. Open the qubes-dom0-update script in dom0 with your favourite text editor (vim, nano, …) as root:

sudo vim /usr/bin/qubes-dom0-update

Go to line ~203 which should look like this (it might be few lines before or after line 203 in your machine):

if [[ ${?} -ne 0 ]]; then                                                                   
    echo "Another instance of qubes-dom0-update is already running!"                                                                
    exit 1                                                                                                                          
fi

And change it to

if [[ ${?} -ne 0 ]] && [[ ! $SWITCHING_AUDIO_IN_PROGRESS ]]; then        
........

Optional: Backup qubes-dom0-update before patching

p.s.: I included few lines after the condition to help you find it easily. Do not delete them. Only one line has to be patched (the if condition)

3 Likes

Thank you very much!

1 Like