Based on ubuntu20.04/JP5.02, we found the volume of sound cannot be adjusted in root mode.
Here is the step to duplicate this issue:
Plug in earphone
Play video in root mode.
Adjust the volume through the sound icon at top-right screen
if in user mode:
$ aplay /usr/lib/libreoffice/share/gallery/sounds/gong.wav
the volume can be adjusted by system top-right volume setting menu.
However, if in root mode,
$ sudo aplay /usr/lib/libreoffice/share/gallery/sounds/gong.wav
the volume cannot be change.
Could you please help to check such issue? Thanks.
I thought so at first, while, i did the same test on JP4.5.1, the volume can be adjusted.
Here is groups display on JP4.5.1/ubuntu 18.04 OS.
$ groups
test adm cdrom sudo audio dip video plugdev i2c lpadmin gdm lightdm sambashare weston-launch gpio
I’m not really an audio person, but generally speaking, are you using a GUI app to reduce volume? Or command line? What is your exact method, and if you watch “dmesg --follow” while changing volume, is there any message? If command line, does it show any error logged? I would expect that if it is a permissions problem there might be a different log message or error compared to something else.
command ‘pactl’ can’t change the volume.
Playing wav in urser mode or root mode, there’s no difference or permission message show when watching kernel log by command “dmesg --follow”.
What I found is ‘pulseaudio’ component can’t be run as root.
sudo pulseaudio
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
Is the problem solved then by not running as root/sudo? If you must run as root, then consider root can use sudo to become a regular user without any password. That user could be a “dummy” account used only for audio playback.
It’s not really reqirement in root mode. Just found such issue, we want to clarify it’s OS pulseaudio in ubuntu 20.04 worked as design or not. As you know, JP4.5.1 or JP4.6.2/ubuntu 18.04 has not such issue. Thanks.