Hacker News new | ask | show | jobs
by ligerzer0 1701 days ago
A bit of a sidenote:

PopOS came installed on my system76 laptop. But that's not important here.

What intrigues me more is that the laptop had terrible battery life. And I mean terrible by even 2010 standards. And I bought it in 2018. It would last less than an hour on average, and less than 40 minutes if I was doing something demanding.

I use past term "had" as although I am still using this laptop today, somehow after 3 years, it's battery life has just increased dramatically and completely out of the blue.

Somehow I can now use it for over three hours while running off battery life. I've been pretty confused as to how this has happened, and am now wondering if anyone with a system76 might have experienced something similar.

I'm really hoping it will go up to nine hours by 2024. It's a great laptop.

4 comments

I have the same problem. Last time I researched system76, there were at least some models based on the same Clevo laptops as the one I have. I get 2 hours of battery life on these laptops.

They have dedicated nvidia GPUs. Due to the poor state of proprietary nvidia drivers, there's no hybrid graphics support. The kernel can't turn the dedicated GPU off and switch to integrated graphics. So it just stays on at all times and those things consume a lot of power. I actually measure the power draw constantly using the nvidia management library and it's very interesting to see all kinds of random software suddenly trigger massive power usage spikes. The hardware-accelerated kitty terminal is a major offender. Turning off the GPU in the firmware settings extended battery life to about 6-7 hours.

Maybe system76 worked some kind of miracle here and got hybrid graphics working? That would be amazing.

I have a 14" System76 Gazelle running Debian with hybrid graphics through primus-vk-nvidia[0] and the proprietary drivers and I would say it works fairly well, albeit only after a substantial amount of trial-and-error with the configuration to make it stable. (Most notably, I blacklisted the bbswitch driver since it tended to cause lockups—the system seems to work just fine without it.) Most applications rely exclusively on the integrated Intel UHD Graphics 630 GPU but I can add a "pvkrun" prefix to any command to have it render on the discrete GTX 1660 Ti and copy the image data back to the iGPU for display. I haven't fully optimized the power consumption, but the driver for the NVIDIA card is unloaded when not in use so the discrete graphics should be completely idle.

I haven't used Pop!_OS much lately, but from what I remember at the time I received the system with Pop!_OS preinstalled there were options in the main menu (alongside shut down / reboot) to switch between integrated and discrete graphics. The change involved a system reboot, and there wasn't any support for hybrid graphics.

[0] https://packages.debian.org/sid/primus-vk-nvidia

> primus-vk-nvidia

This is new to me! I'll try it out one of these days. Last time I dealt with this stuff bumblebee was still in use. There was also a hack to spawn a second hardware-accelerated X server.

> Last time I dealt with this stuff bumblebee was still in use.

The primus-vk-nvidia stack still uses Bumblebee. It replaces the original PRIMUS component with a version that shares the image data through the Vulkan APIs, which seems to have fewer issues with incompatible OpenGL versions (even when both the app and the compositor are using OpenGL and not Vulkan). Perhaps something about Vulkan being designed from the start to support multiple vendor backends in the same process, vs. OpenGL where you generally have to load a single vendor's implementation?

Have you tried using TLP? https://linrunner.de/tlp/

There is also "Auto CPUfreq", but I have not tried it yet. Automatic CPU speed & power optimizer for Linux: https://github.com/AdnanHodzic/auto-cpufreq

Power management on a laptop is a careful dance between a bunch of hardware, firmware, 'BIOS', and the purported OS running the device (more like running in a small part of the device). It doesn't take much going wrong to completely wreck the battery life of a laptop.
At a guess, perhaps PopOS updated something to do with power management.
I tried multiple distros in the first couple months--without notable effect on the battery life, which I should mention for this particular machine, has been subjected to much slander on internet forums--including Ubuntu, Mint, and then Manjaro, which I eventually settled on and it has been running on there to this day.