Two debian accounts and sound gets disabled in one of them

If none of the more specific forums is the right place to ask

Two debian accounts and sound gets disabled in one of them

Postby PsySc0rpi0n » 2021-03-15 15:00

Hello,

I have created an account on my Debian system for my daughter for her online classes but sometimes her account loses sound. She can't hear anything and I have to reboot my laptop so that she can have sound again.

I'm not even sure where to begin to debug the problem. I'm using alsamixer but everything looks good there.

Problem is that Zoom cannot prouce any sounds.
I already tried 'aplay' on an MP3 file and I can't also listen any music playing!
I can't hear anything from youtube either!

So, where can I start debugging and what can I do?
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Dai_trying » 2021-03-16 09:10

check the second user has group permissions set (just type groups from a terminal), check against your own user and add groups as required
Code: Select all
# usermod -aG <group> <user>


This may or may not be the problem but is has caught me out before so worth checking.
Dai_trying
 
Posts: 959
Joined: 2016-01-07 12:25

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-16 10:42

Dai_trying wrote:check the second user has group permissions set (just type groups from a terminal), check against your own user and add groups as required
Code: Select all
# usermod -aG <group> <user>


This may or may not be the problem but is has caught me out before so worth checking.


Her account sometimes have sound. All seems good, but for some reason, and I can't figure out if is there any time pattern, the sound is lost and when I am about to start Zoom or some other sound dependant application, there is no sound whatsoever.

But I'll will check for that. What you suggest is to give the same group permissions for the 2nd user as the 1st one? I'm not sure that will be relevant because I can have sound on that account, most of the times. This only happens some times. It's not a situation that is like that 100% of the time!


Edited;
Well, this second user is not in any groups. Should I add it to at least group 'audio'?
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Head_on_a_Stick » 2021-03-16 16:38

No, you shouldn't need to add the user to the audio group.

Check the output of these commands before and after the sound loss:
Code: Select all
pactl list short
amixer

Also check ~/.xsession-errors and the systemd journal for any clues.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Two debian accounts and sound gets disabled in one of th

Postby Dai_trying » 2021-03-17 09:11

Personally I would try adding the group(s) to see if it helps although as sound sometimes works and sometimes doesn't this might not help, and HOAS's advice is most likely a better way to go about this.
Dai_trying
 
Posts: 959
Joined: 2016-01-07 12:25

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-20 20:42

Ok, thanks peeps.

Will do when it happens again.
At this moment, my daughter account is not being used because they got back to school.
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-30 16:52

Head_on_a_Stick wrote:No, you shouldn't need to add the user to the audio group.

Check the output of these commands before and after the sound loss:
Code: Select all
pactl list short
amixer

Also check ~/.xsession-errors and the systemd journal for any clues.


Sound just gone off again at my daughter's account.
You suggested to run those commands as my login, my daughter's login or root?

This was with my daughter's login
Code: Select all
$ pactl list short
No protocol specified
xcb_connection_has_error() returned true
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 1001), but by uid 1000! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

$ amixer
No protocol specified
xcb_connection_has_error() returned true
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 1001), but by uid 1000! (This could e g happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 0 [0%] [-64.00dB] [off]
  Front Right: Playback 0 [0%] [-64.00dB] [off]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%] [0.00dB]
  Front Right: Playback 255 [100%] [0.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 64
  Mono:
  Front Left: Playback 64 [100%] [0.00dB] [on]
  Front Right: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 64
  Mono: Playback 64 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 28 [90%] [7.50dB] [on]
  Front Right: Playback 28 [90%] [7.50dB] [on]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 20 [65%] [-4.50dB] [on]
  Front Right: Playback 20 [65%] [-4.50dB] [on]
Simple mixer control 'Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',16
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 46 [100%] [30.00dB] [on]
  Front Right: Capture 46 [100%] [30.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 42 [91%] [26.00dB] [off]
  Front Right: Capture 42 [91%] [26.00dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Speaker Only' 'Line Out+Speaker'
  Item0: 'Line Out+Speaker'
Simple mixer control 'Channel Mode',0
  Capabilities: enum
  Items: '2ch' '4ch' '6ch'
  Item0: '2ch'
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Internal Mic' 'Mic' 'Line'
  Item0: 'Internal Mic'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Internal Mic' 'Mic' 'Line'
  Item0: 'Internal Mic'
Simple mixer control 'Internal Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 28 [90%] [7.50dB] [on]
  Front Right: Playback 28 [90%] [7.50dB] [on]
Simple mixer control 'Internal Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 1 [33%] [10.00dB]
  Front Right: 1 [33%] [10.00dB]
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'


and this is running the same command under my own account:
Code: Select all
$ pactl list short
0   module-device-restore      
1   module-stream-restore      
2   module-card-restore      
3   module-augment-properties      
4   module-switch-on-port-available      
5   module-udev-detect      
6   module-alsa-card   device_id="0" name="pci-0000_00_1b.0" card_name="alsa_card.pci-0000_00_1b.0" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1"   
7   module-native-protocol-unix      
8   module-default-device-restore      
9   module-rescue-streams      
10   module-always-sink      
11   module-intended-roles      
12   module-suspend-on-idle      
13   module-console-kit      
14   module-systemd-login      
15   module-position-event-sounds      
16   module-role-cork      
17   module-filter-heuristics      
18   module-filter-apply      
19   module-x11-publish   display=:0.0   
20   module-x11-cork-request   display=:0.0   
21   module-x11-xsmp   display=:0.0 session_manager=local/psyHost:@/tmp/.ICE-unix/1867,unix/psyHost:/tmp/.ICE-unix/1867   
0   alsa_output.pci-0000_00_1b.0.analog-stereo   module-alsa-card.c   s16le 2ch 44100Hz   RUNNING
0   alsa_output.pci-0000_00_1b.0.analog-stereo.monitor   module-alsa-card.c   s16le 2ch 44100Hz   IDLE
1   alsa_input.pci-0000_00_1b.0.analog-stereo   module-alsa-card.c   s16le 2ch 48000Hz   SUSPENDED
26   0   10   protocol-native.c   s16le 1ch 44100Hz
27   0   11   protocol-native.c   s16le 1ch 44100Hz
28   0   12   protocol-native.c   s16le 1ch 44100Hz
30   0   14   protocol-native.c   s16le 1ch 44100Hz
64   0   9   protocol-native.c   float32le 2ch 48000Hz
0   module-systemd-login.c   (null)
5   module-x11-xsmp.c   (null)
9   protocol-native.c   firefox-esr
10   protocol-native.c   sd_generic
11   protocol-native.c   sd_generic
12   protocol-native.c   sd_dummy
14   protocol-native.c   sd_espeak-ng
23   protocol-native.c   wrapper-2.0
27   protocol-native.c   pactl
0   alsa_card.pci-0000_00_1b.0   module-alsa-card.c

$ amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 65536 [100%] [on]
  Front Right: Playback 65536 [100%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 30421 [46%] [on]
  Front Right: Capture 30421 [46%] [on]
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Head_on_a_Stick » 2021-03-30 17:32

PsySc0rpi0n wrote:You suggested to run those commands as [...] my daughter's login [...]

^ This.

PsySc0rpi0n wrote:
Code: Select all
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 1001), but by uid 1000!

^ There's the problem. Have you forced XDG_RUNTIME_DIR somewhere?

Run this command as your daughter's user:
Code: Select all
grep -R XDG_RUNTIME_DIR ~

Ignore any binary file matches.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-30 17:41

Head_on_a_Stick wrote:
PsySc0rpi0n wrote:You suggested to run those commands as [...] my daughter's login [...]

^ This.

PsySc0rpi0n wrote:
Code: Select all
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 1001), but by uid 1000!

^ There's the problem. Have you forced XDG_RUNTIME_DIR somewhere?


Not that I know of.
Head_on_a_Stick wrote:
PsySc0rpi0n wrote:Run this command as your daughter's user:
Code: Select all
grep -R XDG_RUNTIME_DIR ~

Ignore any binary file matches.


Ok.
Is that command supposed to take several minutes to complete? It's still running as I write this message!
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Head_on_a_Stick » 2021-03-30 17:44

Yeah, it might take a while. I see you shiver with antici...
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-30 17:55

Head_on_a_Stick wrote:Yeah, it might take a while. I see you shiver with antici...


That's me regarding my Linux skills! :(
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-30 18:38

It still didn't return the prompt to me.
Maybe it hang up in the command?
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Head_on_a_Stick » 2021-03-31 14:40

Hmm, probably a stupid idea anyway.

Is the login session correct?
Code: Select all
loginctl session-status

And can we also see
Code: Select all
echo $XDG_RUNTIME_DIR

(Both commands as your daughter's user.)
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Two debian accounts and sound gets disabled in one of th

Postby PsySc0rpi0n » 2021-03-31 17:03

Head_on_a_Stick wrote:Hmm, probably a stupid idea anyway.

Is the login session correct?
Code: Select all
loginctl session-status



Code: Select all
$ loginctl session-status
2 - psysc0rpi0n (1000)
           Since: Tue 2021-03-30 22:40:23 WEST; 20h ago
          Leader: 1741 (lightdm)
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: lightdm-xsession
           State: active
            Unit: session-2.scope


and:

Code: Select all
2 - psysc0rpi0n (1000)
           Since: Tue 2021-03-30 22:40:23 WEST; 20h ago
          Leader: 1741 (lightdm)
            Seat: seat0; vc7
         Display: :0
         Service: lightdm; type x11; class user
         Desktop: lightdm-xsession
           State: active
            Unit: session-2.scope


I trimmed some of the output which lists all active processes, I think. Do you need to see the complete output? If so, I'll paste it somewhere online.
Head_on_a_Stick wrote:And can we also see
Code: Select all
echo $XDG_RUNTIME_DIR

(Both commands as your daughter's user.)


Code: Select all
$ echo $XDG_RUNTIME_DIR
/run/user/1000


I ran both commands after logging in into my daughter's account with:
Code: Select all
su my_daughter_username
User avatar
PsySc0rpi0n
 
Posts: 259
Joined: 2012-10-24 13:54
Location: Portugal

Re: Two debian accounts and sound gets disabled in one of th

Postby Head_on_a_Stick » 2021-03-31 17:53

PsySc0rpi0n wrote:I ran both commands after logging in into my daughter's account with:
Code: Select all
su my_daughter_username

No, that won't work. Log out of your user completely then log into your daughter's user from the display manager (or from the TTY).
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13450
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable