Saving power by disabling sound chip on Linux

This entry was posted by on Monday, 10 September, 2012 at

For years I have been running Linux servers. Some time ago I built a NAS box running Ubuntu Server. I’ve done quite some tweaks to reduce power consumption. But there must be more. Or less, so to speak.

First, you need to see what’s using power, and control it:

apt-get install powertop cpufrequtils laptop-mode-tools

Especially powertop is great. First, run “sudo powertop –calibrate” for it to gather statistics for your system (this may take a while). Then just run “sudo powertop” and browse around.

In the ‘overview’ section on my NAS it said the Realtek device was busy 100%. Which makes no sense, as I am using this box as a NAS so it could have done without audio chip altogether.

Next, have a look at your modules:


There I noticed a lot of modules related to the sound subsystem, i.e. the Realtek chip in my ATOM board. There’s no need to load all these modules. Also, the bluetooth module is loaded, but not used.

Luckily, there is a simple way to disable the bluetooth and sound system, by blacklisting these kernel modules. To do this, edit /etc/modprobe.d/blacklist.conf.

I added the following lines, these modules all showed up in lsmod:

blacklist bluetooth
blacklist snd_hda_codec_realtek
blacklist snd_hda_intel
blacklist snd_hda_codec
blacklist snd_hwdep
blacklist snd_pcm
blacklist snd
blacklist snd_timer
blacklist snd_page_alloc
blacklist soundcore

(note to take care not to blacklist any modules you actually need!)

After a reboot they do no longer show up in lsmod.

There may also be other modules which can be unloaded. I’m thinking of ‘lp’ (printer), ‘parport’ and ‘video’.

Of course all this is only worth something if we can quantify the savings. This is still a TODO.

2 Responses to “Saving power by disabling sound chip on Linux”

  1. Just for reference, the output of a powertop –calibrate

    skidder@spetznas:~$ sudo powertop --calibrate
    Loaded 0 prior measurements
    Cannot load from file /var/cache/powertop/saved_parameters.powertop
    Starting PowerTOP power estimate calibration 
    Calibrating idle
    sh: 1: /usr/bin/xset: not found
    sh: 1: /usr/bin/xset: not found
    Calibrating: disk usage 
    Calibrating backlight
    .... device /sys/class/backlight/intel_backlight/brightness 
    Calibrating idle
    sh: 1: /usr/bin/xset: not found
    sh: 1: /usr/bin/xset: not found
    Calibrating: CPU usage on 1 threads
    Calibrating: CPU usage on 4 threads
    Calibrating: CPU wakeup power consumption
    Calibrating: CPU wakeup power consumption
    Calibrating: CPU wakeup power consumption
    Calibrating USB devices
    .... device /sys/bus/usb/devices/usb1/power/control 
    .... device /sys/bus/usb/devices/usb2/power/control 
    .... device /sys/bus/usb/devices/usb3/power/control 
    .... device /sys/bus/usb/devices/usb4/power/control 
    .... device /sys/bus/usb/devices/usb5/power/control 
    Calibrating radio devices
    Finishing PowerTOP power estimate calibration 
    Parameters after calibration:
    Parameter state 
    Value           Name
     0.00           backlight (4)
     0.00           backlight-boost-100 (8)
     0.00           backlight-boost-40 (6)
     0.00           backlight-boost-80 (7)
     0.00           backlight-power (5)
    100.00          base power (31)
     1.56           cpu-consumption (3)
    39.50           cpu-wakeups (2)
     0.00           disk-operations (34)
     0.20           disk-operations-hard (33)
     0.00           eth0-link-100 (13)
     0.00           eth0-link-1000 (14)
     0.00           eth0-link-high (15)
     0.00           eth0-packets (16)
     0.00           eth0-powerunsave (12)
     0.00           eth0-up (11)
     0.56           gpu-operations (32)
     0.00           runtime-0000:00:00.0 (17)
     0.00           runtime-0000:00:02.0 (18)
     0.00           runtime-0000:00:1c.0 (19)
     0.00           runtime-0000:00:1c.1 (20)
     0.00           runtime-0000:00:1c.2 (21)
     0.00           runtime-0000:00:1c.3 (22)
     0.00           runtime-0000:00:1d.0 (23)
     0.00           runtime-0000:00:1d.1 (24)
     0.00           runtime-0000:00:1d.2 (25)
     0.00           runtime-0000:00:1d.3 (26)
     0.00           runtime-0000:00:1d.7 (27)
     0.00           runtime-0000:00:1f.2 (28)
     0.00           runtime-0000:01:00.0 (29)
     0.00           runtime-0000:05:00.0 (30)
     0.10           usb-device-1d6b-0001 (10)
     0.10           usb-device-1d6b-0002 (9)
    Score:    0.0  (  0.0)
    Guess:  100.1
    Actual:   0.0
    Leaving PowerTOP

    As for what this all means, I am not sure but if someone can explain. Also, I’m not use about the line:

    sh: 1: /usr/bin/xset: not found

    Which is I think a tool for tweaking a mouse input device. Rather odd for powertop to ask for this. Maybe the message will disappear when I install xset, but it should not be needed on a NAS installation. For now I’ll just leave it.

  2. DEBEL

    Has been resolved thanks to, thank you.

Leave a Reply