You are not logged in.

#1 2012-10-25 15:47:45

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

boot-time module-loading trouble

Recently, I've noticed a fair bit of documentation discouraging the use of /etc/modules-load.d/ , as most modules are auto-loaded by udev. While that's true, I'm still seeing some need to force-load some modules that surprises me, and I was wondering if others see these problems as well.

- "alsactl restore" is sometimes run (from alsactl-restore.service) before my sound drivers are loaded, causing it to fail with 'load_state:1696: No soundcards found...'

- netcfg tries to start my network before my ethernet driver is loaded, causing it to fail with 'Cannot find device "eth0"'

I've worked around these race conditions by listing these modules in /etc/modules-load.d/ , which makes them load earlier than udev would do it, making me win the race. It doesn't feel like a good answer, though.

- udev doesn't autoload powernow-k8 for me, which is surprising since CPU autoscaling driver are supposed to be autoloaded since kernel 3.4

Offline

#2 2012-10-25 16:11:08

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: boot-time module-loading trouble

the netcfg issue is about to be fixed: https://mailman.archlinux.org/pipermail … 03331.html

Offline

#3 2012-10-26 07:40:01

bart_b
Member
Registered: 2012-06-16
Posts: 20

Re: boot-time module-loading trouble

Just put your 'alsactl restore' command  in /etc/rc.local

alsactl -f /var/lib/alsa/asound.state restore

and 'alsactl store' in /etc/rc.local.shutdown

alsactl -f /var/lib/alsa/asound.state store

Offline

#4 2012-10-26 10:02:55

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: boot-time module-loading trouble

bart_b wrote:

Just put your 'alsactl restore' command  in /etc/rc.local

alsactl -f /var/lib/alsa/asound.state restore

and 'alsactl store' in /etc/rc.local.shutdown

alsactl -f /var/lib/alsa/asound.state store

no, rc.local{,.shutdown} should not be used anymore.

btw, there is also a udev rule for "alsactl restore" ( /usr/lib/udev/rules.d/90-alsa-restore.rules ). That makes me wonder why there even is a service file for this as well.
Are the alsa settings actually not restored or are they restored by the udev rule and it is just the service that is failing?

Offline

#5 2012-10-26 10:34:41

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,680

Re: boot-time module-loading trouble

ataraxia wrote:

Recently, I've noticed a fair bit of documentation discouraging the use of /etc/modules-load.d/ , as most modules are auto-loaded by udev. While that's true, I'm still seeing some need to force-load some modules that surprises me, and I was wondering if others see these problems as well.

- "alsactl restore" is sometimes run (from alsactl-restore.service) before my sound drivers are loaded, causing it to fail with 'load_state:1696: No soundcards found...'

- netcfg tries to start my network before my ethernet driver is loaded, causing it to fail with 'Cannot find device "eth0"'

You are not alone
https://bbs.archlinux.org/viewtopic.php … 8#p1180838

Offline

#6 2012-10-26 14:37:06

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: boot-time module-loading trouble

65kid wrote:
bart_b wrote:

Just put your 'alsactl restore' command  in /etc/rc.local

alsactl -f /var/lib/alsa/asound.state restore

and 'alsactl store' in /etc/rc.local.shutdown

alsactl -f /var/lib/alsa/asound.state store

no, rc.local{,.shutdown} should not be used anymore.

btw, there is also a udev rule for "alsactl restore" ( /usr/lib/udev/rules.d/90-alsa-restore.rules ). That makes me wonder why there even is a service file for this as well.
Are the alsa settings actually not restored or are they restored by the udev rule and it is just the service that is failing?

A good question. I never noticed that udev rule, and I never checked if the settings were right after I saw the service fail - I always just restored manually before using the sound.

Offline

Board footer

Powered by FluxBB