Sound resets to zero

Skybear

Active Member
Joined
Mar 7, 2026
Messages
201
Reaction score
157
Credits
1,591
The Output Volume resets to zero each time I restart Ubuntu. But I can turn the volume up and the speakers work just fine. I’ve googled the problem and the result don’t seem to fit this problem. There is an article where a guy had the same problem. But that only happened after he remotely helped his mom and I’ve never remotely connected to another computer from home
 


G'day Mike.

Is this Xubuntu in a VM you are talking about here? And is it with a host of Linux Mint?

If so, is it confined to the VM, or to both?

You may need to specify, in order to help others help you.

Nite (soon)

Chris
 
You’re right, Chris. Sorry about that.

VM = UTM 4.75
- machine = QEMU 10.0
- 64-bit

Ubuntu
- version 26.04 LTS

GNOME
- version 50
- Windowing system: Wayland


Xubuntu = ?

Please tell me if I need to add more.
 
Cwest, a member on the chat forum on the forum Learn Linxu TV (https://community.learnlinux.tv/) told me how to solve the problem. He is one smart guy.
Here are the directions he gave me:
  1. Create the directory to store the script.
    Code:
    mkdir -p ~/.local/bin
  2. Create the script. I used nano to create a file.
    Code:
    nano ~/.local/bin/set-volume.sh
  3. Copy the script below into the blank file you created above. To save the file use CTL + o and enter, then use CTL + x to exit:
    Code:
    #!/bin/bashsleep 3
    # Unmute the master hardware channel in ALSA
    amixer -q sset Master unmute
    # Set the digital volume scale to 80% via PipeWire
    wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.80
  4. Set the script to executable.
    Code:
    chmod +x ~/.local/bin/set-volume.sh
  5. Next create the directory for the autostart script. This will run the script we just created once you login to your Ubuntu session.
    Code:
    mkdir -p ~/.config/autostart
  6. Use nano again to create a file.
    Code:
    nano ~/.config/autostart/set-volume.desktop
  7. Copy this into the blank file:
    Code:
    [Desktop Entry]Type=Application
    Exec=/bin/bash -c “sh /home/$USER/.local/bin/set-volume.sh"
    Hidden=false
    NoDisplay=false
    X-GNOME-Autostart-enabled=true
    Name=Force Audio Volume
    Comment=Fixes UTM Apple Virtualization zero volume bug
  8. Do the same as above to save and quit nano. Now reboot your Ubuntu VM. Login and see if the volume is set to 80%.
Note: cwest cautioned to be careful when typing double-quotation marks: "Sometimes when copying code a standard quotation mark gets copied messing up the whole code.” I had to go back in, delete the first set of double-quotation marks”, re-type it, and then save the file.

There’s so much of this code that I don’t understand. I’m going to go through each line and research it. I heard once that getting an answer without knowing what it means doesn’t do you any good. I firmly believe that. So, this is a good learning experience that has practical relevance.
 
Last edited:


Follow Linux.org

Members online

No members online now.

Latest posts

Top