Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsa doesn't work correctly after kernel upgrade
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Wed Mar 13, 2013 2:51 pm    Post subject: Alsa doesn't work correctly after kernel upgrade Reply with quote

Hi,

Like http://forums.gentoo.org/viewtopic-p-7228634.html
I'v a problem with my kernel upgarde and alsa.
Sound works correctly but I can't control volume... alsa can't open mixer.
I really don't undestand why and I have no idea for resolve it...

If you have an idea :)

Regards Nutsi,
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Thu Mar 14, 2013 1:33 pm    Post subject: Reply with quote

What is the output of
Code:
lsmod|grep snd

_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Thu Mar 14, 2013 3:34 pm    Post subject: Reply with quote

Nothing, it's normal. I've only 3 modules (nvidia and brcmsmac and brcmutil).
But I can try with snd_hda_intel in an lkm. I'ill do it tonight.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Fri Mar 15, 2013 8:55 am    Post subject: Reply with quote

As long you don't paste what you get with commands, nobody will be able to help you. ALSA TroubleShootting
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 9:57 am    Post subject: Reply with quote

Well, I try to put snd_hda_intel.

lsmod | grep snd show that:

Code:
snd-hrtimer.ko
snd-hwdep.ko
 snd-page-alloc.ko
 snd-pcm.ko
 snd-timer.ko
 snd-hda-codec-idt.ko
 snd-hda-codec-realtek.ko
 snd-hda-codec.ko
 snd-hda-intel.ko


But, whe it's in an lkm. Openrc says that qhen it try to launch alsasound:
Quote:
alsactl: set_control:1328: failed to obtain info for control #X (No such file or directory)


And I've sound but no mixer :/ (what?)


edit:

Code:
alsactl -f /var/lib/alsa/asound.state store
can't solve the problem, but the error message in openrc has disapear.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Fri Mar 15, 2013 10:38 am    Post subject: Reply with quote

nutsi wrote:
Well, I try to put snd_hda_intel.

lsmod | grep snd show that:

Code:
snd-hrtimer.ko
snd-hwdep.ko
 snd-page-alloc.ko
 snd-pcm.ko
 snd-timer.ko
 snd-hda-codec-idt.ko
 snd-hda-codec-realtek.ko
 snd-hda-codec.ko
 snd-hda-intel.ko


Hmmm, that's something strange with this. Here is what I get:
Code:
lsmod|grep snd|grep intel
snd_hda_intel          26631  0
snd_hda_codec          84313  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_analog
snd_pcm                69074  16 snd_ice1724,snd_pcm_oss,snd_usb_audio,snd_ac97_codec,cx88_alsa,snd_aloop,
snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_ak4113,snd_ak4114
snd_page_alloc          6802  2 snd_pcm,snd_hda_intel
snd                    55935  42 snd_pt2258,snd_virmidi,snd_ice1724,snd_pcm_oss,snd_usb_audio,snd_ac97_codec,
cx88_alsa,snd_aloop,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_i2c,snd_pcm,
snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_hda_codec,snd_ak4xxx_adda,snd_hda_intel,
snd_seq_oss,snd_seq_virmidi,snd_seq_device,snd_mixer_oss,snd_ak4113,snd_ak4114,snd_hda_codec_analog


I think some module must not be loaded. With recent kernel and recent udev changes, we get in trouble with alsa again. As stressed into the thread you gave a link into you first post, you must re-install all the packages which have files into /usr/lib/udev. When those files are gone, please do a reboot.

You can also use /etc/modprobe.conf/modules to force modules loading (with the option you want). Mine look like that:
Code:
module_snd_args="slots=snd-aloop,snd-ice1724,snd-hda-intel,cx88-alsa,snd-usb-audio,snd-virmidi,snd-hda-intel"
modules="snd-seq snd-aloop snd-virmidi snd-mixer-oss snd-pcm-oss snd-seq-oss"

_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Fri Mar 15, 2013 11:11 am    Post subject: Reply with quote

nutsi wrote:

lsmod | grep snd show that:

Code:
snd-hrtimer.ko
snd-hwdep.ko
 snd-page-alloc.ko
 snd-pcm.ko
 snd-timer.ko
 snd-hda-codec-idt.ko
 snd-hda-codec-realtek.ko
 snd-hda-codec.ko
 snd-hda-intel.ko




This output is not the result you will get from this command. Giving away bad information is best way to not get help.
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 12:32 pm    Post subject: Reply with quote

My real lsmod output:
Code:

root ~ # lsmod | grep snd
snd_hda_codec_idt      46690  1
snd_hda_intel          21172  0
snd_hda_codec          80295  2 snd_hda_codec_idt,snd_hda_intel
snd_hwdep               4611  1 snd_hda_codec
snd_pcm                61002  2 snd_hda_codec,snd_hda_intel
snd_page_alloc          5935  2 snd_pcm,snd_hda_intel
snd_timer              14159  1 snd_pcm
snd                    43050  6 snd_hwdep,snd_timer,snd_hda_codec_idt,snd_pcm,snd_hda_codec,snd_hda_intel
soundcore               4187  1 snd
root ~ #


And alsamixer, amixer etc... can't open mixer.
Back to top
View user's profile Send private message
clostry
n00b
n00b


Joined: 26 Nov 2008
Posts: 23

PostPosted: Fri Mar 15, 2013 12:53 pm    Post subject: Reply with quote

I had a similar problem, try with
Code:
emerge alsa-lib
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 2:23 pm    Post subject: Reply with quote

This change nothing...
I restart alsasound but alsamixer says the same thing (can't open mixer).
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Fri Mar 15, 2013 2:38 pm    Post subject: Reply with quote

it should tell you more than just can't open mixer, but giving a cause.
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 3:17 pm    Post subject: Reply with quote

I change nothing on my computer.
Just normally snd_hda_intel is in a kernel not module.
When I boot my computer with kernel 3.6.8, all run normally...
But if I boot with kernel 3.7.2, alsaboot can't run normally. It plays sound but can't change mixer volume... very strange problem maybe due at udev... (udev 197).
dmesg says nothing. And the cause is No such file and directory like openrec says that
Quote:
alsactl: set_control:1328: failed to obtain info for control #X (No such file or directory)
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Fri Mar 15, 2013 3:32 pm    Post subject: Reply with quote

and you checked /dev/snd/control* presence ?
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 3:38 pm    Post subject: Reply with quote

Oh no.
So, ls /dev/snd/control* :

Quote:
controlC0 controlC1


Effectivly, /dev/snd/controlC# (where # is > 1). This is the problem, udev fault? bad udev rules?
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Fri Mar 15, 2013 3:41 pm    Post subject: Reply with quote

you might just have two soundcards and udev keep swapping them or something like that, As a result saving sate volume0 in asound.state cannot be restore as it should now have volume1 name (fake example, but i think you get the picture).
you should seen them in proc/asound/cards
edit: go with amixer -c1 as i suppose -c0 target default card to test.
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 3:54 pm    Post subject: Reply with quote

This one correct the problem partielly.

I explain this.
Whan I run amixer -c1 make nothing. But amixer -c0 runs normally (I can up or down the volume).
I try this with alsamixer.
alsamixer -c0 runs, it's cool, but I've no PCM controller...

So, -c1 make nothing and -c0 works partielly.
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Fri Mar 15, 2013 4:13 pm    Post subject: Reply with quote

And this is my asoundrc
Quote:
nuts ~ $ cat .asoundrc
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}

bindings {
0 0
1 1
}
}

pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.default {
type plug
slave.pcm "dmixer"
}

ctl.mixer0 {
type hw
card 0
}
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Sat Mar 16, 2013 2:28 pm    Post subject: Reply with quote

The mixer was working before your kernel update. I would boot with the old kernel and compare the output of "lsmod|grep snd" for the 2 kernels.

Also, as long than the mixer is not working, I would rename ~/.asoundrc for it to not interfere with the troubleshooting.

You can also compare the output of
Code:
ls /lib/modules/`uname -r`/kernel/sound/pci/hda

for the 2 kernels.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Sat Mar 16, 2013 5:36 pm    Post subject: Reply with quote

With my last kernel (3.6.8) snd_hda_intel isn't a kernel module so It doesn't appear when I run lsmod.
But just for information this is the output of lsmod:

Quote:
Module Size Used by
nvidia 8533369 61
brcmsmac 478809 0
brcmutil 2245 1 brcmsmac
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Sat Mar 16, 2013 6:26 pm    Post subject: Reply with quote

nutsi wrote:
With my last kernel (3.6.8) snd_hda_intel isn't a kernel module


In consequence of what /etc/init.d/alsasound will do nothing. You have to use /etc/conf.d/modules instead. Good luck ! You are better to make a new kernel with every thing related to alsa as kernel modules.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Sat Mar 16, 2013 9:36 pm    Post subject: Reply with quote

Yes, I made that with the new kernel, I must specify the card to run alsamixer or an another mixer normally. but now I've no PCM. This is my new problem T_T.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Sat Mar 16, 2013 9:51 pm    Post subject: Reply with quote

Dominique_71 wrote:
nutsi wrote:
With my last kernel (3.6.8) snd_hda_intel isn't a kernel module


In consequence of what /etc/init.d/alsasound will do nothing. You have to use /etc/conf.d/modules instead. Good luck ! You are better to make a new kernel with every thing related to alsa as kernel modules.


I was wrong here. /etc/conf.d/modules will do nothing either. You have to add boot parameters with grub or whatever you use to load the kernel at boot. Or to make a new kernel with every thing related to ALSA as modules.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Sat Mar 16, 2013 10:46 pm    Post subject: Reply with quote

have also a look at this one : http://forums.gentoo.org/viewtopic-p-7264692.html#7264692
Back to top
View user's profile Send private message
nutsi
n00b
n00b


Joined: 13 Jul 2012
Posts: 32

PostPosted: Sun Mar 17, 2013 1:51 pm    Post subject: Reply with quote

I look this one.
I've no entry in /usr/lib/udev, all is in /lib/udev... So, actually I try to reinstall udev to fix the problem.
Maybe the 90-alsa-restore.rules in /lib/udev/rules.d is failed...
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1505
Location: Switzerland (Romandie)

PostPosted: Sun Mar 17, 2013 2:49 pm    Post subject: Reply with quote

nutsi wrote:
I look this one.
I've no entry in /usr/lib/udev, all is in /lib/udev... So, actually I try to reinstall udev to fix the problem.
Maybe the 90-alsa-restore.rules in /lib/udev/rules.d is failed...


For udev to make something, wrong or right, you must have all ALSA stuffs as modules. When they are into the kernel, they get loaded before udev, and obviously, udev will do nothing.

/etc/init.d/modules is used by openrc with modprobe. If ALSA is into the kernel, it will obviously do nothing either.

If ALSA is compiled as modules, it can append that udev load the module(s) before openrc. The same can append with /etc/init.d/alsasound that is an openrc script that use modprobe too. If some modules are missing, it is generally enough to add them into /etc/init.d/modules, sometime with their parameters. When the modules are loadded by udev before openrc, you have 2 possibilities:

1) blacklist them into /etc/modprobe.d/blacklist.conf
udev will not load them, but openrc will
2) if all fail, you can always unload them with rmmod and reload them with modprobe.

Another thing you can compare between the working kernel and the non working one is the content of /sys/class/sound, /sys/modules and /dev/snd. /sys is where the hardware get described by the kernel and /dev is where the hardware get mounted.
_________________
[[[ To any NSA and FBI agents reading that text: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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