Solved Lenovo T530 Power Saving

Hello,
I have laptop Lenovo T530 this FreeBSD 12 installed on it.


# uname -a
FreeBSD FBSD 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 GENERIC amd64


My problem is that the laptop consumes too much energy.


# acpiconf -i 0
Design capacity: 86580 mWh
Last full capacity: 66050 mWh
Technology: secondary (rechargeable)
Design voltage: 11100 mV
Capacity (warn): 3302 mWh
Capacity (low): 200 mWh
Low/warn granularity: 1 mWh
Warn/full granularity: 1 mWh
Model number: 45N1011
Serial number: 36056
Type: LION
OEM info: LGC
State: discharging
Remaining capacity: 90%
Remaining time: 2:06
Present rate: 28531 mW
Present voltage: 11703 mV


I read this documents about Power Saving:

But my laptop continues to consume too much power...
On my laptop y use NVIDIA card.

This is part of my config files:


# cat /boot/loader.conf

hw.pci.do_power_nodriver="3"
hw.snd.latency="7"
hint.p4tcc.0.disabled="1"
hint.acpi_throttle.0.disabled="1"
hint.ahcich.0.pm_level="5"
hint.ahcich.1.pm_level="5"
hint.ahcich.2.pm_level="5"
hint.ahcich.3.pm_level="5"
hint.ahcich.4.pm_level="5"
hint.ahcich.5.pm_level="5"

#enable CPU firmware update
cpuctl_load="YES"

#enable CPU temperature monitoring
coretemp_load="YES"

#enable LCD backlight control, ThinkPad buttons y etc
acpi_ibm_load="YES"

#load firmware for wireless card Intel 6300-N
iwn6000fw_load="YES"

#NVIDIA
nvidia-modeset_load="YES"



# sysctl dev.cpu | grep freq_levels
dev.cpu.0.freq_levels: 2601/35000 2600/35000 2500/33218 2400/31470 2300/29755 2200/28074 2100/26426 2000/24816 1900/23556 1800/22002 1700/20480 1600/18989 1500/17534 1400/16106 1300/15009 1200/13638



# cat /etc/rc.conf

#wireless
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA DHCP powersave"

#CPU frequency scaling
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive"
performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"



# sysctl dev.cpu
dev.cpu.3.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.3.cx_usage_counters: 659 552 64757
dev.cpu.3.cx_usage: 0.99% 0.83% 98.16% last 1701us
dev.cpu.3.cx_lowest: C8
dev.cpu.3.cx_supported: C1/1/1 C2/2/59 C3/3/87
dev.cpu.3.temperature: 48.0C
dev.cpu.3.coretemp.throttle_log: 0
dev.cpu.3.coretemp.tjmax: 105.0C
dev.cpu.3.coretemp.resolution: 1
dev.cpu.3.coretemp.delta: 57
dev.cpu.3.%parent: acpi0
dev.cpu.3.%pnpinfo: _HID=none _UID=0
dev.cpu.3.%location: handle=\_PR_.CPU3
dev.cpu.3.%driver: cpu
dev.cpu.3.%desc: ACPI CPU
dev.cpu.2.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.2.cx_usage_counters: 1109 987 66526
dev.cpu.2.cx_usage: 1.61% 1.43% 96.94% last 9388us
dev.cpu.2.cx_lowest: C8
dev.cpu.2.cx_supported: C1/1/1 C2/2/59 C3/3/87
dev.cpu.2.temperature: 48.0C
dev.cpu.2.coretemp.throttle_log: 0
dev.cpu.2.coretemp.tjmax: 105.0C
dev.cpu.2.coretemp.resolution: 1
dev.cpu.2.coretemp.delta: 57
dev.cpu.2.%parent: acpi0
dev.cpu.2.%pnpinfo: _HID=none _UID=0
dev.cpu.2.%location: handle=\_PR_.CPU2
dev.cpu.2.%driver: cpu
dev.cpu.2.%desc: ACPI CPU
dev.cpu.1.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.1.cx_usage_counters: 426 428 32390
dev.cpu.1.cx_usage: 1.28% 1.28% 97.43% last 12705us
dev.cpu.1.cx_lowest: C8
dev.cpu.1.cx_supported: C1/1/1 C2/2/59 C3/3/87
dev.cpu.1.temperature: 48.0C
dev.cpu.1.coretemp.throttle_log: 0
dev.cpu.1.coretemp.tjmax: 105.0C
dev.cpu.1.coretemp.resolution: 1
dev.cpu.1.coretemp.delta: 57
dev.cpu.1.%parent: acpi0
dev.cpu.1.%pnpinfo: _HID=none _UID=0
dev.cpu.1.%location: handle=\_PR_.CPU1
dev.cpu.1.%driver: cpu
dev.cpu.1.%desc: ACPI CPU
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc
dev.cpu.0.cx_usage_counters: 5377 1366 309651
dev.cpu.0.cx_usage: 1.69% 0.43% 97.86% last 588us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/59 C3/3/87
dev.cpu.0.freq_levels: 2601/35000 2600/35000 2500/33218 2400/31470 2300/29755 2200/28074 2100/26426 2000/24816 1900/23556 1800/22002 1700/20480 1600/18989 1500/17534 1400/16106 1300/15009 1200/13638
dev.cpu.0.freq: 1200
dev.cpu.0.temperature: 48.0C
dev.cpu.0.coretemp.throttle_log: 0
dev.cpu.0.coretemp.tjmax: 105.0C
dev.cpu.0.coretemp.resolution: 1
dev.cpu.0.coretemp.delta: 57
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU


Also I aplaed scritp for "NVIDIA Optimus" from https://wiki.freebsd.org/TuningPowerConsumption


# cat /root/.gpu_method
export methods="\_SB.PCI0.LPC.EC.PUBS._OFF"


I don't aplaed power_save for USB device.

After all manipulation I still have high power consumption.
Anyone have some experience this power manager on Lenovo T530?
Thank you for any help!

Best regards,
 
Your setup already uses C states, that is not it. You may want to play with pci.power.no_driver a bit. Hope I got the spelling right...
 
Thanks for reply,
I could not reduce energy consumption.
Maybe this is all that can be done.
My laptop runs on battery for 2 hours...
P.S.
In Windows more.
 
I'm currently playing around with a thinkpad x1carbon with i7 and I've got about 7W consumption (not quite stable, sometimes it goes to 11W at idle, I guess nobody knows why just like physics experiement readings :p). Anyway I can tell you some hints. Look like cpu will not be the bottle neck now, you can check it by $kldload cpuctl and then $pcm.x to see a report for the power CPU is consuming (you might need to install sysutils/intel-pcm port). I'm not getting as much C3 state as u but I have <3W on CPU when idle and this is good enough. I'm not using a nvidia card so I guess that matters, can u try turn it off? Like doing a measurement on text mode, just to address possible bottlenecks.
USB config also helps, I put those lines in both my rc.local and rc.resume (some of the devices won't correctly go back to power save and might cause some mysterious increase in power). Another thing to do is to turn off bluetooth via sysctl dev.acpi_ibm (bluetooth just doesn't work).
Another thing I did differently is I use powerdxx instead of powerd. I'm on a 4c8t cpu so I choose powerdxx, this might be an option for you to just have a try. (Well, I guess everyone is doing random search algorithm).
I also wrote sets of sh scripts to turn down led/keyboad backlight etc whenever possible, rough test shows that this can contribute 2-3W on my machine.
For yours... the part that cause major power consumption still looks unclear, so I guess controlling some variables and try to get a breakdown of those 30W will be really helpful.
 
Hello kscarlet,
Thank you for sharing your experience!
Yes, I use discrete NVIDIA card.
You have thinkpad x1carbon with i7, cool!
Do you have all drivers for your hardware, for example for WiFi?

Best regards,
 
I was disable my NVIDIA card and switch to Intel video card.
Energy consumption has decreased from "Present rate: 28531 mW" to "Present rate: 19000 mW"
It has decreased a lot!
A question:
Intel 4000 video card don't support "Composite" mode for Compiz Fusion?
 
Hello kscarlet,
Thank you for sharing your experience!
Yes, I use discrete NVIDIA card.
You have thinkpad x1carbon with i7, cool!
Do you have all drivers for your hardware, for example for WiFi?

Best regards,
I'm 6th gen, and WiFi works out of the box. Fingerprint does not work (the community hasn't successfully reverse engineered this sensor) and bluetooth doesn't work. ACPI_IBM doesn't work out of the box for me (which means keyboard backlights, leds, fn keys and power switch for bluetooth), but I manually merged some patch and got it work. You can see something here https://forums.freebsd.org/threads/acpi_ibm-on-later-thinkpad-models.70691/#post-426742
 
Back
Top