Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617782 - media-sound/alsa-utils-1.1.2 "alsactl: unrecognized option '---'" on boot
Summary: media-sound/alsa-utils-1.1.2 "alsactl: unrecognized option '---'" on boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo ALSA team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-08 01:36 UTC by Virgil Dupras (RETIRED)
Modified: 2017-07-17 12:46 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Virgil Dupras (RETIRED) gentoo-dev 2017-05-08 01:36:17 UTC
I've been having this weird error on boot (I use openrc) for a while now and I've decided to investigate it. At boot, it would always hang for a couple of seconds at "Restoring Mixer Levels" and spit this: "alsactl: unrecognized option '---'"

After mangling with /etc/init.d/alsasound, it turns out that it's because of this line:

local cards="$(sed -n -e 's/ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)"

At boot time, on my system, /proc/asound/cards contains "--- no soundcard ---" and this sed expression is to loose, so it captures "---"!

On my system, I could fix the problem by changing the sed expression to 's/^ *\([[:digit:]]*\) .*/\1/p'

By adding the "^", we ensure that it only matches lines that actually start with a space instead of starting the match at the first space character of the line.
Comment 1 Roberto Vallega 2017-05-09 16:06:13 UTC
Same error in one of my box (openRC), the troubleshooting was way out of my depth...
A couple of days ago, I set up a new rig cloning the root partition of the affected machine and the new rig booted without errors; this puzzled me until I've read this bug report.
Your fix worked for me too.
Comment 2 Virgil Dupras (RETIRED) gentoo-dev 2017-07-17 12:46:23 UTC
My commit was merged in https://github.com/gentoo/gentoo/commit/f79bf1ba54fd2cb5cb9b8fcbdc9e99fea1b9acc7 .