Looks like it is reporting varying charging rate. Which I would assume is being controlled by the EC based on whatever programmed chemistry ideal for the cells.
Not at all! Would you mind testing this on your system before I make the PR?
Might as well double the sample size
I don’t have a DP card but if you do, please test that as well.
First to determine which expansion port has the HDMI or DP: grep -i hdmi /sys/bus/usb/devices/?-?/product
This should give a result such as: /sys/bus/usb/devices/4-1/product:HDMI Expansion Card
Then enable autosuspend by substituting the above #-# into: $ echo 'auto' | sudo tee /sys/bus/usb/devices/4-1/power/control
Personally, this is something I would probably add to /etc/rc.local, however I could see the benefit of including it in systemd if the application is wide enough.
The only other item of interest from: upower --dump
Appears to be: $ upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep energy-rate
It looks like this and BAT1 only refresh every 2 mins. I’ll have to dive deeper into their code to see how the KDE app is getting more meaningful data. In the meantime, powertop & powerstat are giving adequate insights for testing drain while on battery.
Brilliant, thank you for testing and confirming. I noted the HDMI id from dmesg and appreciate your inclusion of the DP id.
I’ve submitted a PR. Please feel free to review and advise with changes as needed:
Agreed for something like this where confirming community benefit can happen concisely.
My rc.local has long including things like calling a script to set MSR undervolting values, which need to be tested per system, since individual cpus have different tolerances.
Nice work with amd-pstate. It’s interesting to see how the cpu freq differs to balance-power vs power in active mode with system load.
Here’s to increased efficiency and reduced consumption!
Working yesterday, battery went from 68% - 28% over 3:59 on balance_power perf pref with pstate active, ppd set to power-saver, and hdmi autosuspend via udev. Hourly calcs matched total use at avg 5.52W.
Assuming linearity for the whole battery, this use case would allow 9:58 for a full batt. Or 90% use would give 8:58. My preference is to use 90-20%, so about 6:58.
With the Notebookcheck review as a baseline at 12:06 with 9.8% larger battery means parity with win11 will require finding about 0:57 longer runtime. Note: to verify need to confirm linux display settings for 150 nit brightness.
Another observation, the energy performance preference does not seem to be driven by PPD. That should either be tied in or added as a udev rule based on user preference. This is one place where TLP settings for this survives a reboot and switches based on ac or batt settings.
TLP, pstate status set to active, energy perf pref at power. Had to uncomment USB_AUTOSUSPEND=1 in /etc/tlp.conf for it to allow the HDMI expansion card to go into powersaving. 10% use took 66 mins, so 5.0W avg.
Based on the fact the hdmi card didn’t enable autosuspend until it was implicit in the conf file, these are active lines for the above testing:
At present I’ve a bash script to check/set these for testing. I would likely write a udev rule since that will be agnostic to these two approaches and will allow unlimited preferred settings tied directly to charging/discharging state.
Hm, as mentioned in this thread, this script just runs every two seconds to set the power profile. Is there a reason to do it this way over using udev rules to change the profile on charger connect/disconnect, plus maybe some systemd units that set the profile on boot/wakeup? Does the file get periodically overwritten?
I guess it might help if you switch between lots of different userspace DE’s and tools. I’m running the patched PPD which is what works for me; so long as you’ve got ‘something’ hitting the hints