13

Laptop-mode is said to be one of the energy efficiency boosters for Linux. Now, sources I found say that to activate it you need to:

  1. Install laptop-mode-tools.
  2. Append LAPTOP_MODE_ENABLED=true (if it doesn't exist; otherwise make sure that it's set to true) inside /etc/default/acpi-support.

However, even after doing this, laptop mode is not running (I have it set up in /etc/laptop-mode/laptop-mode.conf to be always on):

~$ cat /proc/sys/vm/laptop_mode 
0

Does anyone know how can I enable laptop-mode?

It is mentioned here that the Ubuntu package is "crippled". Is it really the case that Ubuntu doesn't allow you to enter this mode on AC? If so, why?

Edit: It seems that laptop-mode is not necessary any more since Ubuntu 12.04, according to Is "laptop-mode-tools" still relevant for 12.04 and the 3.x kernels?

Eliah Kagan
  • 117,780
metakermit
  • 2,640
  • 1
    I have laptop mode enabled on my system though – Mysterio Aug 26 '12 at 17:34
  • Laptop mode magically started working without me changing anything, so I guess the above steps are sufficient. I must have not rebooted enough times (or I maybe just did a log off - log on and that isn't enough). – metakermit Aug 27 '12 at 19:19
  • See also: http://askubuntu.com/questions/172391/is-laptop-mode-tools-still-relevant-for-12-04-and-the-3-x-kernels – Jorge Castro Aug 29 '12 at 16:06

4 Answers4

12

The steps listed in the question are correct, the only thing remaining is to reboot your machine (possibly a couple of times). After that laptop mode will be enabled:

~$ cat /proc/sys/vm/laptop_mode 
2

Once laptop-mode is working, you can follow these steps to configure laptop-mode...

Edit /etc/laptop-mode/laptop-mode.conf and change

ENABLE_LAPTOP_MODE_ON_AC=0

to

ENABLE_LAPTOP_MODE_ON_AC=1

Also check for the battery mode on battery state and turn it on if it is off by changing the value to 1

e.g.: ENABLE_LAPTOP_MODE_ON_BATTERY = 1

You can set many other option in this config file (the file has many self-explanatory comments). You should try setting them to your liking.

When you're done, restart laptop-mode with:

sudo /etc/init.d/laptop-mode restart

P.S. If laptop-mode is still not on after rebooting the machine, you can try playing with this command as well to manually enable it:

Check that it's active on AC with for example:

$ sudo laptop_mode start

which should output:

Laptop mode 
enabled, 
active [unchanged]

Hope this helps..

metakermit
  • 2,640
Mysterio
  • 12,018
  • Thanks for the tips about configuring laptop-mode. I also picked those settings in laptop-mode.conf. Just take care to have the LAPTOP_MODE_ENABLED=true inside /etc/deffault/acpi-support so that you don't have to turn it on manually every time - it seems this does work in the end. – metakermit Aug 27 '12 at 19:22
  • please what line is this setting on inside the acpi-support file? – Mysterio Aug 28 '12 at 05:58
  • 1
    I appended it to the end of the file, because it didn't exist in my acpi-support file. Take a look at the original question, I edited it to be more clear. – metakermit Aug 29 '12 at 14:29
  • Why did you change powersave mode on in AC by ENABLE_LAPTOP_MODE_ON_AC=1? I am thinking it here http://unix.stackexchange.com/q/307646/16920 where I need power in computations, especially when I am in AC. – Léo Léopold Hertz 준영 Sep 03 '16 at 11:48
3

enter root by

sudo su

and then

echo 5 > /proc/sys/vm/laptop_mode

If you want more tips to save power check out LessWatts. I was able to extend my battery life from 2 hours to 3 and a half.

Steiger
  • 7,567
0

Anyone looking at this in 2024 or beyond should probably be aware of TLP, which is a modern alternative to laptop-mode-tools. Laptop-mode-tools still exists, but I personally like TLP.

The need for either may be less than it used to be with good CPU scaling support in kernels, but if you have neither you are still potentially leaving power savings on the table while on battery mode.

While TLP is very tuneable, its defaults are conservative, reliable and will aim to get the best power reduction it can in laptop mode without noticeably affecting the feeling of performance at all.

You can further reduce power usage by editing its config file, though you should probably consult documentation while doing so.

Anyway I thought it was worth a mention.

thomasrutter
  • 36,774
0

In Lubuntu Menu choose Preferences -> Default applications for LXSession -> Settings -> Laptop mode -> yes

loop
  • 290
  • 2
  • 8
  • What does this actually do? – Michael Jul 04 '18 at 06:06
  • I don't know. With a quick search I got the impression that it might be related to TLP or Laptop mode tools:

    "14. Tweaks For Ubuntu Power Management ...

    Apart from these tips, you can follow to install TLP, which helps to keep the laptop cool and safe. ... You can also Install Laptop Mode Tools, which helps to reduce power consumption by slowing down Hard disk speed and kernel control. To install it run the following command…

    sudo ..."

    – loop Jul 04 '18 at 06:40