Bug 1029272

Summary: Tumbleweed last kernel broke sound (XONAR DGX)
Product: [openSUSE] openSUSE Tumbleweed Reporter: Philippe Condé <conde.philippe>
Component: SoundAssignee: Takashi Iwai <tiwai>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: conde.philippe
Version: CurrentFlags: tiwai: needinfo? (conde.philippe)
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: hardware info
udevadm output for controlC0 and pcmC0D0c
kde mixer ==> choice configuration
test sound commands
alsa-info file output (kernel 4.10.4.-1)

Description Philippe Condé 2017-03-14 08:36:17 UTC
Hello,

I installed the a snapshot on 10 march via zypper dup.
I saw that kernel 4.10.1-2 was installed.

After reboot I didn't have sound.
my system is a HP Proliant ML350 with a XONAR DGX sound card. This card was configured and worked since  3 years. 
I have also a Nvidia Quadro 4000 video card with sound capabilities (snd_hda_Intel). This card was not configured in the sound. For the video card I use the nouveau driver;

lsmod shows different snd_hda_* modules were loaded. I tried to remove and reinstall the Xonar card in Yast but this fails: "Kernel modules snd_virtuoso for sound support could not be loaded. can be a problem of IO or IRQ"

Now I cannot use the NVIDIA sound support because my screens doesn't have embedded speaker. 
I need to configure the XONAR.
I blacklisted the snd_hda_intel in /etc/modprobe.d/blacklist.conf but with no luck.
I tried all previous kernel (4.10.0, 4.9.11.1° with no luck. The Xonar card cannot be configured

after reboot: I see the following modules for the sound
lsmod | grep snd
snd_oxygen             28672  2
snd_oxygen_lib         45056  1 snd_oxygen
snd_mpu401_uart        16384  1 snd_oxygen_lib
snd_rawmidi            36864  1 snd_mpu401_uart
snd_seq_device         16384  1 snd_rawmidi
snd_pcm               131072  1 snd_oxygen_lib
snd_timer              36864  1 snd_pcm
snd                    86016  11 snd_oxygen_lib,snd_oxygen,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_pcm
soundcore              16384  1 snd

and aplay -l 
**** List of PLAYBACK Hardware Devices ****
card 0: DGX [Xonar DGX], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: DGX [Xonar DGX], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       60 Mar 14 08:54 by-path
crw-rw----+ 1 root audio 116,  2 Mar 14 08:54 controlC0
crw-rw----+ 1 root audio 116,  4 Mar 14 08:55 pcmC0D0c
crw-rw----+ 1 root audio 116,  3 Mar 14 09:18 pcmC0D0p
crw-rw----+ 1 root audio 116,  6 Mar 14 08:55 pcmC0D1c
crw-rw----+ 1 root audio 116,  5 Mar 14 08:55 pcmC0D1p
crw-rw----+ 1 root audio 116,  1 Mar 14 08:54 seq
crw-rw----+ 1 root audio 116, 33 Mar 14 08:54 timer

The mixer are present in tray array. If I start amarok i see in the mixer the event from amarok but no sound.
I'll attach the hardware info and the udevadm for the /dev/snd/*

on thing is strange fro me/ the hardware info says that the Xonar Card uses IRQ27 but the udevadm says that the device use IRQ 51. Don't know if this is relevant

Regards
Philippe
Comment 1 Philippe Condé 2017-03-14 08:37:31 UTC
Created attachment 717334 [details]
hardware info
Comment 2 Philippe Condé 2017-03-14 08:45:39 UTC
Created attachment 717337 [details]
udevadm output for controlC0 and pcmC0D0c
Comment 3 Takashi Iwai 2017-03-20 13:06:26 UTC
Did you try to rollback via btrfs snapshot?  Since the older kernels (4.9.x) shows the same problem, it's not really a kernel regression, I suppose.

Also, how did you test it?  Try to run like
  aplay -Dplughw:0 -vv /usr/share/sounds/alsa/test.wav

If this doesn't work, check your mixer setup.  Run like "alsamixer -c0" and try to adjust them manually.
Comment 4 Philippe Condé 2017-03-20 20:45:32 UTC
Hello,

I use ext4 and not btrfs (root filesystem is too small for btrfs).
What I did

1) I found a zero byte /etc/modprobe.d/50-sound.conf and restored the Yast.save version
2) the alsa matrix says that the Xonar DGX uses the snd_oxygen module but Yast tries configuring the card with snd-virtuoso module which fails.
3) I updated the /etc/modprobe.d/50-sound.conf to use the xonar DGX as card0 with snd-oxygen.
4) after reboot the status of alsasound is inactive (dead) . I can start it  via "systemctl start alsasound".
5) "play -Dplughw:0 -vv /usr/share/sounds/alsa/test.wav" seems working but no sound.
6) I  can start alsamixer -c0 : I can change the level and the mute but still no sound. (see attachment)


in kde mixer I can go to the configuration (see png) there is no sound with the button left right but in the mixer I see coming briefly a libcanberra left or libcanberra right.
So all seem working but no sound. 
I don't have another PCI-E system to test the card but I'm asking me if the card is not dead

Regards
Philippe
Comment 5 Philippe Condé 2017-03-20 20:46:54 UTC
Created attachment 718084 [details]
kde mixer ==> choice configuration
Comment 6 Philippe Condé 2017-03-20 20:49:20 UTC
Created attachment 718085 [details]
test sound commands
Comment 7 Takashi Iwai 2017-03-22 14:18:51 UTC
The snd-oxygen driver is the correct one for your device.  YaST sound module doesn't seem to check the PCI SSID correctly and takes snd-virtuoso instead because it supports the other similar devices with the same PCI ID but different PCI SSIDs.

It's still possible that some mixer setup got screwed up.  Try the following:
- Go to runlevel 1
  # init 1
- Login on Lnux console as root
- Unload snd-oxygen
  # modprobe -r snd-oxygen
- Remove (better to backup) /var/lib/alsa/asound.state file
- Reboot

If this still doesn't work, run "alsa-info.sh --no-upload" as root, and attach the output to Bugzilla.
Comment 8 Philippe Condé 2017-03-22 16:49:08 UTC
Hello,

i run to level1, removed the module snd-oxygen via "modprobe -r snd-oxygen", removed the file /var/lib/alsa/alsasound.stat and rebooted: still no sound.

I attach here the output file from alsa-info.sh.

Many thanks in advance
Philippe
Comment 9 Philippe Condé 2017-03-22 16:50:55 UTC
Created attachment 718412 [details]
alsa-info file output (kernel 4.10.4.-1)
Comment 10 Takashi Iwai 2017-03-22 18:08:06 UTC
Via which output are you testing?  Judging from alsa-info.sh output, it's currently set up from the front headphone jack.
Comment 11 Philippe Condé 2017-03-22 18:25:57 UTC
Hello,

Yes the connection cable is in the front jack (green) It was so all 3 years. Never changed it
I have done a test with a new cable and with a new Xonar DGX card but there is still no sound;

alsasound is not active after reboot. I  started it but still no sound
# systemctl status alsasound
● alsa-restore.service - Save/Restore Sound Card State                                                                      
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)                           
   Active: inactive (dead)
Condition: start condition failed at Wed 2017-03-22 18:32:00 CET; 49min ago
           └─ ConditionPathExistsGlob=/dev/snd/control* was not met
hpprol2:~ # systemctl start alsasound
hpprol2:~ # systemctl status alsasound
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: active (exited) since Wed 2017-03-22 19:21:32 CET; 3s ago
  Process: 3681 ExecStart=/usr/sbin/alsactl restore (code=exited, status=99)
 Main PID: 3681 (code=exited, status=99)

Mar 22 19:21:32 hpprol2 systemd[1]: Starting Save/Restore Sound Card State...
Mar 22 19:21:32 hpprol2 alsactl[3681]: /usr/sbin/alsactl: load_state:1683: Cannot open /var/lib/alsa/asound.state for readin
Mar 22 19:21:32 hpprol2 alsactl[3681]: Found hardware: "CMI8786" "CMI8786" "CS4245 CMI8786" "0x1043" "0x8521"
Mar 22 19:21:32 hpprol2 alsactl[3681]: Hardware is initialized using a generic method
Mar 22 19:21:32 hpprol2 systemd[1]: Started Save/Restore Sound Card State.


Regards
Philippe
Comment 12 Philippe Condé 2017-03-23 16:23:51 UTC
Hello;

I did some tests:

alsaconf doesn't find the card "No supported PnP or PCI card found.    Would you like to probe legacy ISA sound cards/chips?"
but these messages are also displayed when alsaconf starts
"Building card database..
/usr/sbin/alsaconf: line 588: /lib/modules/4.10.4-1-default/modules.pcimap: No such file or directory
/usr/sbin/alsaconf: line 588: /lib/modules/4.10.4-1-default/modules.isapnpmap: No such file or directory
"
alsaconf -m gives the same result.


file var/lib/alsa/alsasound.state exists but has a length of zero. I suppose that this is the reason why i receive "no state present  when asking the status of alsasouns
"# systemctl status alsasound
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: active (exited) since Thu 2017-03-23 15:50:41 CET; 1h 19min ago
  Process: 1047 ExecStart=/usr/sbin/alsactl restore (code=exited, status=99)
 Main PID: 1047 (code=exited, status=99)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/alsa-restore.service

Mar 23 15:50:41 hpprol2 systemd[1]: Starting Save/Restore Sound Card State...
Mar 23 15:50:41 hpprol2 alsactl[1047]: No state is present for card DGX
Mar 23 15:50:41 hpprol2 alsactl[1047]: Found hardware: "CMI8786" "CMI8786" "CS4245 CMI8786" "0x1043" "0x8521"
Mar 23 15:50:41 hpprol2 alsactl[1047]: Hardware is initialized using a generic method
Mar 23 15:50:41 hpprol2 alsactl[1047]: No state is present for card DGX
Mar 23 15:50:41 hpprol2 systemd[1]: Started Save/Restore Sound Card State.
"

Regards
Philippe
Comment 13 Takashi Iwai 2017-03-25 08:21:34 UTC
The alsaconf and alsasound systemd service can be ignored, so far.  The only impaortant thing is the current mixer setup and the device setup.

There has been really no code change for long time for this driver, thus I guess it's either a breakage in user-space or in your hardware.
At least, try to play a sound directly via aplay, e.g.
  aplay -Dplughw -vv something.wav

Also, run "alsamixer -c0", and change "Analog Output" enum to a different one, and try different outputs whether the issue is limited to the front headphone.

Other than that, I have no clue, so far.
Comment 14 Philippe Condé 2017-03-25 16:07:25 UTC
hello,

I tested all channels (analog stereo, duplex stereo, surround 5.1 etc) without success.

I booted then in the configuration menu and changed the IRQ for the Xonar DGX from 5 to 7, 
After reboot in Tumbleweed I had still no sound. I tested again all channels and it worked  for the duplex stereo.
:-)


I don't understand why it worked by changing  the IRQ and why it stopped.
I suspect that something changed in the snd_hda _intel because when the problem  occurred I found that this module was loaded for the media on the Nvidia Quadro display card  (DVI or display port)  and I'm. sure that this module was not loaded before;

Thanks for your advices
Philippe