Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev-197 and sound
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
OYTIS
n00b
n00b


Joined: 16 Aug 2010
Posts: 23

PostPosted: Mon Jan 28, 2013 2:21 pm    Post subject: udev-197 and sound Reply with quote

Greetings!
After udev update I have some strange problems with sound. alsamixer works OK, sound card is shown and properly controlled, there are BEEPs after login and in xterm, but when I try to play sound with mplayer it outputs "Failed to initialize audio driver 'alsa:device=hw=1.0'". There is aso no sound in youtube etc. I checked /proc/asound/cards and /proc/asound/devices, but they seem OK.

Code:

>> cat /proc/asound/cards
<<
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0x90244000 irq 44
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0x90240000 irq 16


Code:

>> cat /proc/asound/devices
<<
  1:        : sequencer
  2: [ 0- 3]: digital audio playback
  3: [ 0- 0]: hardware dependent
  4: [ 0]   : control
  5: [ 1- 0]: digital audio playback
  6: [ 1- 0]: digital audio capture
  7: [ 1- 0]: hardware dependent
  8: [ 1]   : control
 33:        : timer


What else could be checked?
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Mon Jan 28, 2013 4:02 pm    Post subject: Reply with quote

this could be the same as my issue.

check permission on /dev/snd/* (ls -la /dev/snd).
if there permission part shows crw-rw----+, then the acl is correct, if the + is missing (i.e. crw-rw----) then the acl is missing.
as temporary workaround,. you may add you user to the audio group (logout and login again) and the sound should be working again.


V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Mon Jan 28, 2013 4:29 pm    Post subject: Reply with quote

Veldrin wrote:

this could be the same as my issue.


Is sys-auth/consolekit built with or without USE="acl"?
Does emerging consolekit print any kernel warnings about missing items... when built with USE="acl" enabled?
Back to top
View user's profile Send private message
OYTIS
n00b
n00b


Joined: 16 Aug 2010
Posts: 23

PostPosted: Mon Jan 28, 2013 5:44 pm    Post subject: Reply with quote

Thank you for your answers.
1. There is no '+' in the access rights. Actually, it's the first time I hear about it.
2. consolekit and udev are built with "acl" USE flag.
3. My user is already in group "audio" and group audio has all necessary permissions for /dev/snd/*

Code:

>> ls -la /dev/snd/*
<<
total 0
drwxr-xr-x  3 root root      260 Jan 29  2013 .
drwxr-xr-x 15 root root     3480 Jan 28 20:53 ..
drwxr-xr-x  2 root root      100 Jan 29  2013 by-path
crw-rw----  1 root audio 116,  5 Jan 29  2013 controlC0
crw-rw----  1 root audio 116,  9 Jan 29  2013 controlC1
crw-rw----  1 root audio 116,  2 Jan 29  2013 controlC29
crw-rw----  1 root audio 116,  4 Jan 29  2013 hwC0D0
crw-rw----  1 root audio 116,  8 Jan 29  2013 hwC1D0
crw-rw----  1 root audio 116,  3 Jan 29  2013 pcmC0D3p
crw-rw----  1 root audio 116,  7 Jan 29  2013 pcmC1D0c
crw-rw----  1 root audio 116,  6 Jan 28 20:49 pcmC1D0p
crw-rw----  1 root audio 116,  1 Jan 29  2013 seq
crw-rw----  1 root audio 116, 33 Jan 29  2013 timer


My udev-rules (namely 70-udev-acl.rules) contain the string that is supposed to enable acl
Code:
SUBSYSTEM=="sound", TAG+="udev-acl"

but for some reason it doesn't work.

UPD:
And no, there were no warnings concerning acl or kernel while building consolekit.
Back to top
View user's profile Send private message
Fenril
Apprentice
Apprentice


Joined: 16 May 2009
Posts: 209

PostPosted: Sat Feb 09, 2013 9:11 pm    Post subject: Reply with quote

Hi,

I have the same issue. After my recent update, i have no sound, on my both soundcards. Alsa detects correctly soundcards, and modules are all loaded. For example, Audacious says :

Code:
snd_pcm_open failed: No such device.


Did anyone find a solution ?
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Sat Feb 09, 2013 10:57 pm    Post subject: Reply with quote

Fenril wrote:
Hi,

I have the same issue. After my recent update, i have no sound, on my both soundcards. Alsa detects correctly soundcards, and modules are all loaded. For example, Audacious says :

Code:
snd_pcm_open failed: No such device.


Did anyone find a solution ?


Is CONFIG_DEVTMPFS=y enabled in kernel and is /dev mounted now as devtmpfs? See `cat /proc/mounts |grep /dev` output.
Is udev and udev-mount in the boot runlevel? See `rc-update show |grep udev` output.

Just guessing.
Back to top
View user's profile Send private message
Fenril
Apprentice
Apprentice


Joined: 16 May 2009
Posts: 209

PostPosted: Sun Feb 10, 2013 6:42 am    Post subject: Reply with quote

Thanks for your help.

Here asked informations :

Code:
# cat /proc/mounts |grep /dev
/dev/root / ext4 rw,noatime,data=ordered 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1018131,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda8 /home ext4 rw,noatime,data=ordered 0 0
/dev/sda2 /mnt/Windows fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0


Code:
                 udev | boot                  sysinit
           udev-mount |                       sysinit
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Sun Feb 10, 2013 6:46 am    Post subject: Reply with quote

Fenril wrote:
Thanks for your help.

Here asked informations :

Code:
# cat /proc/mounts |grep /dev
/dev/root / ext4 rw,noatime,data=ordered 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1018131,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda8 /home ext4 rw,noatime,data=ordered 0 0
/dev/sda2 /mnt/Windows fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0


Code:
                 udev | boot                  sysinit
           udev-mount |                       sysinit


I should have said "sysinit" runlevel and not "boot" runlevel. You should remove udev from "boot" runlevel and leave it just to "sysinit" runlevel.
I'm not saying this is your problem with sound, just noticed it while looking for something else.

So it seems I was looking at quite wrong things in your problem, lets wait for what others have to say.
Back to top
View user's profile Send private message
Fenril
Apprentice
Apprentice


Joined: 16 May 2009
Posts: 209

PostPosted: Sun Feb 10, 2013 8:23 am    Post subject: Reply with quote

So we have to wait ? udev is really a crappy system...
Back to top
View user's profile Send private message
OYTIS
n00b
n00b


Joined: 16 Aug 2010
Posts: 23

PostPosted: Thu Feb 14, 2013 2:42 pm    Post subject: Reply with quote

Yes, and there is one more strange thing here. When I launch mplayer as a root there are no error messages, and by console output it seems that mplayer plays the track correctly, but there is no sound still.
Back to top
View user's profile Send private message
sick4noise
n00b
n00b


Joined: 22 Feb 2013
Posts: 1
Location: Boston, MA

PostPosted: Fri Feb 22, 2013 4:49 pm    Post subject: Reply with quote

I was having the same symptoms after upgrading to udev-197-r8 and kernel 3.5.7. After trying just about everything suggested on the interwebs, I finally discovered that setting CONFIG_SOUND_OSS_CORE_PRECLAIM=N fixed the issue. You can find it under Device Drivers -> Sound Card Support -> Preclaim OSS device numbers.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Fri Feb 22, 2013 5:18 pm    Post subject: Reply with quote

sick4noise wrote:
I was having the same symptoms after upgrading to udev-197-r8 and kernel 3.5.7. After trying just about everything suggested on the interwebs, I finally discovered that setting CONFIG_SOUND_OSS_CORE_PRECLAIM=N fixed the issue. You can find it under Device Drivers -> Sound Card Support -> Preclaim OSS device numbers.


I have it "=y" here and it still works. I guess it's worth to test anyway.
Back to top
View user's profile Send private message
Pilsner
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2008
Posts: 83

PostPosted: Sat Feb 23, 2013 6:22 am    Post subject: Reply with quote

I would suggest you to try starting mplayer when no X server is started. Could it be that some DM sound back-end blocks the sound.
Back to top
View user's profile Send private message
OYTIS
n00b
n00b


Joined: 16 Aug 2010
Posts: 23

PostPosted: Sat Feb 23, 2013 9:04 pm    Post subject: Reply with quote

No, unfortunately turning off X server didn't help. Neither did updating the kernel to 3.7.9 and disabling CONFIG_SOUND_OSS_CORE_PRECLAIM. There should be something with udev.
Back to top
View user's profile Send private message
FRIGN
n00b
n00b


Joined: 12 Jan 2013
Posts: 23
Location: Germany

PostPosted: Sun Feb 24, 2013 9:27 pm    Post subject: Reply with quote

Considering that the udev-developers are messing the system up and will force you to use systemd in future versions of it, I would recommend you to downgrade to udev-171-r10 (just mask all versions above udev-181 in /etc/portage/package.mask with
Code:
>=sys-fs/udev-181

or alternatively use the gentoo-fork eudev.

Please let me know if that fixed your problem!
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Sun Feb 24, 2013 10:48 pm    Post subject: Reply with quote

FRIGN wrote:
Considering that the udev-developers are messing the system up and will force you to use systemd in future versions of it, I would recommend you to downgrade to udev-171-r10 (just mask all versions above udev-181 in /etc/portage/package.mask with
Code:
>=sys-fs/udev-181

or alternatively use the gentoo-fork eudev.

Please let me know if that fixed your problem!


sounds like you are grabbing a hammer for tightening a screw :P

there is currently no reason to use eudev; it's at same'ish level with udev 197 feature wise (you lose just predicatable network naming support with eudev, but if you don't need one, it doesn't matter which one you run)
Masking isn't recommended since many apps in tree already required 197 and 171 is on it's way out of portage
And 197 runs perfectly fine without systemd, there is no point to even discuss if support for non-systemd systems will be dropped or not, it'd be purely guessing, and it surely isn't happening for gentoo's sys-fs/udev
Back to top
View user's profile Send private message
FRIGN
n00b
n00b


Joined: 12 Jan 2013
Posts: 23
Location: Germany

PostPosted: Mon Feb 25, 2013 6:24 pm    Post subject: Reply with quote

ssuominen wrote:
FRIGN wrote:
Considering that the udev-developers are messing the system up and will force you to use systemd in future versions of it, I would recommend you to downgrade to udev-171-r10 (just mask all versions above udev-181 in /etc/portage/package.mask with
Code:
>=sys-fs/udev-181

or alternatively use the gentoo-fork eudev.

Please let me know if that fixed your problem!


sounds like you are grabbing a hammer for tightening a screw :P

there is currently no reason to use eudev; it's at same'ish level with udev 197 feature wise (you lose just predicatable network naming support with eudev, but if you don't need one, it doesn't matter which one you run)
Masking isn't recommended since many apps in tree already required 197 and 171 is on it's way out of portage
And 197 runs perfectly fine without systemd, there is no point to even discuss if support for non-systemd systems will be dropped or not, it'd be purely guessing, and it surely isn't happening for gentoo's sys-fs/udev


It is narrow-minded to guess that. From what I've seen from the developers in the past I can't really trust them any more. My recommendation to go back to 171-r10 is actually based on the fact that it has been the last version with the high amount of deprecations actually preparing udev for a systemd-only environment.
Eudev is actually not on the same level of 197, it is actually below, which doesn't make it worse. We are working on improving the codebase to make it better also in sense of code-cleanup. It is still a young project.
Back to top
View user's profile Send private message
Fenril
Apprentice
Apprentice


Joined: 16 May 2009
Posts: 209

PostPosted: Sun Mar 03, 2013 3:07 pm    Post subject: Reply with quote

So, is it recommendable to downgrade or not udev ? I still don't have sound, if anyone found a solution...
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5426

PostPosted: Sun Mar 03, 2013 7:46 pm    Post subject: Reply with quote

Fenril wrote:
So, is it recommendable to downgrade or not udev ? I still don't have sound, if anyone found a solution...

It's quite likely udev isn't the real problem here.
Is there anything interesting in the output of alsa-info ?
Back to top
View user's profile Send private message
Fenril
Apprentice
Apprentice


Joined: 16 May 2009
Posts: 209

PostPosted: Mon Mar 04, 2013 9:52 pm    Post subject: Reply with quote

As i said and the author of the topic explained, alsa correctly detects soundcards : with alsaconf, it auto detects, alsamixer shows correctly controls volume and switches for both my soundcards, and all modules are loaded. I use 3.6.11 kernel, with Alsa kernel modules (not Alsa from Portage).
Back to top
View user's profile Send private message
Scorcerer
n00b
n00b


Joined: 10 Sep 2006
Posts: 7
Location: Częstochowa

PostPosted: Sat Mar 09, 2013 10:18 am    Post subject: Reply with quote

Hello.

Same problem here - as OP described, the only difference is that i tried to move from alsa-only setup to pulseaudio. Ran into identical permissions problem. Udev (or ConsoleKit?) just won't set right ACLs on sound devices despite having identical config as arch installation i have on different machine...
Back to top
View user's profile Send private message
kopancek
n00b
n00b


Joined: 20 Dec 2007
Posts: 13

PostPosted: Sat Mar 09, 2013 10:01 pm    Post subject: Reply with quote

Hi all, I ran into the same issue today after upgrading to udev-197.
Because the ACL is not set on the sound devices, there is a temporary workaround for me to set it manually on each device in /dev/snd by using this command:
Code:
setfacl -m u:username:rw /dev/snd/*


Just replace username with the name of user...

Is there any way to add this to udev rules, so I would not have to run this on my own? :) I have never written any udev rule, so complete udev novice...
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Sun Mar 10, 2013 10:19 am    Post subject: Reply with quote

I mentioned in http://forums.gentoo.org/viewtopic-t-949450.html that the udev-acl rules that come with ConsoleKit might just not be compatible with new udev anymore, I haven't figured out yet if it's possible to fix them
I'm not sure yet :-/

Help would of course be appericiated
Back to top
View user's profile Send private message
kopancek
n00b
n00b


Joined: 20 Dec 2007
Posts: 13

PostPosted: Sun Mar 10, 2013 7:26 pm    Post subject: Reply with quote

ssuominen wrote:
I mentioned in http://forums.gentoo.org/viewtopic-t-949450.html that the udev-acl rules that come with ConsoleKit might just not be compatible with new udev anymore, I haven't figured out yet if it's possible to fix them
I'm not sure yet :-/

Help would of course be appericiated


I just did a udevadm test /class/sound/controlC0 and found out that udev-acl rules are not being called at all!
On my system, udev rules are in a (new?) location in:
/lib64/udev/rules.d
The consolekit and also some other rules are in /usr/lib/udev/rules.d so I made a symlink:
/lib64/udev/rules.d/70-udev-acl.rules -> /usr/lib/udev/rules.d/70-udev-acl.rules

and everything now works as expected :) Hope this helps everyone soon :)
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2104
Location: Finland

PostPosted: Sun Mar 10, 2013 7:48 pm    Post subject: Reply with quote

kopancek wrote:
ssuominen wrote:
I mentioned in http://forums.gentoo.org/viewtopic-t-949450.html that the udev-acl rules that come with ConsoleKit might just not be compatible with new udev anymore, I haven't figured out yet if it's possible to fix them
I'm not sure yet :-/

Help would of course be appericiated


I just did a udevadm test /class/sound/controlC0 and found out that udev-acl rules are not being called at all!
On my system, udev rules are in a (new?) location in:
/lib64/udev/rules.d
The consolekit and also some other rules are in /usr/lib/udev/rules.d so I made a symlink:
/lib64/udev/rules.d/70-udev-acl.rules -> /usr/lib/udev/rules.d/70-udev-acl.rules

and everything now works as expected :) Hope this helps everyone soon :)


OH OK! Now I understand! This is mentioned in the postinst message of udev, all you need to do is re-emerge consolekit, no symlink required.

Re-emerge every package that has a file in /usr/lib/udev/ and it should move to /lib/udev/

This is the message:

Quote:

"Please re-emerge all packages on your system which install"
"rules and helpers in /usr/lib/udev. They should now be in"
"/lib/udev."

"One way to do this is to run the following command:"
"emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
"Note that qfile can be found in app-portage/portage-utils"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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