FS#3609 - Bug in /etc/rc.sysinit and /sbin/hwdetect

Attached to Project: Arch Linux
Opened by Rob (RobK) - Monday, 12 December 2005, 02:29 GMT
Last edited by arjan timmerman (blaasvis) - Monday, 12 December 2005, 09:15 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I am currently using arch 0.7.1 (noodle) on my old Toshiba 4020CDT Laptop. This laptop uses an old ISA sound chipset from Yamaha -- the opl3sa2 chipset. This ISA sound chipset is not PNP. In fact it is rather hard for Linux to detect this sound card (or any other ISA sound card). (E.g. Alsaconf manually probes for ISA sound cards in known locations and prays that it can find them!)

Whenever you boot the computer, the /etc/rc.sysinit script is executed. In my case, rc.sysinit first loads the snd-opl3sa2 and snd-pcm-oss modules since they are listed in my /etc/rc.conf. Then rc.sysinit tries to autoload other modules using /sbin/hwdetect --load-modules. At this stage I get the following message is displayed 5 times during bootup:

"find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver.
Automatically turning on find -noleaf option."

The rest of the bootup goes smoothly.

If I remove the two modules, snd-opl3sa2 and snd-pcm-oss, from /etc/rc.conf, I do not get the message above during bootup. But of course my sound card is NOT setup. After bootup, I can manually load the modules using modprobe. I do NOT see any Warning or Error messages when I manually load the modules using modprobe.

It would appear that the bug is with /sbin/hwdetect. It does not like seeing the snd-opl3sa2 module when it autoloads oher modules.

In my view, there are a couple of quick fixes. Modify the rc.sysinit file so that the autoloading of modules happens first. Then rc.sysinit should load the modules listed in /etc/rc.conf. This will eliminate the problem. But if there are modules that should be loaded before autoloading of other modules, this will just create a new problem!

Alternatively, /etc/rc.conf and /etc/rc.sysinit can be modified so that users can list NOT ONLY modules that will be loaded BEFORE autoloading of other modules BUT ALSO list modules that will be loaded AFTER autoloading of other modules.

This will give the needed flexibility.

Better yet, perhaps someone can fix the real bug in /sbin/hwdetect.

Rob
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Friday, 16 December 2005, 06:52 GMT
Reason for closing:  Fixed
Comment by Tobias Powalowski (tpowa) - Monday, 12 December 2005, 10:32 GMT
would you post your outpit from:
hwdetect --show-modules
hwdetect --show-modules-order
thanks
Comment by Rob (RobK) - Monday, 12 December 2005, 13:47 GMT
No Problem. But it might be a day or two before I can post the output.
I just installed arch. I still need to install Xorg, icewm and firefox. Once I get that up and running, it should be easy to post the results via cut and paste.

Rob
P.S. Hmm... I guess I could just save the results to a floppy and then use another computer to post the results.
Comment by Rob (RobK) - Monday, 12 December 2005, 18:06 GMT
At the last minute, I was able to free up some spare time. Below are the results of the /sbin/hwdetect --show-modules command:

find: WARNING: Hard link count is wrong for /sys/devices/: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
USB : usb-storage usblp usbhid usbcore uhci-hcd
NET : 8139too donauboe mii ppp_generic slhc irda
PCMCIA : pcmcia_core rsrc_nonstatic yenta_socket
OTHER : lp ppdev rtc i2c-piix4 i2c-core evdev pcspkr parport parport_pc crc-ccitt

Here are the results from the /sbin/hwdetect --show-modules-order command:

find: WARNING: Hard link count is wrong for /sys/devices/: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
find: WARNING: Hard link count is wrong for /sys/devices: this may be a bug in your filesystem driver. Automatically turning on find's -noleaf option. Earlier results may have failed to include directories that should have been searched.
MODULES ORDER: lp ppdev rtc i2c-piix4 i2c-core evdev pcspkr parport parport_pc crc-ccitt 8139too donauboe mii ppp_generic slhc irda pcmcia_core rsrc_nonstatic yenta_socket usb-storage usblp usbhid usbcore uhci-hcd

I do not know whether that warning messages prevents the autoloading of other modules.

As I mentioned earlier, I can eliminate these error messages during bootup if I delete the snd-opl3sa2 and snd-pcm-oss modules from my rc.conf (but of course my sound card is not set up).
As a quick fix, perhaps you could modify rc.conf and rc.sysinit to allow for certain modules to be loaded after the autoloading of other modules.

If you can find and fix a bug in hwdetect, that would be a better way to go.

If you need anything else, please let me know.

Rob
Comment by Rob (RobK) - Tuesday, 13 December 2005, 16:45 GMT
Here is another update. I installed "hwd" from the Arch Linux Repository. When I run hwd detect, it does NOT detect my sound card even thouh the snd-opl3sa2 module is installed and the sound is working. (e.g I can play .WAV files using aplay). This is not surprising since it is very difficult for Linux (or any other OS) to detect non PNP ISA Sound cards and sound chips.

Rob
Comment by Tobias Powalowski (tpowa) - Wednesday, 14 December 2005, 08:29 GMT
next hwdetect makes use of -noleaf option then the error messages should disappear,
does the sound work and only error messages appear?
then this should be the right fix, if sound doesn'T work we must find something different.
thanks
Comment by Rob (RobK) - Wednesday, 14 December 2005, 18:56 GMT
Where is the next version of hwdetect for me to test.
Is it in Current?

Rob
Comment by Judd Vinet (judd) - Wednesday, 14 December 2005, 21:21 GMT
Hi Rob,

You can find latest version in CVS here:

http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/initscripts/hwdetect
Comment by Tobias Powalowski (tpowa) - Wednesday, 14 December 2005, 21:23 GMT Comment by Tobias Powalowski (tpowa) - Thursday, 15 December 2005, 08:18 GMT
is it fixed now?
Comment by Rob (RobK) - Thursday, 15 December 2005, 13:24 GMT
Thanks for the links. I will test it tonght when I get home. About 11 hours from now. I will let you know then.

Rob
Comment by Rob (RobK) - Friday, 16 December 2005, 02:16 GMT
That did it!! I no longer get any more WARNING or ERROR messages when I boot up or when I run hwdetect --show-modules. Sound is still working.

Thanks a lot. It looks like this bug is squashed.

Congratulations!

Rob

Loading...