Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Laptop tools
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1782
Location: PB, Germany

PostPosted: Tue Apr 30, 2024 8:14 am    Post subject: Laptop tools Reply with quote

Hi,

my installation was migrated for years and maybe I'm based on obsolete tools. What is today required for mobile laptops in general?

I was always using app-laptop/laptop-mode-tools and it's still working. At least it does set harddrive parameters for spindown and dirty timeouts while today the laptop only has NVMe drives, /etc/laptop-mode/conf.d/intel_pstate.conf is throttling the CPU on battery. So it still sounds useful.
Last update was 1.74 - Sat Jul 18 19:10:40 IST 2020.

On IRC I read that laptop-mode-tools are not the modern way anymore. On Intel platforms sys-power/tlp would be used, and on AMD platforms sys-power/power-profiles-daemon would be used.

I looked around https://wiki.gentoo.org/wiki/Category:Laptops and only found model-specific Wikis, but no common Gentoo-on-laptops Wiki.
Which tools do I need today and for which generation and architecture?

For not dealing with that many modern kernel options and required firmwares I currently just run a distro-kernel sys-kernel/gentoo-kernel-bin and a complete sys-kernel/linux-firmware, using 1,1G /lib/firmware/ which is 583M usage by btrfs zstd compression.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1833

PostPosted: Tue Apr 30, 2024 10:07 am    Post subject: Reply with quote

What's the specific issue you're trying to solve? And yes, I haven't heard of laptop mode tools since 2010 when it still was a thing and I still had a ThinkPad. When I returned back to Linux in 2018 it was already outdated. Nowadays I personally don't use anything else other than power-profiles-daemon on my AMD laptop and I don't even think it does anything useful.

Best Regards,
Georgi


Last edited by logrusx on Tue Apr 30, 2024 1:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1782
Location: PB, Germany

PostPosted: Tue Apr 30, 2024 11:05 am    Post subject: Reply with quote

As usual, saving power by throttling CPU, GPU, harddisks, frequencies, dirty cycles, displays, brightness, timeouts etc...
A lot of all that what laptop-mode-tools already do and still doing.
At least there have been updates to the project after your comeback. Beside that, I'm using Linux since 2003, never left and nothing else. All years before have been a waste of time.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2044

PostPosted: Tue Apr 30, 2024 12:19 pm    Post subject: Reply with quote

I use laptop tools. I last looked a couple of years ago, and it was still as good as anything else. Mostly you want to ensure your kernel and drivers have all the necessary low power modes supported, the right frequency driver (IIUC schedutil is what the kernel guys recommend), and the appropriate thermal drivers for your hardware. IIUC you're using a general-purpose kernel, so you should have those already. There's not much more for the tools to do than select the lower-energy settings when running on batteries, and laptop tools does that. IMHO steer clear of using hdparm or whatever to spin down disks, if you still have any - you can lose data, and spinning up a disk takes quite a bit of power compared with just keeping them spinning, so the saving isn't that large. Better, replace the disk with an SSD and your laptop will appear 10 times faster as well as consuming less power.

If you try the power monitoring tool (the proper one, I forget its name, but it's more detailed than the one built into desktop GUIs), you'll almost certainly find that top consumer is the cpu if running 100% (but usually it's idling), then the screen. All the rest tends to be minor, so once you have the frequency driver working, the next best way to save energy is to turn the screen off!
_________________
Greybeard
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1833

PostPosted: Tue Apr 30, 2024 1:13 pm    Post subject: Reply with quote

Massimo B. wrote:
As usual, saving power by throttling CPU, GPU, harddisks, frequencies, dirty cycles, displays, brightness, timeouts etc...
A lot of all that what laptop-mode-tools already do and still doing.
At least there have been updates to the project after your comeback. Beside that, I'm using Linux since 2003, never left and nothing else. All years before have been a waste of time.


Screen brightness I control myself and it doesn't depend on the battery. When I need more brightness, I need more brightness, period. My eyes do not care if the laptop is on battery power. The rest is already taken care of by the hardware nowadays. At least on AMD hardware. The only thing I remember explicitly doing, aside from switching to quiet profile(EFI firmware function, limits CPU frequency and boost), was to set the CPU frequency governor to powersave and it didn't substantially improve battery life.

However I have to admit there's an unknown amount of work systemd is doing for me in that regard. Also Gnome has a pretty good screen management with dimming it and turning it off.

Best Regards,
Georgi
Back to top
View user's profile Send private message
xgivolari
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2021
Posts: 101

PostPosted: Tue Apr 30, 2024 3:57 pm    Post subject: Reply with quote

For most intents and purposes, TLP at default settings works very well. With newer laptops, it is important to ensure that S0ix/modern standby is working properly, and that the system is reaching lower runtime power states. You can use S0ixSelftestTool and powertop for that. If you are running GNOME or KDE, power-profiles-daemon integrates very nicely with these. However, it is neither as extensive as, nor compatible with TLP. Both work just fine on Intel and AMD systems. Additionally on intel, it is recommended to install thermald for better thermal/power management.
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1782
Location: PB, Germany

PostPosted: Thu Jun 20, 2024 11:21 am    Post subject: Reply with quote

You mean, neither sys-power/tlp nor sys-power/power-profiles-daemon are architecture specific and both should work on Intel and AMD? And power-profile-daemon only integrates well when using KDE or Gnome?
I'm using Xfce, OpenRC (no systemd). So for all that systemd does for powersaving, I don't have that.

So I keep laptop-mode-tools for now, as it does not harm, mostly sets harddisk powersaving, usually not that important when using SSDs.
What else I need, tlp, power-profiles-daemon?

I started with powertop. On some old Ivy Bridge desktop, it doesn't work, eventhough the kernel seems to have that all:
Code:
# powertop
modprobe cpufreq_stats failed
Failed to mount debugfs!
exiting...

# zgrep -i -e cpufreq -e  debugfs /proc/config.gz
CONFIG_ACPI_EC_DEBUGFS=y
CONFIG_X86_PCC_CPUFREQ=m
# CONFIG_X86_ACPI_CPUFREQ is not set
... but not important on a desktop.

On a mobile Tigerlake, powertop finds a lot of Tunables marked as "Bad". Most of them switch to "Good" when disconnecting power supply. The only 2 remaining bad are "VM writeback timeout" and "Enable Audio codec power managment", which I could manually toggle, receiving this:
Code:
>> echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
>> echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';

_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1782
Location: PB, Germany

PostPosted: Thu Jun 20, 2024 11:27 am    Post subject: Reply with quote

Next one, testing tlp. The project sounds good and modern, applying quite the same as powertop --auto-tune would do:
Code:
# tlp start

***Warning: laptop-mode-tools detected, this may cause conflicts with TLP.
            Please uninstall laptop-mode-tools.

TLP started in AC mode (auto).

Ok, that at least conflicts with laptop-mode-tools and features might overlap.
Anyway, I just disabled the laptop-mode-tools daemon for now.

But doing a tlp start makes the system unusable slow, not responding anymore. No tlp ac or tlp bat solves it. Only disconnecting AC power and connecting again makes it work again.
In the syslog I noticed some
Code:
Jun 20 13:29:12 [kernel] [13146.366090] NOHZ tick-stop error: local softirq work is pending, handler #08!!!

Doing a rc-service tlp start does not show that issue.
Time to file a bug report for tlp...: https://github.com/linrunner/TLP/issues/745
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum