You are not logged in.

#1 2004-11-29 21:23:26

jeroenv
Member
Registered: 2004-11-29
Posts: 36

alsa modules ok but no devices??? [solved]

Hi, as an experienced archlinux user (i.e. since 0.3)  i decided to jump on the udev bandwagon today.
Everything works ok but there's no sound. I dug through every related forum message, read the wiki's, did some googling, reran alsaconf (everything worked ok before), installed the alsamixer script, added audio group to my user, rebooted a couple of times in the proces (which is against my religion).

Anyway, with lsmod, everything shows up:

pulse:/home/jeroen> lsmod | grep snd
snd_via82xx            28836  0
snd_mpu401_uart         8704  1 snd_via82xx
snd_ens1371            24548  0
snd_rawmidi            26276  2 snd_mpu401_uart,snd_ens1371
snd_seq_device          8456  1 snd_rawmidi
snd_pcm_oss            56488  0
snd_mixer_oss          21376  1 snd_pcm_oss
snd_pcm               101508  3 snd_via82xx,snd_ens1371,snd_pcm_oss
snd_timer              27140  1 snd_pcm
snd_page_alloc         10248  2 snd_via82xx,snd_pcm
snd_ac97_codec         73808  2 snd_via82xx,snd_ens1371
snd                    58980  10 snd_via82xx,snd_mpu401_uart,snd_ens1371,snd_raw
midi,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_ac97_codec
soundcore              10848  1 snd
gameport                5120  2 snd_via82xx,snd_ens1371

Yes, there are two cards there, one soundblaster pci64 and the onboard VIA thing. ALSA also shows up in /proc:

pulse:/proc/asound> ls -l
total 2
lrwxrwxrwx  1 root root 5 2000-11-29 22:07 AudioPCI -> card0
dr-xr-xr-x  6 root root 0 2000-11-29 22:07 card0
dr-xr-xr-x  5 root root 0 2000-11-29 22:07 card1
-r--r--r--  1 root root 0 2000-11-29 22:07 cards
-r--r--r--  1 root root 0 2000-11-29 22:07 devices
-r--r--r--  1 root root 0 2000-11-29 22:07 modules
dr-xr-xr-x  2 root root 0 2000-11-29 22:07 oss
-r--r--r--  1 root root 0 2000-11-29 22:07 pcm
lrwxrwxrwx  1 root root 5 2000-11-29 22:07 rev50 -> card1
dr-xr-xr-x  2 root root 0 2000-11-29 22:07 seq
-r--r--r--  1 root root 0 2000-11-29 22:07 timers
-r--r--r--  1 root root 0 2000-11-29 22:07 version

However, nothing shows up in /dev/snd or /dev/sound, in fact these directories didn't show up either until i mkdir'd them in rc.local.

What (the ...) could be wrong???

Offline

#2 2004-11-30 00:33:02

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: alsa modules ok but no devices??? [solved]

this is strange, my sound worked without fuss in udev directly,
there is no need for mkdir in udev, that's automatic,

try to remove all that alsaconf stuff and try to modprobe the main sound modules one by one and see if the cards show up,


arch + gentoo + initng + python = enlisy

Offline

#3 2004-11-30 19:36:09

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

xerxes2 wrote:

this is strange, my sound worked without fuss in udev directly,
there is no need for mkdir in udev, that's automatic,

try to remove all that alsaconf stuff and try to modprobe the main sound modules one by one and see if the cards show up,

I just tried that but still nothing  sad
I'm beginning to wonder if i (or Linux for that matter) wouldn't be better of with just a bunch of nodes in an oldfashioned /dev directory instead of messing about with udev of devfs.

Offline

#4 2004-11-30 19:44:28

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

xerxes2 wrote:

this is strange, my sound worked without fuss in udev directly,
there is no need for mkdir in udev, that's automatic,

try to remove all that alsaconf stuff and try to modprobe the main sound modules one by one and see if the cards show up,

As your stuff is working, can you give me your modprobe.conf file?

Offline

#5 2004-11-30 21:05:12

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: alsa modules ok but no devices??? [solved]

i don't use modprobe.conf
i use the modules array in rc.conf instead,
also try to remove hotplug from the daemons array and see if that helps,


arch + gentoo + initng + python = enlisy

Offline

#6 2004-12-01 22:01:06

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

Thanks for the replies for now. I'll continue next weekend...

Offline

#7 2004-12-02 18:25:38

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

I just found out that running udevstart as root creates all the devices i needed. It works because the complete alsa information is present in the /sys filesystem (because the modules loaded just fine). So, at least i have a workaround to play my music again. smile

But the problem remains: udev does not create the devices automatically after a reboot.
Also, there are no sound entries in the /dev/.udevdb directory, i.e. not until i run udevstart.
Why could it be working everywhere except on my system???

Offline

#8 2004-12-02 18:45:45

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: alsa modules ok but no devices??? [solved]

are you /etc/udev/rules.d and /etc/udev/permissions.d files setup properly?  there was a newsletter article about it...
mine worked fine.

the other possible problem may be that you are not loading the modules in the MODULES array... for some reason udev may need that... try your modules there and not in modprobe.conf...

stupid question, but you do have the "devfs=nomount" boot parameter, correct?

Offline

#9 2004-12-02 19:12:24

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

phrakture wrote:

are you /etc/udev/rules.d and /etc/udev/permissions.d files setup properly?  there was a newsletter article about it...
mine worked fine.

the other possible problem may be that you are not loading the modules in the MODULES array... for some reason udev may need that... try your modules there and not in modprobe.conf...

stupid question, but you do have the "devfs=nomount" boot parameter, correct?

yes, the rules and permissions are as installed by pacman and i ran pacman -Syu this evening. They use the audio group in addition to root. And after udevstart the devices look like this:

[pulse:/dev/snd] ls -l
total 0
crw-rw----  1 root audio 116,  0 2004-12-02 19:15 controlC0
crw-rw----  1 root audio 116, 32 2004-12-02 19:15 controlC1
crw-rw----  1 root audio 116,  8 2004-12-02 19:15 midiC0D0
crw-rw----  1 root audio 116, 24 2004-12-02 19:15 pcmC0D0c
crw-rw----  1 root audio 116, 16 2004-12-02 19:15 pcmC0D0p
crw-rw----  1 root audio 116, 17 2004-12-02 19:15 pcmC0D1p
crw-rw----  1 root audio 116, 56 2004-12-02 19:15 pcmC1D0c
crw-rw----  1 root audio 116, 48 2004-12-02 19:15 pcmC1D0p
crw-rw----  1 root audio 116, 33 2004-12-02 19:15 timer

And Gregory Isaacs plays just fine on my stereo right now.

the modules line in rc.conf looks ok to me:

[pulse:/root] grep MODULES /etc/rc.conf
MODULES=(!usbserial sr_mod 8139too i2c-isa via686a uhci-hcd usb-storage snd-ens1371 snd-via82xx snd-pcm-oss nvidia)

And indeed, i added devfs=nomount to lilo.conf (and there's no devfs mounted).

Everything looks ok but still after a reboot, no alsa devices
:?

Offline

#10 2004-12-02 19:49:10

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: alsa modules ok but no devices??? [solved]

hmmm after a reboot, check your lsmod output... run udevstart and check the same.. are there any differences?
I don't know much about the via sound chipset... but I know for mine if I probe 2 sound modules it gets goofed and doesn't work right....

do you have hotplug in the DAEMONS array?  For me it loads snd-intel8x0m which doesn't work, while snd-intel8x0 does.... with udev the hotplug boot daemon is not needed

Offline

#11 2004-12-02 20:35:44

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

phrakture wrote:

hmmm after a reboot, check your lsmod output... run udevstart and check the same.. are there any differences?
I don't know much about the via sound chipset... but I know for mine if I probe 2 sound modules it gets goofed and doesn't work right....

do you have hotplug in the DAEMONS array?  For me it loads snd-intel8x0m which doesn't work, while snd-intel8x0 does.... with udev the hotplug boot daemon is not needed

No, lsmod exactly matches before and after. I didn't expected it to, udev only runs through /sys again to find the current hardware devices numbers (which it needs for mknod). I also tried to reboot with only one card (the es1371) but that also made no difference.

Here's what i make of it. UDEV is started right after the booting of the kernel. I think UDEV then builds its database (in /dev/.udevdb/). But right after the kernel boots, the modules are not loaded yet. So the udev database is incomplete. The database doubles in size after running udevstart and only then it includes the audio classes (e.g. 'class@sound@dsp'). Without these classes, udev has no way to determine what nodes to make. But that is just what i think.

But all this doesn't explain why it seems to be working for most other systems. I'll continue in the weekend...

Offline

#12 2004-12-02 21:13:56

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: alsa modules ok but no devices??? [solved]

oh you have 2 cards... hmmm if ya feel up to it, try removing one of them and only using one... see if udev possibly has a problem with 2 audio devices

Offline

#13 2004-12-02 21:20:17

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: alsa modules ok but no devices??? [solved]

I'd be willing to bet this is a coldplugging issue.  Check where hotplug is listed in your DAEMONS variable and whether it's listed at all.  Moving it around or adding it will fix your problem.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#14 2004-12-03 09:53:49

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

I forgot to mention, i have no hotplug installed. Never have. But maybe i should.
As for using just one soundcard, tried that, read my previous posting.

Offline

#15 2004-12-05 12:09:57

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

First of all i have to say i'm very glad i decided to switch to archlinux two years ago. Everything is layed out plain and simple in just a few files. With Mandrake/Suse/Redhat everything is hidden under a suffocating blanket of scripts and stuff.

Apparently /etc/start_udev is ran from /etc/rc.sysinit right after mounting the /sys filesystem. As there are no kernel modules loaded yet (which is done later at the end of /etc/rc.sysinit), i fail to see how the alsa device nodes thing is ever gonna work. This is also the reason why the nvidia device nodes need to be created by hand in rc.local (which is ran after rc.sysinit in rc.multi).

So here's my solution, i removed all the nvidia device create stuff from rc.local and replaced it with a single elegant line: /sbin/udevstart
This not only takes care of the absent nvidia devices but also my alsa devices. I'm happy with this solution.

There's just one thing left i don't understand, how can this work for most other people. Something must preload the alsa modules before /etc/start_udev is started.

But with Fly by Night from Rush coming from my stereo, i'm happy  smile

Offline

#16 2004-12-05 14:51:31

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: alsa modules ok but no devices??? [solved]

you don't have to load modules before udev starts,

it's just a modprobe command, you can do it anytime,


arch + gentoo + initng + python = enlisy

Offline

#17 2004-12-05 18:11:01

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

I know that i can run modprobe any time to (un)load modules.

The point is that /sbin/udevstart, which is called at system startup (from the /etc/start_udev script), reads through the /sys directory looking for entries that refer to hardware/drivers (be it harddisks or soundcards or whatever).

At the time udev is started during system startup, there are no modules loaded yet. This is why udevstart finds no nvidia driver and in my case no alsa sound drivers.

This is why, after the modules are loaded, udevstart should be called again, because the /sys directory then has entries for all hardware/drivers from all loaded kernel modules.

This does make sense, because the first call is for adding all disk devices, tty, stdio/out/err etc. because they will be needed to start the system. And then after just about everything is loaded and started, the second call to udevstart is made to add the remaining devices to /dev.

Offline

#18 2004-12-07 19:19:16

jeroenv
Member
Registered: 2004-11-29
Posts: 36

Re: alsa modules ok but no devices??? [solved]

Although i had a satisfactory solution for my problem i decided to try one more thing: install hotplug despite all the negative things i read about it in this forum. And believe it or not, problem solved! Note that i just installed it, i didn't add it to the MODULES array in rc.conf. I removed my previous solution from rc.local and rebooted once more. Everything workes, including the nvidia thing. Still have to check USB stuff sometime later.

So, finally it works without remaining misteries (besides why Archlinux isn't more popular smile). Thanks for everyone's suggestions.
Back to gathering days for another uptime record...

Offline

Board footer

Powered by FluxBB