LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Problems after booting directly into runlevel 4, with alsa especially (http://www.linuxquestions.org/questions/slackware-14/problems-after-booting-directly-into-runlevel-4-with-alsa-especially-4175435474/)

Stephen Morgan 11-03-2012 01:25 PM

Problems after booting directly into runlevel 4, with alsa especially
 
Firstly, none of these problems appear if I boot in runlevel 3, then immediately start X with startx.

Secondly, I've tried using slim, which I normally use, and KDM, and both have the same problem. I've also used fluxbox, which is my normal WM and KDE, without any noticeable difference.

The problem is, when I boot to runlevel 4 I have no sound. Sound works if I run mplayer as root, but not as a normal user. In KDE it tells me my audio card has been removed when KDE starts. Setting volume with alsamixer as root doesn't have any effect on sound for the non-root user.

Running alsamixer as non-root results in:

Code:

cannot open mixer: No such file or directory
Trying to play an mp3 in mplayer gives this:

Code:

[AO_ALSA] alsa-lib: conf.c:4246:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:4725:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
[AO_ALSA] Playback open error: No such file or directory
[AO ESD] esd_open_sound failed: Connection timed out
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0'
[AO_ALSA] alsa-lib: conf.c:4246:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
[AO_ALSA] alsa-lib: conf.c:4246:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
[AO_ALSA] alsa-lib: conf.c:4246:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:4725:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
[AO SDL] Unable to open audio: No available audio device
DVB card number must be between 1 and 4
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)

Also, when I try to use the TTYs after booting into runlevel four it doesn't properly recognise what I'm typing, it misses some keypresses and hangs before asking for password. Again, none of this happens if I boot into runlevel 3.

It's Slack14, 64bit.

In addition, the same thing happens when manually invoking slim from the command line, not just when booting into runlevel 4. Must be something to do with using a display manager.

T3slider 11-03-2012 02:57 PM

Is your user a member of the audio group? When you login in runlevel 3, /etc/login.defs temporarily adds your user to the audio group, and that gets inherited by the X session when you run startx. In runlevel 4, login.defs does not apply and unless you are explicitly a member of the audio group you may lose access. The following command should work:
Code:

# usermod -a -G audio username
If you're not a member of the audio group then you are likely also missing some other important group permissions. The following command would add your user to the recommended groups:
Code:

# usermod -a -G audio,cdrom,floppy,plugdev,video,power,netdev,lp,scanner username

Stephen Morgan 11-04-2012 02:39 AM

Bingo. Strange, I was sure I'd added those through adduser. So I dismissed that possibility, but `id` shows I was wrong.

Thanks muchly.


All times are GMT -5. The time now is 03:55 PM.