1

Topic: Audio-issues and questions around ALSA and sndiod

Hello,

this thread is a conclusion and a forthcoming as result from the following threads:

https://forums.hyperbola.info/viewtopic.php?id=1078
https://forums.hyperbola.info/viewtopic.php?id=1079

So getting audio-issues working some tipps:

1. Please only test local running services / daemons with your root-account. Also including commands with the need for root-privileges are included here. But do not use normal applications using sound-interfaces with your root-account. Anytime doing that you only access exactly your root-account adding corresponding configurations but not for your local user-profile you may want to use common.

2. Control your group-memberships for your local user-profile. In the terminal use the following command:

groups

You need at minimum the following groups for most functions: sys, wheel, games, video, audio, optical, storage, input, users
Especially the groups video and audio are needed. The group wheel is mostly for opendoas. Rest is for the individual decision.

3. You can use sndio and ALSA at the same time without issues. But you need to check the used sound-device. Also you need to look on the used kernel-modules. So first use the command to enumerate more information loaded:

lspci -v

A possible example output:

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
    Subsystem: Lenovo ThinkPad T440p
    Flags: bus master, fast devsel, latency 0, IRQ 128
    Memory at 82838000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>
    Kernel modules: snd_hda_intel

You can see here that snd_hda_intel is the corresponding module loaded at runtime. Maybe you have more or different loaded, nevertheless the named modules are relevant for a further research with the next command:

aplay -l

4. You need to activate the services alsasound (package alsa-utils) and sndiod (package sndio) with:

doas rc-service alsasound start
doas rc-service sndiod start

You can also deactivate one service at a time to check working sound output. We have already many applications using sndiod per default but also others not being able to do this on GNU/Linux out of the existance of ALSA  and its interfaces. So for sound working you need surely both.

Please remember to activate both services on the runlevel default:

doas rc-update alsasound add default
doas rc-update sndiod add default

When you have issues with the audio-device current loaded, you need to modify your system-configuration to get it fully running and this should be surely possible. For example: The driver snd_hda_intel makes it possible to enable or disable a component you don't need. Especially HDMI-components can be error-prone and is false loaded, only working when you have a HDMI-device connected. So as said: You need to modify and reconfigure your system in that case before going further.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

2

Re: Audio-issues and questions around ALSA and sndiod

Thank you again for the help. Sorry about not following your nice tips and instructions better the first time.

I opened LXTerminal when using my cody/main/home/non_root account when using Lumina.

[cody@localhost ~]$ groups
sys uucp games network video audio optical storage input power users adbusers
[cody@localhost ~]$

I think I likely missed the wheel group when installing Hyperbola.

https://wiki.hyperbola.info/doku.php?id … redirect=1

Thank you for pointing out my mistakes. I should pay more attention to commands and instructions.

I can show the output of lspci -v
on this topic if you think I should.

[cody@localhost ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[cody@localhost ~]$

I now know, as you showed me I need to have the "wheel" group for mostly opendoas.
But I think I forgot to do it when I installed Hyperbola.
So I see

[cody@localhost ~]$ doas rc-service alsasound start
doas: Operation not permitted
[cody@localhost ~]$ doas rc-service sndiod start
doas: Operation not permitted
[cody@localhost ~]$

when using my non_root account.

I will try to pay more  attention to your commands/instructions/tips this time as what I do should do, so as not to use root for non root things.

So I'm not using my root account but my non_root account now.
As I do not wish to make those types of mistakes again.

As I see the "wheel" group is needed mostly for opendoas things, and I did not did not see that when I used groups
I also saw

[cody@localhost ~]$ doas rc-update alsasound add default
doas: Operation not permitted
[cody@localhost ~]$ doas rc-update sndiod add default
doas: Operation not permitted
[cody@localhost ~]$


Sorry about the new topic

https://forums.hyperbola.info/viewtopic … 8189#p8189

as I mostly was typing about how I made a large amount of mistakes when trying to help.

Like testing games with root account when I should not have, among other mistakes.

And turning on and off rc-service things with the root account, when that may cause more problems.

I know I may need the wheel group for my non_root account, but I do not wish to run things that would cause more problems, so I'm paying better attention to tips now.

I did unfortunately use my root account to use

ip link set wlp2s0 up

as well as

wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase "ssid" "psk")

and

dhcpcd wlp2s0

because in my main/non_root account I saw things like

[cody@localhost ~]$ ip link set wlp2s0 up
RTNETLINK answers: Operation not permitted
[cody@localhost ~]$

but that was the only way I at this time know how to connect to wifi.

I hope that does not affect this.

3

Re: Audio-issues and questions around ALSA and sndiod

Let's do step by step by step: First let's do this ...

doas usermod -aG wheel cody

With this you can better control your services smile

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

4

Re: Audio-issues and questions around ALSA and sndiod

throgh wrote:

Let's do step by step by step: First let's do this ...

doas usermod -aG wheel cody

With this you can better control your services smile

[cody@localhost ~]$ doas usermod -aG wheel cody
doas: Operation not permitted
[cody@localhost ~]$

I think my root account has "wheel" as I likely saw

If you want to access for updating:

# usermod -aG wheel <username>

So maybe that was why I added it to root, seeing I did not think a user account used wheel, as that may have been for system updates.

In the
https://wiki.hyperbola.info/doku.php?id … redirect=1
though my non_root account does not have "wheel" in a group.

So should I use my root for that command, or try some other way?

I think "doas" and/or "usermod" may be those "commands with the need for root-privileges " as shown before, though I just wished to make sure this time.

5

Re: Audio-issues and questions around ALSA and sndiod

No, root is surely root and has from start all accessible. No need to add groups. The commands listed are for your user-account, not for the root-account. It will make your work really better when you have access to more commands.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

6 (edited by Other_Cody 2024-07-13 19:33:58)

Re: Audio-issues and questions around ALSA and sndiod

I do not think the command added wheel to my user account.

[cody@localhost ~]$ doas usermod -aG wheel cody
doas: Operation not permitted
[cody@localhost ~]$ groups
sys uucp games network video audio optical storage input power users adbusers
[cody@localhost ~]$

Edited in

I'm using my user non_root account now.

7

Re: Audio-issues and questions around ALSA and sndiod

You need then to use root in that case: So then you need to execute the command under the root-user, in that case:

usermod -aG wheel cody

After that please reboot when all is accepted.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

8

Re: Audio-issues and questions around ALSA and sndiod

I used root. Powered off my computer. Used root again, after I turned my computer back on, to get wifi on, as my non_root showed something like

[cody@localhost ~]$ ip link set wlp2s0 up
RTNETLINK answers: Operation not permitted
[cody@localhost ~]$

as before, but now wheel is in my non_root account.

[cody@localhost ~]$ groups
sys wheel uucp games network video audio optical storage input power users adbusers
[cody@localhost ~]$

I'm also using my non_root account now.

9

Re: Audio-issues and questions around ALSA and sndiod

Should I use/see_if_it_works the two

doas rc-service alsasound start
doas rc-service sndiod start

commands in my user account now?

Or something else?

10

Re: Audio-issues and questions around ALSA and sndiod

No to get your network up I recommend to install and use dhcpcd. For this the following:

doas rc-update dhcpcd add default

You should execute also first time as it is not started for the moment:

doas dhcpcd

This will bring up your network and get a dhcp-lease from your router.
To use a concurrent connection later on:

doas pacman -S dhcpcd-ui

Starting therefore dhcpcd-gtk. Please note: This is only working when using the service dhcpcd. So it needs to run.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

11

Re: Audio-issues and questions around ALSA and sndiod

I pasted

doas rc-update dhcpcd add default

into my LXTerminal, pressed enter

and entered my root password, but saw

doas rc-update dhcpcd add default
doas (cody@localhost) password:
doas: Authorization failed

I saw using tkPacman that it shows a green name for dhcpcd, but dhcpcd-hardened-script and dhcpcd-ui both are shown in white.

Should I try entering my user account password for the password as at this time I'm using my user account? Or something else?

12 (edited by Other_Cody 2024-07-13 21:00:19)

Re: Audio-issues and questions around ALSA and sndiod

I can install programs with tkPacman with my root password.

Edited in

When using my user account, just had to type in my root password.

13

Re: Audio-issues and questions around ALSA and sndiod

See I cannot help you when your approach of managing your user-account and root is not working. You need to fix this first and understand why the authorization is not working. Wrong password? But this is exactly the point why I closed the thread before: You really need to get into the position to fix your problems first as other way the problems persist and you cannot support further as I can't support you.

Besides sorry: The command was wrong ... correcting.

doas rc-update add dhcpcd default
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

14

Re: Audio-issues and questions around ALSA and sndiod

I'm using my user account now. I just tried to use my root password, not my root account.

15

Re: Audio-issues and questions around ALSA and sndiod

What password should I use for that command.

I'm using my user account.

And I'm sorry for any problem I caused.

16

Re: Audio-issues and questions around ALSA and sndiod

Oh,

doas rc-update add dhcpcd default

not

doas rc-update dhcpcd add default

17 (edited by Other_Cody 2024-07-13 21:23:17)

Re: Audio-issues and questions around ALSA and sndiod

[cody@localhost ~]$ doas rc-update add dhcpcd default
doas (cody@localhost) password:
* service dhcpcd added to runlevel default

Edited in

doas dhcpcd

doas pacman -S dhcpcd-ui

also work.

18

Re: Audio-issues and questions around ALSA and sndiod

So now you have a dhcp-compliant connection next time booting. For running that now:

doas dhcpcd
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

19

Re: Audio-issues and questions around ALSA and sndiod

Now you should be able to bring up your network-connection without issues.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

20

Re: Audio-issues and questions around ALSA and sndiod

throgh wrote:

Now you should be able to bring up your network-connection without issues.

Thank you for helping.

21

Re: Audio-issues and questions around ALSA and sndiod

[cody@localhost ~]$ doas rc-service alsasound restart
doas (cody@localhost) password:
* Storing ALSA Mixer Levels ...                                          [ ok ]
* Restoring Mixer Levels ...                                             [ ok ]
[cody@localhost ~]$ doas rc-service sndiod restart
* Stopping sndiod ...                                                    [ ok ]
* Starting sndiod ...

All 3 programs, extreme tux racer, gweled, and teeworlds now work in my user account with sound and no segmentation fault.

22

Re: Audio-issues and questions around ALSA and sndiod

So we have solved your issue smile
You can really now report better as you can make a difference between where a service is running incorrect and a program is for real crashing on your user-account.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

23

Re: Audio-issues and questions around ALSA and sndiod

Thank you, throgh, for your time and patience in helping me.

24

Re: Audio-issues and questions around ALSA and sndiod

No problem, but this is a perfect example for being first very straight on the point and also ... never giving up. You cannot ruin anything and it fails? Just start again. Technical emancipation is waiting just around the corner.

Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!

25

Re: Audio-issues and questions around ALSA and sndiod

Just to point out: If you add yourself to the group "power" you do not even need to verify anything with your root-password after all. You just need to type:

doas poweroff

Or:

doas reboot

Just that you need:

doas usermod -aG power cody
Human being in favor with clear principles and so also for freedom in soft- and hardware!

Certainly anyone who has the power to make you believe absurdities has the power to make you commit injustices: For a life of every being full with peace and kindness, including diversity and freedom. Capitalism is destroying our minds, the planet itself and the universe in the end!