Bug 1116849 - yast2-sound: do not add sound modules to initrd
Summary: yast2-sound: do not add sound modules to initrd
Status: RESOLVED NORESPONSE
: 1073382 1181663 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: x86-64 All
: P3 - Medium : Minor (vote)
Target Milestone: ---
Assignee: YaST Team
QA Contact: Jiri Srain
URL: https://trello.com/c/CNuOppNr
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-21 10:12 UTC by Freek de Kruijf
Modified: 2021-04-15 11:05 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2log-2.gz (765.97 KB, application/gzip)
2019-01-29 17:32 UTC, Freek de Kruijf
Details
output of: dracut --debug > /home/freek/dracut--debug.txt 2>&1 (28.23 KB, text/plain)
2019-01-30 11:22 UTC, Freek de Kruijf
Details
/home/freek/dracut--debug.txt.xz (592.20 KB, application/x-xz)
2019-01-30 12:47 UTC, Freek de Kruijf
Details
output of save_y2logs (3.66 MB, application/x-xz)
2019-01-31 12:07 UTC, Freek de Kruijf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Freek de Kruijf 2018-11-21 10:12:39 UTC
Since quite some time, months, when booting my Tumbleweed system, always up-to-date, I see a red message shown, telling "Failed to start Load Kernel Modules", coming from the systemd unit systemd-modules-load.service.
However "systemctl status systemd-modules-load.service" later does not show any error message. Further inspection shows that the module inspects a number of files with names of modules, among others /etc/modules-load.d/* which contain module names: sg and snd-hda-intel.
I don't know anymore how I did see a hint on what went wrong, but what I recall is that it could not find a file or directory.
My suggestion is therefor that at the moment this unit is executed the filesystem with one of these modules is not yet available. Apparently another attempt to run the unit succeeds, which explains why such an error message does not show in the journal.
Maybe the unit should depend on finishing of mounting the root filesystem or maybe /usr
Comment 1 Franck Bui 2019-01-29 08:09:28 UTC
Can you check the content of the journal and see if there're interesting logs from systemd-modules-load.service ?

If not it might be interesting to reboot with the debug logs enabled (append "systemd.log_level=debug printk.devkmsg=on" to the kernel command line).
Comment 2 Franck Bui 2019-01-29 08:11:41 UTC
Another question: do your system have a separate /usr ?
Comment 3 Franck Bui 2019-01-29 08:14:54 UTC
Martin, we recently moved sg.conf out from systemd package to suse-modules-load.service so this might be related...

I just noticed that you choose to place sg.conf in /etc/... but I'm not sure to understand why as /etc is sysadmin's territory. We used to have it in /usr/... but if this module can be involved to mount /usr, /lib might be a better choice.
Comment 4 Freek de Kruijf 2019-01-29 13:55:09 UTC
(In reply to Franck Bui from comment #1)
> Can you check the content of the journal and see if there're interesting
> logs from systemd-modules-load.service ?

# journalctl -u systemd-modules-load.service
-- Logs begin at Tue 2019-01-29 10:07:43 CET, end at Tue 2019-01-29 14:49:44 CET. --
jan 29 10:07:43 eiktum systemd-modules-load[221]: Inserted module 'scsi_dh_alua'
jan 29 10:07:43 eiktum systemd-modules-load[221]: Inserted module 'scsi_dh_emc'
jan 29 10:07:43 eiktum systemd-modules-load[221]: Inserted module 'scsi_dh_rdac'
jan 29 10:07:43 eiktum systemd-modules-load[221]: Inserted module 'dm_multipath'
jan 29 10:07:43 eiktum systemd-modules-load[221]: Inserted module 'sg'
jan 29 10:07:43 eiktum systemd-modules-load[221]: Failed to insert module 'snd_hda_intel': No such file or directory
jan 29 10:07:43 eiktum systemd[1]: Started Load Kernel Modules.
jan 29 10:07:46 eiktum systemd[1]: Stopped Load Kernel Modules.
jan 29 10:08:03 eiktum systemd-modules-load[439]: Inserted module 'snd_hda_intel'
jan 29 10:08:03 eiktum systemd[1]: Started Load Kernel Modules.

> If not it might be interesting to reboot with the debug logs enabled (append
> "systemd.log_level=debug printk.devkmsg=on" to the kernel command line).

will come next

Another question: do your system have a separate /usr ?
# df -h /usr
Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
/dev/sda2           20G      16G  3,6G  82% /
Comment 5 Freek de Kruijf 2019-01-29 14:07:26 UTC
(In reply to Franck Bui from comment #1)
> If not it might be interesting to reboot with the debug logs enabled (append
> "systemd.log_level=debug printk.devkmsg=on" to the kernel command line).

# journalctl -u systemd-modules-load.service
-- Logs begin at Tue 2019-01-29 15:00:30 CET, end at Tue 2019-01-29 15:06:39 CET. --
jan 29 15:00:32 eiktum systemd[1]: systemd-modules-load.service: Changed dead -> exited
jan 29 15:00:32 eiktum systemd[1]: systemd-modules-load.service: Installed new job systemd-modules-load.service/stop as 121
jan 29 15:00:32 eiktum systemd[1]: systemd-modules-load.service: Changed exited -> dead
jan 29 15:00:32 eiktum systemd[1]: systemd-modules-load.service: Job systemd-modules-load.service/stop finished, result=done
jan 29 15:00:32 eiktum systemd[1]: Stopped Load Kernel Modules.
jan 29 15:00:56 eiktum systemd[444]: systemd-modules-load.service: Executing: /usr/lib/systemd/systemd-modules-load
jan 29 15:00:56 eiktum systemd-modules-load[444]: Skipping overridden file '/usr/lib/modules-load.d/sg.conf'.
jan 29 15:00:56 eiktum systemd-modules-load[444]: apply: /usr/lib/modules-load.d/multipath.conf
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: scsi_dh_alua
jan 29 15:00:56 eiktum systemd-modules-load[444]: Module 'scsi_dh_alua' is already loaded
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: scsi_dh_emc
jan 29 15:00:56 eiktum systemd-modules-load[444]: Module 'scsi_dh_emc' is already loaded
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: scsi_dh_rdac
jan 29 15:00:56 eiktum systemd-modules-load[444]: Module 'scsi_dh_rdac' is already loaded
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: dm_multipath
jan 29 15:00:56 eiktum systemd-modules-load[444]: Module 'dm_multipath' is already loaded
jan 29 15:00:56 eiktum systemd-modules-load[444]: apply: /etc/modules-load.d/sg.conf
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: sg
jan 29 15:00:56 eiktum systemd-modules-load[444]: Module 'sg' is already loaded
jan 29 15:00:56 eiktum systemd-modules-load[444]: apply: /etc/modules-load.d/yast.conf
jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: snd-hda-intel
jan 29 15:00:57 eiktum systemd-modules-load[444]: Inserted module 'snd_hda_intel'
jan 29 15:00:57 eiktum systemd[1]: systemd-modules-load.service: Child 444 belongs to systemd-modules-load.service.
jan 29 15:00:57 eiktum systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=0/SUCCESS
jan 29 15:00:57 eiktum systemd[1]: systemd-modules-load.service: Changed start -> exited
jan 29 15:00:57 eiktum systemd[1]: systemd-modules-load.service: Job systemd-modules-load.service/start finished, result=done
jan 29 15:00:57 eiktum systemd[1]: Started Load Kernel Modules.
jan 29 15:01:11 eiktum systemd[1]: systemd-modules-load.service: Changed dead -> exited
jan 29 15:01:24 eiktum systemd[1]: systemd-modules-load.service: Changed dead -> exited
jan 29 15:01:25 eiktum systemd[1]: systemd-modules-load.service: Changed dead -> exited
jan 29 15:01:26 eiktum systemd[1]: systemd-modules-load.service: Changed dead -> exited
Comment 6 Franck Bui 2019-01-29 14:20:10 UTC
(In reply to Freek de Kruijf from comment #4)
> [...]
> jan 29 10:07:43 eiktum systemd-modules-load[221]: Failed to insert module
> 'snd_hda_intel': No such file or directory

Interesting at this point the module can't be found...

> jan 29 10:08:03 eiktum systemd-modules-load[439]: Inserted module 'snd_hda_intel'

but soon after it was found...

It would have been interesting to see the full logs so we could have seen what made the module available.

My guess is that the module is missing in the initramfs.

Could you run the following command ?

  $ lsinitrd | grep "snd_hda_intel\|modules-load"

> Another question: do your system have a separate /usr ?
> # df -h /usr
> Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
> /dev/sda2           20G      16G  3,6G  82% /

Apparently /usr doesn't have a dedicated partition on your system, does it ?
Comment 7 Freek de Kruijf 2019-01-29 14:59:51 UTC
(In reply to Franck Bui from comment #6)
> (In reply to Freek de Kruijf from comment #4)
> Could you run the following command ?
> 
>   $ lsinitrd | grep "snd_hda_intel\|modules-load"

# lsinitrd | grep "snd_hda_intel\|modules-load"
drwxr-xr-x   2 root     root            0 Jan 26 13:44 etc/modules-load.d
-rw-r--r--   1 root     root          102 Nov  7 15:48 etc/modules-load.d/sg.conf
-rw-r--r--   1 root     root           14 Apr 20  2018 etc/modules-load.d/yast.conf
drwxr-xr-x   2 root     root            0 Jan 26 13:44 usr/lib/modules-load.d
-rw-r--r--   1 root     root          102 Jan 10 15:19 usr/lib/modules-load.d/multipath.conf
-rw-r--r--   1 root     root            3 Dec  7 14:44 usr/lib/modules-load.d/sg.conf
-rwxr-xr-x   1 root     root        18560 Dec 10 13:37 usr/lib/systemd/systemd-modules-load
lrwxrwxrwx   1 root     root           31 Jan 26 13:44 usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service -> ../systemd-modules-load.service
-rw-r--r--   1 root     root         1011 Dec 10 13:36 usr/lib/systemd/system/systemd-modules-load.service

> > Another question: do your system have a separate /usr ?
> > # df -h /usr
> > Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
> > /dev/sda2           20G      16G  3,6G  82% /
> 
> Apparently /usr doesn't have a dedicated partition on your system, does it ?

Right, it does not.
Comment 8 Franck Bui 2019-01-29 15:35:22 UTC
can you find snd_hda_intel in one of the following .conf file ?
                                          
 /etc/modules-load.d/sg.conf
 /usr/lib/modules-load.d/multipath.conf
 /etc/modules-load.d/yast.conf
Comment 9 Freek de Kruijf 2019-01-29 15:45:25 UTC
(In reply to Franck Bui from comment #8)
> can you find snd_hda_intel in one of the following .conf file ?
>                                           
>  /etc/modules-load.d/sg.conf
>  /usr/lib/modules-load.d/multipath.conf
>  /etc/modules-load.d/yast.conf

Nowhere to be found.
Comment 10 Franck Bui 2019-01-29 16:57:54 UTC
(In reply to Freek de Kruijf from comment #9)
> Nowhere to be found.

According to:

> jan 29 15:00:56 eiktum systemd-modules-load[444]: apply: /etc/modules-load.d/yast.conf
> jan 29 15:00:56 eiktum systemd-modules-load[444]: Loading module: snd-hda-intel

it's in yast.conf...

Can you try to find where snd-hda-intel is defined (try using grep for example) ?
Comment 11 Martin Wilck 2019-01-29 17:08:53 UTC
(In reply to Franck Bui from comment #3)
> Martin, we recently moved sg.conf out from systemd package to
> suse-modules-load.service so this might be related...
> 
> I just noticed that you choose to place sg.conf in /etc/... but I'm not sure
> to understand why as /etc is sysadmin's territory. We used to have it in
> /usr/... but if this module can be involved to mount /usr, /lib might be a
> better choice.

This is the rationale:

    Move sg.conf to /etc and mark it as config file
    
    suse-module-tools traditionally places files below /etc and not
    /usr/lib. On non-SCSI systems, forcing sg to load makes no sense;
    make it easier for admins to override that behavior.
Comment 12 Freek de Kruijf 2019-01-29 17:15:35 UTC
(In reply to Franck Bui from comment #10)
> it's in yast.conf...
> 
> Can you try to find where snd-hda-intel is defined (try using grep for
> example) ?

Yes. Its in /etc/modules-load.d/yast.conf; its the only line in that file.
Also in /etc/modprobe.d/50-sound.conf, /etc/modprobe.d/50-sound.conf.YaST2save and
/etc/modprobe.d/my-alsa.conf
Comment 13 Martin Wilck 2019-01-29 17:18:27 UTC
> /etc/modules-load.d/yast.conf

Where does that file come from? I don't have it on my system. What exactly is the content?
Comment 14 Franck Bui 2019-01-29 17:27:45 UTC
Also what the output of:

 $ lsinitrd -f etc/modules-load.d/yast.conf
Comment 15 Freek de Kruijf 2019-01-29 17:29:37 UTC
(In reply to Martin Wilck from comment #13)
> > /etc/modules-load.d/yast.conf
> 
> Where does that file come from? I don't have it on my system. What exactly
> is the content?

It is inserted on Apr 20, 2018 see attached y2log.
Comment 16 Freek de Kruijf 2019-01-29 17:32:55 UTC
Created attachment 795539 [details]
y2log-2.gz

yast2 logfile compressed
Comment 17 Freek de Kruijf 2019-01-29 17:33:57 UTC
(In reply to Franck Bui from comment #14)
> Also what the output of:
> 
>  $ lsinitrd -f etc/modules-load.d/yast.conf

# lsinitrd -f etc/modules-load.d/yast.conf
snd-hda-intel
Comment 18 Franck Bui 2019-01-30 08:31:14 UTC
To sum up:

 - for some unknown reasons YaST2 created  /etc/modules-load.d/yast.conf which
   lists snd-hda-intel

 - yast.conf is included in initrd but snd-hda-intel is missing
   from there therefore the loading of this module fails inside initramfs

 - after switching to rootfs, systemd-modules-load.service tries to load
   the modules again and this time snd-hda-intel is present and the loading
   succeed.

This leads to the following questions:

 - why YaST2 forces the loading of snd-hda-intel on this system ?

 - do we really need to load snd-hda-intel in initrd ?

     - if not, we might want to prevent dracut from including it somehow

     - if so, yast2 should make sure that snd-hda-intel is embedded (not sure
       to understand why dracut didn't pick it up though. Even if hostonly=1
       is used it should have selected it I think)

At that point I think the YaST team should have a look.

Also Ccing Takashi as he might want to comment on that.
Comment 19 Martin Wilck 2019-01-30 09:10:22 UTC
(In reply to Franck Bui from comment #18)
>  - why YaST2 forces the loading of snd-hda-intel on this system ?

Good question. The module used to be loaded just fine with HW autodetection, AFAIK. Perhaps there are some corner cases where autodetection doesn't work?
Anyway IMO "modules-load.d" should always be a last resort. There are plenty of other ways to enforce module load order.

>  - do we really need to load snd-hda-intel in initrd ?

I'd say definitely not, unless we're targeting text-to-speech for the dracut emergency mode.

> 
>      - if not, we might want to prevent dracut from including it somehow

We'd need a general mechanism to tell dracut which modules-load.d files to include and which to exclude. I'm not aware of such a thing.

>      - if so, yast2 should make sure that snd-hda-intel is embedded (not sure
>        to understand why dracut didn't pick it up though. Even if hostonly=1
>        is used it should have selected it I think)

@Freek, could you provide "dracut --debug" output from your system?
Comment 20 Franck Bui 2019-01-30 09:16:30 UTC
(In reply to Martin Wilck from comment #19)
> We'd need a general mechanism to tell dracut which modules-load.d files to
> include and which to exclude. I'm not aware of such a thing.

If "modules-load.d" should always be a last resort (which I agree with) then we could prevent dracut from importing the content of modules-load.d by default and if a module really needs to be loaded in initrd with "modules-load.d" then a .conf file could be dropped in /etc/dracut.conf.d/ to instruct dracut to import the specific conf file in "modules-load.d".
Comment 21 Martin Wilck 2019-01-30 09:48:50 UTC
(In reply to Franck Bui from comment #20)

> If "modules-load.d" should always be a last resort (which I agree with) then
> we could prevent dracut from importing the content of modules-load.d by
> default and if a module really needs to be loaded in initrd with
> "modules-load.d" then a .conf file could be dropped in /etc/dracut.conf.d/
> to instruct dracut to import the specific conf file in "modules-load.d".

That'd need to be discussed upstream.
Comment 22 Takashi Iwai 2019-01-30 10:52:20 UTC
The entry for snd-hda-intel in /etc/modules-load.d is definitely superfluous, and it's not needed for initrd at all.

I really wonder how this yast.conf slipped in there.  I tested the standard YaST2 sound configuration now, and it doesn't save the file there but only adjust /etc/modprobe.d/...
Comment 23 Freek de Kruijf 2019-01-30 11:22:05 UTC
Created attachment 795605 [details]
output of: dracut --debug > /home/freek/dracut--debug.txt 2>&1
Comment 24 Freek de Kruijf 2019-01-30 11:25:10 UTC
(In reply to Takashi Iwai from comment #22)
> The entry for snd-hda-intel in /etc/modules-load.d is definitely
> superfluous, and it's not needed for initrd at all.
> 
> I really wonder how this yast.conf slipped in there.  I tested the standard
> YaST2 sound configuration now, and it doesn't save the file there but only
> adjust /etc/modprobe.d/...

You may find the answer in the attached YaST2 log file.
Comment 25 Martin Wilck 2019-01-30 11:31:12 UTC
(In reply to Freek de Kruijf from comment #23)
> Created attachment 795605 [details]
> output of: dracut --debug > /home/freek/dracut--debug.txt 2>&1

> dfatal 'Will not override existing initramfs (/boot/initrd-4.20.2-1-default) without --force'

That didn't work. You need to run

   dracut --debug -f /boot/initrd-4.20.2-1-default.TEST 4.20.2-1-default

Sorry for having lazily omitted the default arguments.
Comment 26 Freek de Kruijf 2019-01-30 12:44:22 UTC
(In reply to Martin Wilck from comment #25)
> (In reply to Freek de Kruijf from comment #23)
> > Created attachment 795605 [details]
> > output of: dracut --debug > /home/freek/dracut--debug.txt 2>&1
> 
> > dfatal 'Will not override existing initramfs (/boot/initrd-4.20.2-1-default) without --force'
> 
> That didn't work. You need to run
> 
>    dracut --debug -f /boot/initrd-4.20.2-1-default.TEST 4.20.2-1-default
> 
> Sorry for having lazily omitted the default arguments.

I used:

dracut --debug -f /boot/initrd-4.20.2-1-default.TEST 4.20.2-1-default > /home/freek/dracut--debug.txt 2>&1

File /home/freek/dracut--debug.txt will be attached.
Comment 27 Freek de Kruijf 2019-01-30 12:47:28 UTC
Created attachment 795614 [details]
/home/freek/dracut--debug.txt.xz
Comment 28 Martin Wilck 2019-01-30 13:03:06 UTC
(In reply to Freek de Kruijf from comment #27)
> Created attachment 795614 [details]
> /home/freek/dracut--debug.txt.xz

Hmm, this log pretty much looks as if snd-hda-intel had indeed been included in the initrd this time. Could you double-check (lsinitrd /boot/initrd-4.20.2-1-default.TEST | grep snd)?
Comment 29 Freek de Kruijf 2019-01-30 14:04:10 UTC
(In reply to Martin Wilck from comment #28)
> (In reply to Freek de Kruijf from comment #27)
> > Created attachment 795614 [details]
> > /home/freek/dracut--debug.txt.xz
> 
> Hmm, this log pretty much looks as if snd-hda-intel had indeed been included
> in the initrd this time. Could you double-check (lsinitrd
> /boot/initrd-4.20.2-1-default.TEST | grep snd)?

# lsinitrd /boot/initrd-4.20.2-1-default.TEST | grep snd
-rw-r--r--   1 root     root        28779 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/core/snd-hwdep.ko
-rw-r--r--   1 root     root        71707 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/core/snd-rawmidi.ko
-rw-r--r--   1 root     root        18035 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/core/snd-seq-device.ko
-rw-r--r--   1 root     root        66163 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/core/snd-timer.ko
-rw-r--r--   1 root     root       182475 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/hda/snd-hda-core.ko
-rw-r--r--   1 root     root       313347 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/pci/hda/snd-hda-codec.ko
-rw-r--r--   1 root     root        98739 Jan 24 17:17 lib/modules/4.20.2-1-default/kernel/sound/pci/hda/snd-hda-intel.ko

Indeed it is there.
Comment 30 Freek de Kruijf 2019-01-30 14:15:08 UTC
A boot with this TEST initrd still shows the unknown symbols.

jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_add_chmap_ctls (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_sgbuf_get_chunk_size (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_format_width (err -2)
jan 30 15:08:45 eiktum systemd-modules-load[218]: Failed to insert module 'snd_hda_intel': No such file or directory
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_add_chmap_ctls (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_sgbuf_get_chunk_size (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_format_width (err -2)
jan 30 15:08:45 eiktum systemd[1]: Reached target Remote File Systems.
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_add_chmap_ctls (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_sgbuf_get_chunk_size (err -2)
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_format_width (err -2)
jan 30 15:08:45 eiktum systemd[1]: Starting Show Plymouth Boot Screen...
jan 30 15:08:45 eiktum systemd[1]: Received SIGRTMIN+20 from PID 333 (plymouthd).
jan 30 15:08:45 eiktum kernel: ACPI: bus type USB registered
jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol snd_pcm_add_chmap_ctls (err -2)
Comment 31 Steffen Winterfeldt 2019-01-30 14:49:37 UTC
Please run 'save_y2logs' and attach the complete log archive.
Comment 32 Martin Wilck 2019-01-30 15:18:15 UTC
(In reply to Freek de Kruijf from comment #30)
> A boot with this TEST initrd still shows the unknown symbols.
> 
> jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol
> snd_pcm_add_chmap_ctls (err -2)
> jan 30 15:08:45 eiktum kernel: snd_hda_core: Unknown symbol
> snd_sgbuf_get_chunk_size (err -2)

These symbols are from snd_pcm. It seems that something goes wrong with the module dependency resolution for snd_hda_intel in dracut.

I don't think this deserves further debugging on the dracut. It's not helpful to force sound modules into the initrd.
Comment 33 Freek de Kruijf 2019-01-31 12:07:09 UTC
Created attachment 795697 [details]
output of save_y2logs
Comment 34 Steffen Winterfeldt 2019-01-31 12:55:51 UTC
'yast2 sound' takes the liberty to add it:

> 2018-04-20 11:59:22 <1> eiktum(10173) [Ruby] modules/Kernel.rb:483 Adding module to be loaded at boot: snd-hda-intel

While I would question the usefulness of this I also think that dracut should
continue to produce workable initrds if the user *does* do it and we shouldn't start arguing about bad and good modules here.

AFAIK yast's sound module hasn't seen functional changes for years so the
module thing must have worked so far.
Comment 35 Steffen Winterfeldt 2019-01-31 13:20:39 UTC
modules-load.d(5) doesn't forbid sound modules so I think it should work (even if it's not very elegant).
Comment 36 Takashi Iwai 2019-01-31 13:27:42 UTC
Well, can we find out the culprit why snd-hda-intel gets added there at first?

dracut should be fixed to deal with that module, yes, but the primary bug is that YaST put the module entry wrongly by some reason.  This must be fixed above all.

(IOW, *luckily* dracut was buggy so that the issue surfaced :)
Comment 37 Takashi Iwai 2019-01-31 13:30:04 UTC
BTW, we have another bug report for the same issue wrt dracut and snd-hda-intel in bug 1120747, so the dracut issue can be tracked there.
In this bug, let's concentrate on YaST side.
Comment 38 Steffen Winterfeldt 2019-01-31 14:45:10 UTC
It's what yast's sound module always did, I guess. See e.g. bug 838185 for the systemd related migration.

Maybe sometimes it is necessary to add module options to sound modules? I've no idea. What do you think, is yast's sound module needed at all or could we even drop it?
Comment 39 Steffen Winterfeldt 2019-01-31 14:52:42 UTC
I just run 'yast sound' (for the first time ever...) and it looks basically like a frontend for alsa sound module options.

If the expectation is that it should *not* mess with modules the whole exercise seems pretty pointless to me.
Comment 40 Steffen Winterfeldt 2019-01-31 14:55:11 UTC
As there's not even an explanation of the individual module options presented, I don't see any real value. Again, I'd vote for dropping this yast modules.
Comment 41 Takashi Iwai 2019-01-31 15:00:05 UTC
I myself don't mind at all to drop yast2-sound, but some people may miss it :)
Originally it was for setting up the sound devices in a non-PnP manner, but it's already legacy.  The only purpose nowadays would be to set up the options via GUI.

But my question still remains -- why snd-hda-intel was added there.
In include/sound/write_routines.rb, it checks the bus and it adds the entry only if it's neither PCI nor USB.

        # load the module automatically on boot
        if entry["bus"] != "pci" && entry["bus"] != "usb" && !module_name.empty?
          Builtins.y2milestone("The soundcard is not attached to PCI or USB")
          Kernel.AddModuleToLoad(module_name)
          ret = Kernel.SaveModulesToLoad
        end

And snd-hda-intel is a PCI driver, so it shouldn't have been added, if I understand the code correctly...
Comment 42 Steffen Winterfeldt 2019-01-31 15:50:33 UTC
The problem seems to be this:

> Save card: $["alias":"snd-card-0", "model":"RV770 HDMI Audio [Radeo
n HD 4850/4870]", "module":"snd-hda-intel", "options":$["index":"0"], "unique_key":"5yAR.dhjYDcGDBr3"]

This looks a bit mixed up. Not sure from where it originates; maybe some left-over from an update or hardware change in the past?
Comment 43 Freek de Kruijf 2019-01-31 23:13:55 UTC
(In reply to Steffen Winterfeldt from comment #42)
> The problem seems to be this:
> 
> > Save card: $["alias":"snd-card-0", "model":"RV770 HDMI Audio [Radeo
> n HD 4850/4870]", "module":"snd-hda-intel", "options":$["index":"0"],
> "unique_key":"5yAR.dhjYDcGDBr3"]
> 
> This looks a bit mixed up. Not sure from where it originates; maybe some
> left-over from an update or hardware change in the past?

I have this system from 2010 using the intel sound system on the motherboard. A few years ago my monitor died, so I got a new monitor which was first driven by the VGA interface (full-HD) and used the intel sound system. My display card died and I got a more simple display card, which was first used with the VGA interface. Later I changed things to use the HDMI interface also for the sound. Tumbleweed was used from the very start of it. I needed to experiment/configure quite a lot to get sound running via HDMI. Still I want to listen to the sound via a headset, but did not get it working; only possible via the intel card. I use YaST and systemsettings to configure the sound system.

Hope this answers your question.
Comment 44 Steffen Winterfeldt 2019-02-01 14:06:01 UTC
Thanks!

Tracking in YaST Scrum board.
Comment 45 Vadim Krevs 2019-07-08 20:27:14 UTC
*** Bug 1073382 has been marked as a duplicate of this bug. ***
Comment 46 Martin Vidner 2021-02-02 16:29:08 UTC
*** Bug 1181663 has been marked as a duplicate of this bug. ***
Comment 47 Freek de Kruijf 2021-04-15 11:05:34 UTC
No further response. Will start a new issue when problem surfaces again.