View previous topic :: View next topic |
Author |
Message |
401990 n00b
Joined: 08 Apr 2020 Posts: 46
|
Posted: Sat May 30, 2020 6:31 pm Post subject: [Solved] Make ALSA work without udev. |
|
|
Hello, how can I get ALSA to work without udev?
At the moment the situation is this, ALSA works fine if udev is present and does not work if udev is disabled or removed, any attempt to play the sound leads to the error "cannon find card '0'", but at the same time, applications launched from the root perfectly detect the sound card, at first I thought that the problem may be easily solved by fixing the permissions for files in /dev/snd, by setting permissions to access these files for users from the "audio" group, but even so, ALSA still refuses to work with the error "cannon find card '0'".
I am in advance checked lsmod that the necessary modules were loaded and dmesg for the presence of suspicious messages, but everything is clean, I can not understand what does ALSA want.
Last edited by 401990 on Sat May 30, 2020 10:25 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54308 Location: 56N 3W
|
Posted: Sat May 30, 2020 7:01 pm Post subject: |
|
|
unknown_person,
I have not had udev or a udev substitute since 2013 and ALSA works for me.
udev fixes the permissions and makes symbolic links in dev.
What do you have in /proc/asound/devices
What does show?
What does groups show for your normal user? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
401990 n00b
Joined: 08 Apr 2020 Posts: 46
|
Posted: Sat May 30, 2020 9:05 pm Post subject: |
|
|
@NeddySeagoon:
cat /proc/asound/devices:
Code: | 0: [ 0] : control
16: [ 0- 0]: digital audio playback
19: [ 0- 3]: digital audio playback
24: [ 0- 0]: digital audio capture
33: : timer |
ls -l /dev/snd:
Code: | total 0
crw------- 1 root audio 116, 0 May 30 23:59 controlC0
crw------- 1 root audio 116, 24 May 30 23:59 pcmC0D0c
crw------- 1 root audio 116, 16 May 30 23:59 pcmC0D0p
crw------- 1 root audio 116, 19 May 30 23:59 pcmC0D3p
crw------- 1 root audio 116, 33 May 30 23:59 timer |
groups test:
Code: | wheel audio users test |
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54308 Location: 56N 3W
|
Posted: Sat May 30, 2020 9:30 pm Post subject: |
|
|
unknown_person,
ls -l /dev/snd: |
total 0
crw------- 1 root audio 116, 0 May 30 23:59 controlC0
crw------- 1 root audio 116, 24 May 30 23:59 pcmC0D0c
crw------- 1 root audio 116, 16 May 30 23:59 pcmC0D0p
crw------- 1 root audio 116, 19 May 30 23:59 pcmC0D3p
crw------- 1 root audio 116, 33 May 30 23:59 timer |
That's close. The audio group is correct, but the group has no access.
only allows the owner, root, read and write acces.
Code: | chmod 660 /dev/snd/* | should fix it.
That's
As your /dev is probably created by the kernels DEVTMPS, the changes will drop out when you reboot.
You can run a Gentoo with a static /dev, but i don't recommend it unless you can remember the days when that's all there was. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
401990 n00b
Joined: 08 Apr 2020 Posts: 46
|
Posted: Sat May 30, 2020 10:24 pm Post subject: |
|
|
@NeddySeagoon: Thank! Now ALSA and sound card detection works for regular applications.
And about resetting permissions after a reboot, I also solved this problem, wrote an init script, that after loading modules, through chown and chmod corrects permissions for files in /dev/snd. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54308 Location: 56N 3W
|
Posted: Sat May 30, 2020 11:11 pm Post subject: |
|
|
unknown_person,
Lots of other things will be broken in the same way, you just have not noticed yet.
Check your /dev/dri/ if yon have one.
The entries there should be 660 root video, much like /dev/snd.
When they are wrong you lose graphical acceleration. Xorg falls back to indirect rendering.
CDDA playback and optical disk burning will be affected.
I'm sure there are others. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
401990 n00b
Joined: 08 Apr 2020 Posts: 46
|
Posted: Sun May 31, 2020 9:20 am Post subject: |
|
|
@NeddySeagoon: About /dev/dri did not know, thanks for the help.
In any case, there’s no sense in fixing permissions for files in /dev/dri, hardware acceleration of 3D and 2D is disabled, because the video chip does not cope with this and LLVM render is not compiled (Сompiles for a very long time.).
And I know about fixing permissions for /dev/fb0 and /dev/sr* files. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|