LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-08-2021, 02:02 PM   #1
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
current64: udev 90-alsa-restore.rules not being run on startup


When I boot current64, it doesn't look like 90-alsa-restore.rules is being run by udev. I have chmod -x on /etc/rc.d/rc.alsa, and have relied on the udev rules to do the "alsactl restore" up until now. Not exactly sure when this broke, but I know it used to work.

Anyway, if after a boot I udevadm trigger -c add -s sound, the rules are run and the mixer values are set to values stored in asound.state, so the rules do work.

Anyone have any ideas why udev is failing to run these rules during boot? I'm at a loss.

Last edited by GazL; 09-08-2021 at 05:48 PM. Reason: typo
 
Old 09-08-2021, 08:08 PM   #2
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 318

Rep: Reputation: Disabled
Any useful info in syslog if you turn on udevd's logging? This can be done either with udev.conf or with a kernel command line argument. See udevd(8) and udev.conf(5).
 
1 members found this post helpful.
Old 09-09-2021, 03:14 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Original Poster
Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
Thanks for the suggestion. That got me to look again.

I'd already checked out the logs and didn't see anything of significance, but it seems neither of the approaches to turning on logging actually work on slackware. In the end I had to add -D 2>/run/udev.debug to the /sbin/udevd --daemon invocation in rc.udev to get it to work.

Anyway, that lead to an answer:
Code:
'/usr/sbin/alsactl restore 0'(err) '/usr/sbin/alsactl: load_state:1651: Cannot open /var/lib/alsa/asound.state for reading: Read-only file system'
So, udev not at fault here. Alsa is.


Why a read-only filesystem woould prevent "opening a file for reading" is beyond me. Nice one alsa devs!

So, we have a reason, even if it doesn't make sense.


I have wondered before whether moving the rootfs 'rw' toggle earlier in rc.S wouldn't be a bad idea.
 
Old 09-09-2021, 03:38 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
I have wondered before whether moving the rootfs 'rw' toggle earlier in rc.S wouldn't be a bad idea.
Not before checking the file systems read-only. As an aside checking f2fs file systems is not done. Didn't I post yet about that? Here:
Code:
    if [ ! -r /etc/fastboot ]; then
        # The root partition has an F2fs file system
        if [ "$ROOTFS" = "f2fs" ]; then
            PERIODICITY=5
            # PERIODICITY is set in /etc/f2fs.conf if it exists, overriding
            # the value in previous line.
            [ -f /etc/f2fs.conf ] && . /etc/f2fs.conf
            if [ -f /var/lib/f2fs/next ]; then
                NEXT=$(cat /var/lib/f2fs/next)
            else
                NEXT=5
                FIRST="mkdir -p /var/lib/f2fs"
            fi
            if [ $NEXT -gt 0 ]; then
                LATER="echo $((NEXT - 1)) >/var/lib/f2fs/next"
            else
                echo "Checking root file system. Please be patient, this can take several minutes..."
                /usr/sbin/fsck.f2fs -f $ROOTDEV 1>/dev/null
                RETVAL=$?
                LATER="echo $PERIODICITY >/var/lib/f2fs/next"
            fi
        else
 
Old 09-09-2021, 05:06 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Original Poster
Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
I've moved that whole rootfs checking section up near the beginning.
My rc.S now does it in this order:
  1. sets the clock
  2. mount /proc, /sys, /run.
  3. rootfs check and remount section.
  4. mtab section
  5. rc.loop
  6. rc.udev
  7. the rest...


I'll mark this as SOLVED.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/udev/rules.d/40-libsane.rules and /etc/udev/rules.d/S99-2000S1.rules missing LABEL=libsane_rules_end mumahendras3 Slackware 6 03-09-2020 02:27 AM
auditctl -l not showing any rules even though i have rules written in audit.rules alphaguy Linux - Security 1 02-07-2014 05:28 PM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration