
Ask HN: Better efficiency in laptops running Linux? - ge96
So I have this laptop (nothing crazy) it&#x27;s an Acer Cloudbook 14, I bought it mainly because of the insane purported battery life of something like 12 hours. Also it looked really nice&#x2F;thin profile. Of course it&#x27;s pretty much a piece of garbage eg. visible pixels, 2GB fixed ram, etc... Still it&#x27;s not bad.<p>I found that running Windows 10 as it is, that&#x27;s really good on power management.<p>I was running Ubuntu and Lubuntu on it for a bit and found the battery performance to suck. I&#x27;m primarily interested in using Linux to drop the idle RAM usage, as it sits at like 900+MB without anything open (except background tasks).<p>I&#x27;m a web developer so normally I have a local LAMP server setup with i3-wm.<p>I was looking through some forums and one thing mentioned was to modify the kernel regarding power management.<p>I&#x27;m just wondering if this is a lost cause eg. no point in trying.<p>I just think, for example the Macbook Air supposedly has really good software that manages the task management and what not and this helps with battery life and resource management. I was wondering if I could do something similar with Linux regarding battery life.<p>Going into standby when not in use, closing the lid, etc... ultimately though yeah I want to extend that 2GB.<p>I know... this computer is garbage, I bought it for $99 on eBay. Even with 8GB running VM on my desktop, 8GB is almost not enough with 2GB set for the VM. I remember the days when I had 16GB ha.
======
viraptor
A few of those can be already done by the distribution, but if not, the main
points are:

\- make sure TLP is installed

\- disable Bluetooth if you don't use it

\- disable services you don't care about (file indexing for example)

\- use the right cpu scaling governor (you're likely interested in powersave)

\- enable power management on all devices which support it without issues
(tlp-stat will give you some hints)

\- check powertop for some ideas about what exactly is using the most power

\- update your system to the latest version (kernel gets power usage fixes all
the time)

\- there's often even more things to do - arch wiki
([https://wiki.archlinux.org/index.php/Power_management](https://wiki.archlinux.org/index.php/Power_management))
and ubuntu one
([https://wiki.ubuntu.com/Kernel/PowerManagement/PowerSavingTw...](https://wiki.ubuntu.com/Kernel/PowerManagement/PowerSavingTweaks))
may give you some ideas, but keep in mind they may be out of date a bit

~~~
ge96
Your first link there is for Arch, are you suggesting to use Arch or just
grabbed a link? I saw that you said "...done by distribution..."

Also file indexing, is that like a constant polling event to check for
modifications?

Thanks for the check list

~~~
viraptor
The hints are valid for any distribution. They usually rely on the kernel
settings, not anything userland. So it doesn't really matter if you're looking
at Arch, Ubuntu, or other guide. Even with specific services, the ideas
usually hold between distributions - maybe you just need to correct a path or
two.

File indexing services are things like _locate_ , _baloo_ , _zeitgeist_ , etc.
that try to save information about created files, so you can find them faster
later on. On one hand side they give you faster results, but on the other they
keep monitoring disk writes and impact your battery life.

~~~
ge96
So the file indexing services that you mentioned, often you have to go out of
your way to install these, these would not be part of default file/folder
management like pcmanfm?

I see Arch mentioned a lot. I used to be Linux Mint > Debian > tried Slackware
> Ubuntu.... Slackware kind of sucked just because it was harder to setup/a
lot of things didn't work like video playback. Not blaming it on them. Ubuntu
I primarily switched to because they had drivers that Debian would sometimes
not have like WiFi. Seems to make sense if more people use Ubuntu.

Anyway thanks.

~~~
viraptor
Baloo comes by default with most KDE installations. Ubuntu used tracker (don't
think it does anymore). So it's not that hard to find one of them running.

~~~
ge96
Thanks a lot for the information. Hopefully all of this will result in long
battery life.

------
blacksmith_tb
Generally a good place to start would be powertop[1]

1:
[https://github.com/fenrus75/powertop](https://github.com/fenrus75/powertop)

(my memory is it's in the Ubuntu repos so you should be able to apt install
it)

it has an "I'm feeling lucky" flag,

> powertop --auto-tune

which theoretically should make good choices for you.

~~~
ge96
Cool I will check that out. I do feel bad wiping the original OS though at
least with Windows 10 there's no worry about serials, also I did use USB 3.0
as a "hard drive" For a bit, but the inability to sleep I think since it has
to be constantly powered but I might be mistaken. I am using a USB 3.0 for a
house web server, pretty cool. Thanks.

------
ge96
Well it does work well, I am idling around 150MB, as opposed to 900MB+, but it
does suck with i3 when you resume, the wifi is off, screen dim isn't right,
mouse pad isn't on (can't turn back on yet from what I've tried) I did modify
/etc/rc.local ... other files regarding startup... I was able to set
background with feh, but on restart this is also lost.... ahh well.

Battery consumption is good though, hard to believe this thing pulls around
3-4 watts and it has a ~5500WH battery but I think my battery only charges to
~5200WH

------
brudgers
One difference between Linux and Windows is that Linux will allocate pretty
much as much RAM as the machine makes available and use it to avoid swapping
pages to the swap disk versus Windows which performs similarly when a bunch of
RAM is reported as free. Or to put it another way, Linux using all the RAM is
a good thing for the same reasons that Windows not using all the RAM is...it
means the system is running more or less optimally.

None of which directly relates to battery life. That's mostly a measure of
Microsoft being the target platform of system designers and Linux not being
the target. Linux power management will probably never be as good.

~~~
zaphirplane
That's no longer the case for some time

~~~
nsuser3
Linux still caches stuff in RAM?..

~~~
emergie
yup, it still does

cat /proc/meminfo

MemTotal: 32884616 kB

MemFree: 344496 kB

MemAvailable: 20994872 kB

Buffers: 1796324 kB

Cached: 18710768 kB

SwapCached: 0 kB

Active: 12009748 kB

Inactive: 18639200 kB

~~~
zaphirplane
I am taking about the windows side, it too now utilizes as much ram as you
have for caches

------
canterburry
I run a T520 Lenovo on Ubuntu and had similar challenges until I started to
manually turn my GPU on and off. Windows and Mac have excellent drivers which
automatically control GPU while Linux does not.

At least on Ubuntu if you have a Nvidia GPU there is a handy widget you can
install so simply toggle the GPU but it requires a logout/login each and every
time.

Just not the same experience as Windows but in terms of battery life it does
the job. I get about 3x battery life when in Intel Graphics vs my Nvidia.

~~~
gargravarr
This would be my first thought, I also have a laptop with Intel and nVidia
graphics. Have you tried Bumblebee? I have it installed, but I don't see much
difference. I didn't buy my laptop for the battery life, but it'd be nice if
it lasted more than an hour!

------
handcreme
I am running Arch Linux on the same laptop and have noticed a tremendous
increase in performance.

While trying out the preinstalled win10 I wasn't even able to playback 720p
YouTube videos without lags.

