Mailing List Archive

alsamixer - no sound
After recent upgrade I have no sound.

Running as root: alsamixer
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)

Does dir: /run/user/1000
should be own by "root:root" or user on the system?

When I run:
chown root:root /run/user/1000

alsamixer
ALSA lib /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied

cannot open mixer: Connection refused

--
Thelma
Re: alsamixer - no sound [ In reply to ]
On 12/16/23 13:19, thelma@sys-concept.com wrote:
> After recent upgrade I have no sound.
>
> Running as root:  alsamixer
> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>
> Does dir: /run/user/1000
> should be own by "root:root"  or user on the system?
>
> When I run:
> chown root:root /run/user/1000
>
> alsamixer
> ALSA lib /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied
>
> cannot open mixer: Connection refused

entering root with: "su -"
doesn't produce any errors but running "alsamixer" "F6" does not preserve setting for default sound card "default: 1"
"alsactl store" - does not preserve it either.
Re: alsamixer - no sound [ In reply to ]
What happens as root running:
What happens running:
alsactl init;amixer set Master 100% unmute;alsactl store
Using screen readers on linux systems I've had a few of these problems
from time to time.

--
Jude <jdashiel at panix dot com>
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo.
Please use in that order."
Ed Howdershelt 1940.

On Sat, 16 Dec 2023, thelma@sys-concept.com wrote:

> On 12/16/23 13:19, thelma@sys-concept.com wrote:
> > After recent upgrade I have no sound.
> >
> > Running as root:  alsamixer
> > XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
> >
> > Does dir: /run/user/1000
> > should be own by "root:root"  or user on the system?
> >
> > When I run:
> > chown root:root /run/user/1000
> >
> > alsamixer
> > ALSA lib
> > /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect)
> > PulseAudio: Unable to connect: Access denied
> >
> > cannot open mixer: Connection refused
>
> entering root with: "su -"
> doesn't produce any errors but running "alsamixer" "F6" does not preserve
> setting for default sound card "default: 1"
> "alsactl store" - does not preserve it either.
>
>
>
>
>
Re: alsamixer - no sound [ In reply to ]
On 12/16/23 14:11, Jude DaShiell wrote:
> What happens as root running:
> What happens running:
> alsactl init;amixer set Master 100% unmute;alsactl store
> Using screen readers on linux systems I've had a few of these problems
> from time to time.
>
> --
> Jude <jdashiel at panix dot com>
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo.
> Please use in that order."
> Ed Howdershelt 1940.
>
> On Sat, 16 Dec 2023, thelma@sys-concept.com wrote:
>
>> On 12/16/23 13:19, thelma@sys-concept.com wrote:
>>> After recent upgrade I have no sound.
>>>
>>> Running as root:  alsamixer
>>> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>>>
>>> Does dir: /run/user/1000
>>> should be own by "root:root"  or user on the system?
>>>
>>> When I run:
>>> chown root:root /run/user/1000
>>>
>>> alsamixer
>>> ALSA lib
>>> /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect)
>>> PulseAudio: Unable to connect: Access denied
>>>
>>> cannot open mixer: Connection refused
>>
>> entering root with: "su -"
>> doesn't produce any errors but running "alsamixer" "F6" does not preserve
>> setting for default sound card "default: 1"
>> "alsactl store" - does not preserve it either.

alsactl init;amixer set Master 100% unmute;alsactl store
Found hardware: "HDA-Intel" "Nvidia GPU 80 HDMI/DP" "HDA:10de0080,38426157,00100100" "0x3842" "0x6157"
Hardware is initialized using a generic method
Found hardware: "HDA-Intel" "Realtek ALC1220" "HDA:10ec1168,10438733,00100101" "0x1043" "0x8733"
Hardware is initialized using a generic method
amixer: Unable to find simple control 'Master',0

I can not seem to store/preserve the settings to: "default: 1"
Re: alsamixer - no sound [ In reply to ]
so 16. 12. 2023 v 21:20 odesílatel <thelma@sys-concept.com> napsal:
>
> After recent upgrade I have no sound.
>
> Running as root: alsamixer
> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>
> Does dir: /run/user/1000
> should be own by "root:root" or user on the system?
>
> When I run:
> chown root:root /run/user/1000
>
> alsamixer
> ALSA lib /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied
>
> cannot open mixer: Connection refused
>
> --
> Thelma
>
are you logged in as your normal non-root user? If yes, don't run
alsamixer as root, but just as your normal user.

--
May the Force be with you,
Vít Smolík.
Re: alsamixer - no sound [ In reply to ]
On 12/16/23 15:02, Vít Smolík wrote:
> so 16. 12. 2023 v 21:20 odesílatel <thelma@sys-concept.com> napsal:
>>
>> After recent upgrade I have no sound.
>>
>> Running as root: alsamixer
>> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>>
>> Does dir: /run/user/1000
>> should be own by "root:root" or user on the system?
>>
>> When I run:
>> chown root:root /run/user/1000
>>
>> alsamixer
>> ALSA lib /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Access denied
>>
>> cannot open mixer: Connection refused
>>
>> --
>> Thelma
>>
> are you logged in as your normal non-root user? If yes, don't run
> alsamixer as root, but just as your normal user.

If I run alsamiser as user, it allows me to select card with "F6" to: "default: 1"
but pressing ESC, the setting are not preserved,

"alsactl store" - does not preserve it either.

I have: media-sound/alsa-utils installed but I don't seem any files on the system:

/etc/asound.conf - Global (system wide) configuration file.
~/.asoundrc - Local (per user) configuration file.
Re: alsamixer - no sound [ In reply to ]
On Sat, 16 Dec 2023 13:19:30 -0700
thelma@sys-concept.com wrote:

> After recent upgrade I have no sound.

This seems like something that just happens, so that's not that
unusual.

> Running as root: alsamixer
> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)

I'm sure you have an answer that says this, but this message says it
all, though maybe a bit obscurely... The directory `/run/user/1000` is
not owned by the user ID `(uid 0)` but by `uid 1000`. You are running
the command as uid 0, or root. Which you acknowledge you're doing. It
says the important thing at the end `Don't do that.`.

You need to run it as the user who is logged in to X (or Wayland).

> Does dir: /run/user/1000
> should be own by "root:root" or user on the system?

This is a temporary directory which is created on login (I believe
that's when it gets created). Don't change the ownership of it. The
problem is the user you are running the command as, isn't correct.

> When I run:
> chown root:root /run/user/1000
>
> alsamixer
> ALSA lib
> /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect)
> PulseAudio: Unable to connect: Access denied

Probably because your user 1000 is trying to access something that only
root can access. But it's not entirely clear. The changing ownership
of /run/user/1000 to root, will break *lots* of things. Especially
don't do that.

> cannot open mixer: Connection refused

I hope you got this sorted.
Re: alsamixer - no sound [ In reply to ]
On 12/16/23 16:03, Jigme Datse wrote:
> On Sat, 16 Dec 2023 13:19:30 -0700
> thelma@sys-concept.com wrote:
>
>> After recent upgrade I have no sound.
>
> This seems like something that just happens, so that's not that
> unusual.
>
>> Running as root: alsamixer
>> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>
> I'm sure you have an answer that says this, but this message says it
> all, though maybe a bit obscurely... The directory `/run/user/1000` is
> not owned by the user ID `(uid 0)` but by `uid 1000`. You are running
> the command as uid 0, or root. Which you acknowledge you're doing. It
> says the important thing at the end `Don't do that.`.
>
> You need to run it as the user who is logged in to X (or Wayland).
>
>> Does dir: /run/user/1000
>> should be own by "root:root" or user on the system?
>
> This is a temporary directory which is created on login (I believe
> that's when it gets created). Don't change the ownership of it. The
> problem is the user you are running the command as, isn't correct.
>
>> When I run:
>> chown root:root /run/user/1000
>>
>> alsamixer
>> ALSA lib
>> /var/tmp/portage/media-plugins/alsa-plugins-1.2.7.1-r1/work/alsa-plugins-1.2.7.1/pulse/pulse.c:242:(pulse_connect)
>> PulseAudio: Unable to connect: Access denied
>
> Probably because your user 1000 is trying to access something that only
> root can access. But it's not entirely clear. The changing ownership
> of /run/user/1000 to root, will break *lots* of things. Especially
> don't do that.
>
>> cannot open mixer: Connection refused
>
> I hope you got this sorted.

Yes, I changed back
chown user:user /run/user/1000

I run:
chmod o+w /var/lib/alsa/asound.state

but still can not save setting, running "alsamixer" as user will
I can select correct sound card but pressing escape does not preserve the changes.

Besides in message log I see:

[pulseaudio] protocol-native.c: Denied access to client with invalid authentication data.
pulseaudio[28829]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
pulseaudio[30032]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
pulseaudio[4497]: [pulseaudio] x11wrap.c: X11 I/O error handler called
pulseaudio[4497]: [pulseaudio] x11wrap.c: X11 I/O error exit handler called, preparing to tear down X11 modules
Re: alsamixer - no sound [ In reply to ]
On 2023-12-16, thelma@sys-concept.com wrote:

> After recent upgrade I have no sound.
>
> Running as root: alsamixer
> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)

What kind of audio config do you have? Is it expected to involve
PulseAudio?

What was upgraded?

--
Nuno Silva
Re: Re: alsamixer - no sound [ In reply to ]
On 12/16/23 16:33, Nuno Silva wrote:
> On 2023-12-16, thelma@sys-concept.com wrote:
>
>> After recent upgrade I have no sound.
>>
>> Running as root: alsamixer
>> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>
> What kind of audio config do you have? Is it expected to involve
> PulseAudio?
>
> What was upgraded?

I have sound!

But the scary thing is I don't know what fix it and running as user: alsamixer still does not allow me to save default sound card
I select with F6.
I remember in the past the selection I selected with "F6" stayed as default, not this time!

I updated entire system, last time I did an update was sometime in July this year, so 500+ were rebuild a day ago.

I think my system is using "alsasound" as I see it in rc-update show
but I see I have: "media-sound/pulseaudio" installed as well.

aplay -L (show):

null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
hdmi:CARD=NVidia,DEV=0
HDA NVidia, HDMI 0
HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
HDA NVidia, HDMI 1
HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
HDA NVidia, HDMI 2
HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
HDA NVidia, HDMI 3
HDMI Audio Output
usbstream:CARD=NVidia
HDA NVidia
USB Stream Output
sysdefault:CARD=Generic
HD-Audio Generic, ALC1220 Analog
Default Audio Device
front:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
Front output / input
surround21:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
HD-Audio Generic, ALC1220 Digital
IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=Generic
HD-Audio Generic
USB Stream Output

I have: media-sound/alsa-utils installed
but no configuration file:

/etc/asound.conf - Global (system wide) configuration file.
~/.asoundrc - Local (per user) configuration file.

Which package create the above configuration files?
Re: Re: alsamixer - no sound [ In reply to ]
On 12/16/23 16:33, Nuno Silva wrote:
> On 2023-12-16, thelma@sys-concept.com wrote:
>
>> After recent upgrade I have no sound.
>>
>> Running as root: alsamixer
>> XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), 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.)
>
> What kind of audio config do you have? Is it expected to involve
> PulseAudio?
>
> What was upgraded?

File: asound.conf is generated by package: media-plugins/alsa-plugins
but I don't have this file???

Am I missing use-flag?

[I] media-plugins/alsa-plugins
Available versions: 1.2.7.1-r1 {arcam_av debug ffmpeg jack libsamplerate +mix oss pulseaudio speex +usb_stream ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
Installed versions: 1.2.7.1-r1(03:51:50 AM 04/15/2023)(mix pulseaudio usb_stream -arcam_av -debug -ffmpeg -jack -libsamplerate -oss -speex ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
Re: alsamixer - no sound [ In reply to ]
On 17/12/2023 01:54, thelma@sys-concept.com wrote:
> But the scary thing is I don't know what fix it and running as user:
> alsamixer still does not allow me to save default sound card
> I select with F6.

You don't set a "default sound card" with F6. All that does is simply
allow you to see the mixer controls of a different sound card.

You set your default sound card by using your desktop environment audio
settings. In KDE, I click on the speaker tray icon and there I can
select my default sound card and default microphone:

https://i.imgur.com/Lz3Bfyk.png

Surely there's something similar in the desktop environment you're using.
Re: Re: alsamixer - no sound [ In reply to ]
On 12/16/23 20:00, Nikos Chantziaras wrote:
> On 17/12/2023 01:54, thelma@sys-concept.com wrote:
>> But the scary thing is I don't know what fix it and running as user: alsamixer still does not allow me to save default sound card
>> I select with F6.
>
> You don't set a "default sound card" with F6. All that does is simply allow you to see the mixer controls of a different sound card.
>
> You set your default sound card by using your desktop environment audio settings. In KDE, I click on the speaker tray icon and there I can select my default sound card and default microphone:
>
>   https://i.imgur.com/Lz3Bfyk.png
>
> Surely there's something similar in the desktop environment you're using.

If I remember correctly, running
alsamixer - allows you select certain cards, ESC exits

alsactl store - would write the setting to a file, under user it would be ~/.asoundrc (I could be wrong). But in my case "alsactl store" doesn't do anything, It opens "master" setting single bar setting.

Next time I would open "alsamixer" it would open on the last card I was viewing. I was long line since I played with these setting, so I could be wrong.

I'm using XFCE but did not emerge any special packages for sound control.
Re: Re: alsamixer - no sound [ In reply to ]
>If I remember correctly, running
>alsamixer - allows you select certain cards, ESC exits
>
>alsactl store - would write the setting to a file, under user it would be ~/.asoundrc (I could be wrong). But in my case "alsactl store" doesn't do anything, It opens "master" setting single bar setting.

From `man 1 alsactl`:

```
store <card>
This command saves the current driver state for the selected soundcard
to the configuration file.
[…]
FILES
/var/lib/alsa/asound.state (or whatever file you specify with the -f flag)
is used to store current settings for your soundcards. The settings include
all the usual soundcard mixer settings.
```

~/.asoundrc is your hand-edited card configuration (including which one is your
primary soundcard, and /var/lib/alsa/asound.state contains the mixer settings
for your cards, i.e. the volume levels. The latter is written by `alsactl
store` and is owned by root, so your user has nothing to do with it. It’s
usually read once at startup and written at shutdown to preserve sound volume
between reboots.

This is most likely not the file you want to edit, and `alsactl store` is not
the command you want to run, unless I misunderstood your issue.

Hoël