X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=e1330040b7a3629b93343918be2c1a260c16034e;hp=a0e6f1731dd8e84c149ab9ed7733aeff70f30bbe;hb=97400bdad03aed28ce75f670ed7e145fadd336db;hpb=454375900808a5eaca840d65069576665237dbb1 diff --git a/autoconfig.functions b/autoconfig.functions index a0e6f17..e133004 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -960,14 +960,18 @@ if [ -x /etc/init.d/loadcpufreq ] ; then rm -f $LOADCPUFREQ if [ -z "$SKIP_CPU_GOVERNOR" ] ; then - einfo "Loading cpufreq_ondemand, setting ondemand governor" - RC=0 - if modprobe cpufreq_ondemand ; RC=$? ; then - for file in $(find /sys/devices/system/cpu/ -name scaling_governor 2>/dev/null) ; do - echo ondemand > $file - done - fi - eend $RC + if grep -vq ondemand /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors; then + einfo "Loading cpufreq_ondemand" + modprobe cpufreq_ondemand + eend $? + fi + + einfo "Setting ondemand governor" + RC=0 + for file in $(find /sys/devices/system/cpu/ -name scaling_governor 2>/dev/null) ; do + echo ondemand > $file || RC=1 + done + eend $RC fi # cpu-governor eoutdent @@ -1149,8 +1153,9 @@ config_mixer () { MICVOL=0 fi - for CONTROL in Master PCM ; do + for CONTROL in Master PCM Front ; do if amixer -q | grep -q "Simple mixer control '$CONTROL'" ; then + amixer -q set "${CONTROL}" unmute 1>/dev/null 2>&1 amixer -q set "${CONTROL}" "${VOL}"% eend $? fi