[TLP] 2017-12-12 - Call for testing: new TLP defaults

Introduction

I've just pushed a new version for TLP to unstable (tlp=1.0-1.1). This changes several default settings for TLP. These need testing to make sure they don't have any unseen side-effects (though I've been running these myself for the last few months on three systems without issue).

You will have to merge or replace /etc/default/tlp with the new settings if you have made any changes to that file - check for a /etc/default/tlp.pacnew.

You'll also either have to reboot or reload and restart TLP (systemctl daemon-reload; systemctl restart tlp) for the changes to take effect.

Please test as best you can (e.g. check powertop output before and after) and feed back. Please post if you find any changes or you have any issues; please also include your hardware details where relevant.

If you can't see the update yet it will be mirrors - you can download directly from e.g.

Changes

SATA_LINKPWR_ON_BAT=min_power => medium_power

Be less aggressive with SATA ALPM to prevent poor SSD performance and potential data corruption.

RADEON_POWER_PROFILE_ON_AC=high => default

Use hardware defaults for open-source AMD drivers. This allows demand-based power scaling and can vastly reduce heat generation.

SOUND_POWER_SAVE_ON_AC=0 => 1

Enable audio power saving on AC power. We don't need to run things constantly at full power.

RUNTIME_PM_ON_AC=on => auto

Enable runtime power management for PCI(e) on AC power. We don't need to run things constantly at full power.

USB_AUTOSUSPEND=1 => 0

Disable aggressive USB device autosuspend. This prevents "hidden" issues with USB hardware that is incompatible.

Note: this may increase power usage - it remains to be seen what effect it will have. However, IMHO better compatibility with devices (and fewer random issues) makes it better as a default.

Development thread with more detail


Any issues?

  • No obvious issues
  • I have an issue (post)

0 voters

Any effect on power draw?

  • No obvious effect on power draw
  • Power draw is reduced
  • Power draw is increased

0 voters

Any effect on heat generation?

  • No obvious change to heat
  • Heat output is reduced
  • Heat output is increased

0 voters

Any effect on system performance?

  • No obvious change to performance
  • Performance is increased
  • Performance is reduced

0 voters

Any effect on hardware functionality?

  • No obvious changes to hardware
  • Hardware works that didn't before
  • Hardware no longer works

0 voters

6 Likes

Did not install a pacnew file?

locate tlp  | grep etc               
/etc/default/tlp
/etc/systemd/system/multi-user.target.wants/tlp.service
/etc/systemd/system/sleep.target.wants/tlp-sleep.service

If you made no changes to the original you won't have a .pacnew. :wink:

And I thought I had :wink: But old age and only on my first coffee is probably the reason :smiley:

I've not downloaded the new build but applied the settings to my custom TLP profiles on each machine where applicable to the hardware concerned.

My desktop has radeon R3 GPU integrated into the APU so I applied the power profile tweak to it. no noticeable change in responsiveness. It never produced excessive heat or used that much power anyway so it's hard to measure any real impact even with powertop

As for the rest, they mainly are on the notebook. None of them impact performance or power usage massively. The one I haven't changed permanently is the USB auto suspend as all of my devices were fine with =1.

I had (except for the radeon specific) these settin in works for a long time - funny enough =)
I pulled the new TLP to my (otherwise testing) laptop and it works very well =) suspend to ram, my usually bad behaving sierra WWAN card now seems to wake up more consistantly.

Finally no more USB autosuspend! :slight_smile:

Is that the same setting as the usbcore.autosuspend boot parameter? That can also be set to -1 (instead of 0).

Generally I like the new settings. I don't think they will change power consumption that much.
However I don't understand why audio power saving should be enabled on AC power...

TLP blacklisting of nvidia gpus on optimus systems to get bumblebee switching working reliably.

# Exclude PCI(e) device adresses the following list from Runtime PM
# (separate with spaces). Use lspci to get the adresses (1st column).
RUNTIME_PM_BLACKLIST="01:00.0"
$ lspci | grep "3D"
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)

Interesting... bumblebee is working OK with my Optimus laptop, but then the output of lscpi is different:

$ lspci | grep "VGA|3D"
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GK104M [GeForce GTX 680M] (rev ff)

It's reporting devices as "VGA" rather than "3D"...

Edit: ah, looks to be this: https://github.com/Bumblebee-Project/bbswitch/issues/140 . My laptop is one generation too old to see that issue.

I've had to do this on both my optimus laptops, tlp was conflicting with bbswitch and sporadically preventing nvidia gpu switch off, only way to reset was a reboot.

My intel gpu is VGA but nvidia 3D.

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)

Are you using nouveau instead of nvidia blob, or the 340 / 304 driver?

EDIT :

bbswitch: device 0000:01:00.0 is in use by driver 'nvidia', refusing OFF

Yep, that message is familiar ... :slightly_frowning_face:

Hmm...

# Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
# Default when unconfigured is "amdgpu nouveau nvidia radeon" which
# prevents accidential power-on of dGPU in hybrid graphics setups.
# Use "" to disable the feature completely.
# Separate multiple drivers with spaces.
#RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"

So why doesn't this work the same way? :thinking:


I'm running nvidia 384.

No, it's a different thing. usbcore.autosuspend controls the kernel's built-in USB autosuspend support. It's more conservative and only sets autosuspend on devices that are known to support it correctly. Setting that to -1 disables it entirely.

USB_AUTOSUSPEND=0 only disables TLP's more aggressive approach of setting autosuspend on all connected USB devices.

1 Like

I assumed this not working correctly was the issue, and the blacklisting of a specific pci port for the nvidia gpu was the workaround.

I could be wrong though.

After setting RUNTIME_PM_ON_AC=auto (and not touching RUNTIME_PM_BLACKLIST) powertop (under Tunables) tells me:

>> Bad           Enable SATA link power management for host4                                                            
   Bad           Enable SATA link power management for host5
   Bad           Enable SATA link power management for host3
   Bad           Enable SATA link power management for host1
   Bad           Enable SATA link power management for host2
   Bad           Enable SATA link power management for host0
   Bad           Autosuspend for USB device Nexus 5 [LGE]
   Bad           Autosuspend for USB device USB Gaming Mouse [Logitech]
   Bad           Autosuspend for USB device MSI EPF USB [MSI EPF USB]
   Bad           Autosuspend for unknown USB device 1-1.5 (8087:07da)
   Bad           Autosuspend for USB device Deck 108 Hassium [Heng Yu Technology]
   Bad           Autosuspend for USB device Kensington Eagle Trackball [Primax]
   Bad           Runtime PM for PCI Device NVIDIA Corporation GK104M [GeForce GTX 680M]
   Good          Enable Audio codec power management
   Good          VM writeback timeout
   Good          Bluetooth device interface status
   Good          NMI watchdog should be turned off
...

So the nvidia device is excluded here.

Can you check on your system?

I am not seeing any release in git page. Is it custom compiled?

1 Like

I experienced some crashes with the current version of tlp a few months ago. The crashes went away when I comment two lines of /etc/default/tlp:

#SATA_LINKPWR_ON_AC=max_performance
#SATA_LINKPWR_ON_BAT=min_power

Other people faced similar problem:

1 Like

Interesting... those two threads confirm that min_power is not a good default, but I'm not sure whether medium_power or max_performance is better. max_performance is definitely more conservative (more compatible).

Can anyone compare power draw for the two settings? If it's a minor amount then I'll switch it up to max_performance by default and put a warning in the file; anyone wanting to try and save power can easily switch it themselves later.

1 Like

Can't enable that on my laptop:

Audio:     Card Intel Sunrise Point-H HD Audio driver: snd_hda_intel bus-ID: 00:1f.3
           Sound: Advanced Linux Sound Architecture v: k4.14.4-1-MANJARO

from alsamixer:

Carte: HDA Intel PCH
Puce: Realtek ALC898

Or it make popping sound when it happen (startup, shutdown, audio start playing, volume change).

SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=0

It's known issue -> http://linrunner.de/en/tlp/docs/tlp-faq.html#audio

I would guess it depends on what is connected to SATA. A DVD/Blu-ray device, an HDD would draw more power and this might make a difference, an SSD - less and you would see no difference between max or min performance.

1 Like

Forum kindly sponsored by