Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 384375 - media-sound/alsa-utils-1.0.24.2-r1: failed to execute '/usr/sbin/alsactl' during boot (with separate /usr)
Summary: media-sound/alsa-utils-1.0.24.2-r1: failed to execute '/usr/sbin/alsactl' dur...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords: Inclusion
Depends on: 364235
Blocks:
  Show dependency tree
 
Reported: 2011-09-25 00:07 UTC by Martin von Gagern
Modified: 2012-03-17 14:42 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch (gentoo384375a.patch,876 bytes, patch)
2011-09-25 10:10 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2011-09-25 00:07:18 UTC
For quite a while now, I've seen the following error message when booting my system:

 * Starting udevd                                             [ ok ]
 * Populating /dev with existing devices through uevents ...  [ ok ]
 * Waiting for uevents to be processed ...
udev[###]: failed to execute '/usr/sbin/alsactl' '/usr/sbin/alsactl restore 0': No such file or directory

udev[###]: failed to execute '/usr/sbin/alsactl' '/usr/sbin/alsactl restore 1': No such file or directory

 * Mounting /dev/pts ...                                      [ ok ]

The reason for the failure to execute that program is the fact that /usr isn't mounted yet at the time udev starts up; localmount is started a good while later on.

As the script /etc/init.d/alsasound should take care of saving and restoring mixer values for cold-plugged sound cards, I guess the best solution would changing /lib/udev/rules.d/90-alsa-restore.rules to only execute alsactl if the STARTUP variable is empty. Judging from the /etc/init.d/udev script, that should be a reasonable way to distinguish cold-plugging from hot-plugging.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-09-25 07:08:05 UTC
Separate /usr is not supported without initramfs that mounts it before init.
Comment 2 Marcin Mirosław 2011-09-25 08:11:28 UTC
Does gentoo install guide mention separate /usr can broke some packages?
Comment 3 Martin von Gagern 2011-09-25 10:10:23 UTC
Created attachment 287681 [details, diff]
Proposed patch

This patch avoids the call to alsactl during startup. The alsasound init script will take care of those, if RESTORE_ON_START is set.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-09-25 18:29:19 UTC
(In reply to comment #3)
> Created attachment 287681 [details, diff]
> Proposed patch
> 
> This patch avoids the call to alsactl during startup. The alsasound init script
> will take care of those, if RESTORE_ON_START is set.

Where are you setting the STARTUP env var?
Comment 5 Martin von Gagern 2011-09-25 19:40:36 UTC
(In reply to comment #4)
> Where are you setting the STARTUP env var?

The udev init script already does that.
Comment 6 Petr Zima 2011-10-28 14:17:22 UTC
Confirming, the same problem here. I am also using separate /usr and no initramfs.
Comment 7 Jan Hübner 2011-10-29 09:19:29 UTC
Why shouldn't that be supported? It worked all the time and is failing now.
Comment 8 Martin von Gagern 2012-01-04 11:23:52 UTC
Can someone please review my patch from comment #3, and either commit it or tell me what kind of problem he expects from it? Although this bug report here officially depends on bug #364235, the patch will work now even without a more general solution, and will still be required when there is a more general solution for /usr due to the fact that alsactl requires /var as well as /usr.
Comment 9 Marc Schiffbauer gentoo-dev 2012-01-05 13:52:45 UTC
I have the same problem here. Please apply the proposed patch.

Or use something like this maybe please:

--- 90-alsa-restore.rules.orig  2012-01-05 14:39:18.797991241 +0100
+++ 90-alsa-restore.rules       2012-01-05 14:41:37.974424192 +0100
@@ -1,2 +1,4 @@
+TEST!="/usr/sbin/alsactl", GOTO="alsa_end"
 ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="card*", \
         RUN+="/usr/sbin/alsactl restore $attr{number}"
+LABEL="alsa_end"
Comment 10 William Hubbs gentoo-dev 2012-01-05 16:49:08 UTC
Please post your emerge --info.

Thanks,

William
Comment 11 William Hubbs gentoo-dev 2012-01-05 16:53:28 UTC
(In reply to comment #8)
> Can someone please review my patch from comment #3, and either commit it or
> tell me what kind of problem he expects from it? Although this bug report here
> officially depends on bug #364235, the patch will work now even without a more
> general solution, and will still be required when there is a more general
> solution for /usr due to the fact that alsactl requires /var as well as /usr.

Actually the /var issue has already been discussed with udev upstream, and their position is that this is a trivial failure we don't need to worry about since it will be picked up by init systems later.

For us, /etc/init.d/alsasound takes care of it.
Comment 12 Marc Schiffbauer gentoo-dev 2012-01-05 23:50:47 UTC
emerge --info
Portage 2.2.0_alpha84 (default/linux/amd64/10.0/desktop, gcc-4.6.2, glibc-2.14.1-r2, 3.2.0-gentoo x86_64)
=================================================================
System uname: Linux-3.2.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-2720QM_CPU_@_2.20GHz-with-gentoo-2.1
Timestamp of tree: Thu, 05 Jan 2012 03:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.7
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.2
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo vmware mschiff-local mschiff kde sunrise
Installed sets: @kde-4.8, @kdepim-4.8, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Q3AEULA PUEL dlj-1.1 skype-eula googleearth AdobeFlash-10.1 google-talkplugin Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/tomoyo/conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --load-average=3.0 --tree --with-bdeps=y --complete-graph --quiet-build=n"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""                                                                                                                                                                               
GENTOO_MIRRORS="http://distfiles.gentoo.org"                                                                                                                                            
LANG="C"                                                                                                                                                                                
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                                                                       
LINGUAS="de"                                                                                                                                                                            
MAKEOPTS="-j14"                                                                                                                                                                         
PKGDIR="/usr/portage/packages"                                                                                                                                                          
PORTAGE_CONFIGROOT="/"                                                                                                                                                                  
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                                                                                                                                  
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                                               
PORTDIR="/usr/portage"                                                                                                                                                                  
PORTDIR_OVERLAY="/var/lib/layman/vmware /home/mschiff/gentoo/overlays/mschiff-local /home/mschiff/gentoo/overlays/mschiff /home/mschiff/gentoo/overlays/kde /home/mschiff/gentoo/overlays/sunrise"                                                                                                                                                                              
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"                                                                                                                                   
USE="X a52 aac aalib acl acpi adns akonadi alsa amd64 ao audiofile bacula-clientonly bacula-console bash-completion berkdb bluetooth branding btrfs bzip2 cairo caps cdda cddb cdr chm cli consolekit cracklib crypt css cups curl cxx dbus device-mapper dhclient djvu dri dts dvd dvdr ebook emboss encode exif fam ffmpeg firefox flac fortran gdbm gdu gif gimp glibc-omitfp gnome google-gadgets gpm gtk iconv id3tag ieee1394 ipod ipv6 jpeg jpeg2k kde kipi l7filter lame laptop lcms ldap libnotify lm_sensors logrotate loop-aes lzma lzo mad mjpeg mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib musicbrainz mysql ncurses networkmanager nls nptl nptlonly nsplugin ntp ogg openexr opengl openmp pam pango pch pcmcia pcre pdf phonon png policykit postgres ppds pppd pulseaudio qt3support qt4 readline rss samba sdl semantic-desktop session smapi smp sndfile spell spice sse sse2 ssl ssse3 startup-notification svg sysfs systemd tcpd threads thumbnail tiff truetype udev unicode usb vcd vim-syntax vnc vorbis webkit wifi x264 xattr xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth btrfs crypt lvm" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia nv" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 13 Martin von Gagern 2012-01-06 14:09:56 UTC
(In reply to comment #11)
> Actually the /var issue has already been discussed with udev upstream, and
> their position is that this is a trivial failure we don't need to worry about
> since it will be picked up by init systems later.
> 
> For us, /etc/init.d/alsasound takes care of it.

Of course not initializing the alsa cards at that point is nothing to worry about. Whether it's due to missing /usr or missing /var doesn't matter at that point. Most people using a bootsplash won't even notice the message.

But there are enough people on this report here to conclude that some people at least are annoyed by those error messages, particularly as they refer to a non-problem. So let's simply not init cards there, and let the alsasound init script take care of things later on. In other words, apply my patch.

(In reply to comment #9)
> Or use something like this maybe please:
> +TEST!="/usr/sbin/alsactl", GOTO="alsa_end"

Would work as well. But would silently ignore rare errors where alsactl isn't available. Also it would mean that people might see different behaviour depending on whether they have /usr in a separate partition or not. With my patch, you would get the same behaviour for all users. E.g. people who have disabled their alsasound init script will not get their cold-plugged cards initialized, no matter what partitioning scheme they use. Personally I'd consider this homogenity a feature.
Comment 14 William Hubbs gentoo-dev 2012-01-10 16:19:14 UTC
Since this is an issue with the alsa provided udev rules and not with udev
itself, there is really nothing the udev maintainers can do here.
I am re-assigning this to the alsa team.
Comment 15 Tony Vroon (RETIRED) gentoo-dev 2012-02-03 12:31:13 UTC
+*alsa-utils-1.0.25 (03 Feb 2012)
+
+  03 Feb 2012; Tony Vroon <chainsaw@gentoo.org> +alsa-utils-1.0.25.ebuild,
+  +files/alsa-utils-1.0.25-separate-usr-var-fs.patch:
+  Version bump. Add missed libsamplerate dependency, closes bug #383263 by
+  Hans. Patch by Martin van Gagern silences warnings when using a separate /usr
+  or /var partition, closes bug #384375. Upstream changes fix build breakage
+  when SED is set in the environment, closes bug #366587 by Nils Kneuper.
+  Automatic module loading & unloading is unsupported and may be removed soon.