Bug 1181663 - YaST2 sound configurator wrongly creates /etc/modules-load.d/yast.conf
Summary: YaST2 sound configurator wrongly creates /etc/modules-load.d/yast.conf
Status: RESOLVED DUPLICATE of bug 1116849
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: 64bit openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 19:52 UTC by Jesper Goll
Modified: 2021-02-02 16:29 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesper Goll 2021-02-01 19:52:39 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0
Build Identifier: 

When I configure my default sound card in YaST2, the configurator creates the file /etc/modules-load.d/yast.conf -- the file contains the name of the sound card driver: "snd-hda-intel".

While this may sound innocent enough, it is not: modules-load.d seems to be an incorrect way to load the sound card driver. When this yast.conf file is there, it causes the system to attempt loading the driver at the wrong time or in the wrong way. The result is that sound is disabled after boot (no sound cards recognized), and so has to be activated manually with modprobe. Doing so works well enough, it just won't happen as part of the boot sequence.

This only happens, however, after regeneration of initrd (which is not triggered by YaST). In other words, you can reconfigure your sound card, and everything looks fine -- until the next system update that triggers mkinitrd. After that, the sound card will go south in the way described.

The cure for this problem is simple enough once you know it: Remove the file /etc/modules-load.d/yast.conf, then run mkinitrd.

Suggested fix: YaST2 should not produce this file. It seems to be an obsolete thing that has resurfaced, perhaps due to a code regression?

Reproducible: Always

Steps to Reproduce:
1.Configure default sound card in YaST
2.Execute mkinitrd
3.Reboot
Actual Results:  
The file /etc/modules-load.d/yast.conf is created by YaST. After execution of mkinitrd, the sound card boot sequence will be broken, resulting in no available sound devices.
The problem is somewhat aggravated by the fact that mkinitrd will not necessarily occur immediately after the faulty sound configuration happened. If mkinitrd occurs instead upon the next system update where it is required -- whereupon the error becomes apparent -- it will be quite difficult to isolate its cause.

Expected Results:  
YaST should not be creating the /etc/modules-load.d/yast.conf file - so that the sound card remains functional even after a subsequent execution of mkinitrd.

Environment:

yast2-sound 4.3.3-1.5

Lenovo Thinkpad P70

Operating System: openSUSE Tumbleweed 20210130
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.9-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-6820HQ CPU @ 2.70GHz
Memory: 23,2 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 530
Comment 1 Martin Vidner 2021-02-02 16:29:07 UTC
Thanks for the report!

The file /etc/modules-load.d/yast.conf
is created by the Kernel.rb library: https://github.com/yast/yast-yast2/blob/06c67e0398a3f81ae1cbcfdab4baebd9eb633460/library/system/src/modules/Kernel.rb

The modules-load.d directory is used by systemd: https://www.man7.org/linux/man-pages/man5/modules-load.d.5.html
and the man page does say:
> Note that it is usually a better idea to rely on the automatic
> module loading by PCI IDs, USB IDs, DMI IDs or similar
> triggers encoded in the kernel modules themselves instead
> of static configuration like this. In fact, most modern
> kernel modules are prepared for automatic loading already.

In fact this problem has been reported before, we should raise its priority.

*** This bug has been marked as a duplicate of bug 1116849 ***