How to improve your BATTERY LIFE on LINUX!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
it is not a rare site to see people saying that they experience worse battery life on Linux than on windows with the same Hardware some people might have better battery life but some will have drastically worse experiences so I thought it would be nice to take a look at what you can actually do to improve that if your laptop is a bit premature and finishes before you're actually done with it so we'll see how you can squeeze out more juice from your laptop running Linux but first we got to talk about our sponsor tuxedo computers they make laptops and desktops and kns that ship with Linux out of the box they let you pick from a selection of popular disres but you can also just install your own because in their testing tuxedo submit patches OB stream to make sure that all the hardware is well supported and if those patches haven't been accepted yet by the kernel or the Mesa drivers or any other system they have repost that you can add to most major dis Ros to actually fix this issu on your Hardware as well so when you go with tuxedo you know that the hardware is going to run under Linux no questions asked they have a broad range of devices from laptops for office work all the way up to workstations or gaming PCs or whatever else you want they are all pretty customizable with your own keyboard layout on your laptops your own logo engrave dundoid a solid selection of components of hard drive sizes of RAM and all the laptops can be opened repaired and upgraded so if you need a new computer computer you want to run Linux and you want to support a company that actually supports Linux click the link in the description below and get yourself something from toxo okay so the first thing we're going to take a look at when it comes to battery life is the actual health of your battery because if it's 10 years old and actually dying there's nothing much you're going to be able to do so if you use KDE you can check that battery health graphically you just open the settings then you click about this system and click on energy here you will see all the stats for battery including its health for my own laptop it's 94% solid enough especially considering this thing is charging and discharging constantly for a more desktop agnostic solution you can run the following command line present in the video description up power-i slorg slf freedesktop SLU power/ devices SL bb0 this command will tell you everything you need to know especially in the capacity stat if your battery is already very degraded in terms of capacity the obvious first thing to do is trying to replace it because you are not going to get 10 hours of battery life on a 10-year-old battery and I'm sure someone will tell me that their 2005 secondhand ThinkPad still has like battery life for days but I'm also pretty sure that that's not the case for most people with such old Hardware now our next thing will be a pretty obvious one if you watch videos or stream mov movies and shows from your browser check that it is actually using your GPU to accelerate that video decoding or even to render web pages if not then your computer is using the CPU which sucks for this kind of tasks and it will use more battery to check that in Firefox type about support in the URL bar then search for compositing in the page if it says web render you're good you're using the GPU if it says web render software then it's the CPU and that's no good to check if the GPU is used to decode videos you can also search for Hardware video uncore decoding if it says default available then you're good you're using the GPU on chromium based browsers to check for that you can type Chrome colon GPU in the URL bar and you will see if video decode is Hardware accelerated and if not you really need to enable Hardware acceleration for rendering web pages and for the coding videos because that's one of the biggest reasons that your computer might drain a lot more battery than what it's actually supposed to the CPU is not meant for drawing stuff on screen the GPU will be more efficient and use less battery life to do so so on Firefox to enable that you can open the about config page then you can search for media. Hardware DV video- decoding do enabled double click the value to set it to true you might need some additional packages for that to work if you use the Nvidia proprietary drivers you're good to go out of the box it comes with everything you need for Intel and AMD you need to add VA API support if your dis R doesn't ship that by default this will depend on the distribution you use you will have to check your dis Ros documentation for that most distributions should come with that out of the box you shouldn't have anything to install but if you use a very no nonf free software drro like for example certain variants of fedora or certain variants of Debian you might not have them installed check on your dis Ros documentation I just cannot give you all the instructions for all the disr in there on any Chrome based browser you can just go to the settings you can go to system and toggle use Graphics acceleration when available provided your Dro has the required packages you should be good also if your chromium based browser also completely change how the settings look and feel like for example with brave you might need to search through the settings for something called GPU or acceleration and if you have an older chipset that isn't able to decode all modern video formats using the GPU like for example vp8 or vp9 which are really frequently used on YouTube you have browser extensions called enhanced h264 eii for Firefox or just h264 IFI for Chrome which will let you set h264 as the default codec on YouTube meaning that you will always have Hardware accelerated video at least on YouTube and does save battery life h264 decoding should be available for virtually every single chips set out there unless it's really really really old so if you enable that at least on YouTube You should also save some battery life if you have an older integrated GPU now that's one thing out of the way most dros should already have all of that set up correctly but it never hurts to check because this could be a big reason why your laptop doesn't last as long as as it's supposed to now another very useful tool here will be TLP it's an all encompassing tool that will let you tweak a lot of settings to enable disable delay and generally configure your system so it draws less power it is on the surface a command line only tool but fear not there's a graphical user interface that is much more user friendly here called TLP UI it is available on flathub in the a for Arch users or you can install it with p pii as it is a python app obviously it needs the base TLP program to work you need to install that most dist repos should have it if you use auntu Fedora open soua gentu or Arch you have that in your repos or maybe even pre-installed the package should be called TLP or TLP RDW that second one RDW is to let you control Wi-Fi and Bluetooth to turn them off from time to time to save power when you're not using them now once install TLP will run automatically in the background after the first reboot if you open TLP UI after that you should see that it is enabled and you should get access to all the various settings they don't have super human legible names but if you go check on tlps documentation you have all the explanation of each one and what they do the most important ones will probably be on the diss tab when you can set the time in seconds before your disc goes into Idol to save some power if you set it to two on battery for example two seconds after the disc has stopped doing anything it will go idle and stop using as much battery as it did before in the graphics tab you can set the minimum and maximum frequency of your Intel GPU if you have one on battery and when plugged in same goes for your AMD GPU if you have that in the radon power profile settings Nvidia is not handled by this tool though probably because they do not have open source driver is available widely yet so you just cannot configure that from an open source tool right now you can also turn on Wi-Fi power saving mode or you can change the CPU scaling Governor from performance to power safe when using the battery for example another useful thing might be to disable CPU boost when on battery to make sure the CPU never quite takes off when you're not plugged in you also have the USB tab to put certain USB devices to sleep when they're not in use and if you use a ThinkPad there's even a dedicated tab for that it is a very complete tool that will let you tweak a lot of the behaviors of your Hardware think of it as the advanced options you could get on Windows in the old control panel settings TLP and also TLP UI will come with a default set of settings which should work better than the default for most dros for most people but if certain things are just not useful to you you are welcome to try and disable some things improve the delays tlpi will not let you input invalid settings so at worst you've disabled your Wi-Fi or your Bluetooth and you can just reenable it from tlpi there's virtually no chance it will break your computer or harm it in any way now if your computer has two gpus an integrated one and a dedicated one you might also want to check which one you're using right now when using your laptop unplugged you might want to use just the integrated GPU and when plugged in the dedicated GPU instead now the easiest way to do so is by staying in hybrid graphics mode if you have an Nvidia GPU and the proprietary drivers you can just open the Nvidia Settings app and head over to the prime profiles Tab and you can select Nvidia on demand you close the program you reboot and you'll be using the integrated GPU for everything unless an application requires the dedicated GPU in which case it will be run using the Nvidia GPU most good desktop environments will also let you force an application to use the dedicated GPU by right clicking it in the menu or upgrade and selecting run using dedicated GPU or run using discreete Graphics it also works on whand with Nvidia by the way that's what I currently use on my own laptop so you don't need to use X11 for that to work for AMD gpus though I am not aware of solid graphical tools that let you switch between these so you probably will have to use the BIOS to select that hybrid graphics mode personally though I don't find the savings from turning the dedicated GPU really balance out against the usefulness of having that GPU at a fingertip so I would much rather use hybrid graphics than completely disabling the dedicated GPU but sometimes it might be what you need also it is a good place to mention that if you use a computer from today's sponsor tuxedo you can get their tuxedo Control Center app and it lets you handle that switching from a little applet on top of letting you create really custom power profiles like for example I have one for battery and I have one for max power when I'm editing or gaming and of course there are some other usual basic changes you can make there's the usual screen brightness thing that can save you a ton of battery but obviously if you're not inside it might affect legibility the display's refresh rate though is also a factor when on battery you probably don't want to run your display at 144 HZ or even 90 HZ 60 is fine for most use cases when you're not plugged in if your display supports variable refresh rate it will also let you save some power some desktops already supported like KDE you can also turn off Wi-Fi and Bluetooth if you really don't need them but you didn't need me to tell you that and obviously the more recent your Hardware is the better the chances that a more recent kernel and drivers will give you better Hardware support and better performance in battery life if you have a very recent CPU or GPU from Intel AMD Nvidia or whoever else do not stick to an old Debian LTS or an old Ubuntu LTS or anything based on that use something more recent the latest upun 2 releases generally have good Hardware support but also the latest Fedora or a rolling release drro something Arch based or open to the tumble weed do not use old LDS for recent Hardware because obviously you do not have all the latest features all the latest support and all the latest improvements might not even have solid enough drivers to run this Hardware competently on older kernels so don't stick to LTS if you have very Modern Hardware you can also periodically run your system monitor to see what application or system uses the most CPU and close these programs or uninstall them or disable the related service if you don't need them and finally there are also some very lightweight disos that will use the least amount of resources possible stay tuned for a future video on the that exact topic though I have some pretty cool recommendations that I want to share probably next month so if you have everything said correctly according to this guide then you should definitely see some improvements to how long your laptop lasts when using Linux I personally applied all of these tips to my laptop with a dedicated Nvidia GPU and a recent 12th gen Intel CPU and I routinely see s to 8 hours of battery life with Wi-Fi on 50% brightness browsing the web writing scripts what ing videos I just don't do video editing when I do I get like 3 or 4 hours max which is still not that bad and of course there are other tools like Auto CPU Frack or power top but both of these can have some impacts on how usable your computer Auto CPU frck conflicts with TLP and TLP is way more feature complete so I would much rather use that and power toop I tried but it tended to disable my mouse and keyboard way too often on its default settings meaning that sometimes I typed something or clicked on something and my computer would take a second to react or not even register these key strokes or clicks so I would much rather not put it in this video for those reasons but of course those are tools you can still check out so hopefully you learned a thing or two and maybe this will help you improve your battery life on Linux just like it did for me so thanks for watching I hope you enjoyed the video if you did you know what to do there's this like button subscribe the notification Bell the comment section whatever else and if you really enjoyed the channel I left plenty of links in the description of the video becoming a patron member or a YouTube member will let you get access to a daily Linux and open source news show on top of voting on my topics a weekly patreon cast and a lot of other stuff so check that out in the description in the meantime thanks for watching and I guess you'll see me in the next one bye
Info
Channel: The Linux Experiment
Views: 53,133
Rating: undefined out of 5
Keywords: linux, open source, linux tutorial, linux 2023, opensource, linux tips, distro, linux for beginners 2023, linux vs windows, linux tutorial 2024, improve linux battery, linux battery life, battery life laptop, laptop linux battery, ubuntu battery life, tlp, autocpufreq, gpu acceleration linux, gpu video decode linux, vaapi linux, best linux laptop, how to improve linux batter life, get better battery on linux, linux battery, ubuntu battery, arch battery life, fedora battery life
Id: YE431SYO2Is
Channel Id: undefined
Length: 15min 43sec (943 seconds)
Published: Thu Apr 18 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.