Saving power by disabling sound chip on Linux
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:
lsmod
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’.
Savings
Of course all this is only worth something if we can quantify the savings. This is still a TODO.
Has been resolved thanks to, thank you.
Just for reference, the output of a powertop –calibrate
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.