You are not logged in.
Hi!
I've just installed Arch 64bit on my Lenovo g560 notebook and I'm experiencing some power saving issues. On windows my notebook can run about 2,5-3 hours with wifi on but under linux it runs less than hour! I installed and configured laptop-mode-tools and cpufreq-utils, daemons are running but it looks like power saving is not working at all.Any ideas?
Offline
I would install powertop and see it that comes up with anything helpful....
Greez,
Hans
Offline
nope, still less than hour
Offline
You're supposed to run powertop and look at what it tells you. Just installing it won't change a thing.
Also check that you're running the "ondemand" or "conservative" governor and that it's actually changing your CPU's frequency depending on load.
Offline
nope, still less than hour
That was a pretty awesome answer.
I laugh, yet the joke is on me
Offline
yes, I know I should do what powertop says, so I:
turned soundcard power saving on
enabled wifi powersaving
enabled USB powersaving
after that actions time on battery "jumped" from 45 minutes to 53 minutes. CPU scalling is working. when I'm reading pdf's cpu is working at 933MHz and when someting is compiling it works at full speed- 2.53GHz.
Forgive me my last answer- it's exam time on my university so I don't sleep well
Offline
Ah ok, it wasn't clear that you had done that from your last answer .
I'm afraid I have no idea then. (I spent a while looking for your laptop's specs - apparently there are different models with the same name - but didn't find anything noteworthy... apart from someone mentionning a discrete NVidia graphic chip in a comment...)
Offline
My specs:
Intel Core i3
Nvidia 310M (without optimus)
Intel HDA with Connexant chipset
Broadcom wireless
Offline
Hmm I'm using a DELL XPS15, I use a startup script:
1 #!/bin/sh
2 #
3
4 #Power OFF nvidia card
5 echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call &
6
7 #cpufreq ondemand
8 cpufreq-set -c 0 -g ondemand
9 echo "Core 0: Ondemand"
10 cpufreq-set -c 1 -g ondemand
11 echo "Core 1: Ondemand"
12 cpufreq-set -c 2 -g ondemand
13 echo "Core 2: Ondemand"
14 cpufreq-set -c 3 -g ondemand
15 echo "Core 3: Ondemand"
16 cpufreq-set -c 4 -g ondemand
17 echo "Core 4: Ondemand"
18 cpufreq-set -c 5 -g ondemand
19 echo "Core 5: Ondemand"
20 cpufreq-set -c 6 -g ondemand
21 echo "Core 6: Ondemand"
22 cpufreq-set -c 7 -g ondemand
23 echo "Core 7: Ondemand"
24
25 #set wwan0 down
26 ifconfig wwan0 down &
27
28 #Set pci power control on auto
29 find /sys/devices/pci* -name "control" -exec /home/tzbob/Scripts/setauto.sh {} \;
30
31 #Enable Audio HD powersave
32 echo 10 > /sys/module/snd_hda_intel/parameters/power_save &
33
34 #Disable WOL
35 ethtool -s eth0 wol d
36
37 #Disable nmi_wtchdog
38 echo 0 > /proc/sys/kernel/nmi_watchdog
39
40 echo "Script has finished"
with setauto.sh:
1 #!/bin/bash
2
3 file=$1
4
5 if [[ "$file" =~ 'power' ]]
6 then
7 echo "$file"
8 echo "auto" > "$file"
9 echo "PCI control has been set to auto."
10 fi
Most of this is from PowerTOP, setting the pci power control on auto made the biggest difference. - This isn't written by me, as I forgot the name, kudos to whoever wrote it.
Last edited by Tzbob (2011-04-12 12:44:08)
Offline
In my laptop, the usb modules could not be auto suspended for some reason, so what I did was tweaking my acpid events to run a script that unloads all usb modules (and ethernet) when I unplug the power chord.
In case I need any usb modules when I am on battery power, I've assigned a keyboard shortcut to load them quick.
This is my acpi for when I switch to battery power. Make sure to check your acpi_listen output when plugging in and out your adapter, and customize the event, as otherwise, it won't work at all.
[fede@Dell ~]$ cat /etc/acpi/events/battery
event=ac_adapter AC 00000080 00000000.*
action=/usr/bin/battery
This is the ac adapter event.
[fede@Dell ~]$ cat /etc/acpi/events/ac_adapter
event=ac_adapter AC 00000080 00000001.*
action=/usr/bin/acadapter
This is the script acpi runs when I'm on battery. I've added a notification, to let me know the script has run succesfully.
[fede@Dell ~]$ cat /usr/bin/battery
#! /bin/sh
test -f /usr/sbin/laptop_mode || exit 0
# Automatically disable laptop mode when the battery almost runs out,
# and re-enable it when it
/usr/sbin/laptop_mode auto
echo "Battery"
sudo -u fede notify-send "ACPI Status" "Switched to Battery Power" -i /usr/share/icons/oxygen/48x48/status/battery-100.png -t 5000
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
/etc/rc.d/bluetooth stop
rmmod usb-storage
rmmod uhci_hcd
rmmod ehci_hcd
rmmod uvcvideo
rmmod sky2
rmmod joydev
rmmod usbhid
rmmod hid
rmmod uas
rmmod btusb
rmmod rfcomm
rmmod sco
rmmod bnep
rmmod l2cap
rmmod btusb
rmmod usbcore
rmmod bluetooth
for i in /sys/bus/pci/devices/*/power/control ; do echo auto > $i ; done
for i in /sys/bus/spi/devices/*/power/control ; do echo auto > $i ; done
for i in /sys/bus/i2c/devices/*/power/control ; do echo auto > $i ; done
exit 0
This one runs when on ac power.
[fede@Dell ~]$ cat /usr/bin/acadapter
#! /bin/sh
#test -f /usr/sbin/laptop_mode || exit 0
# ac on/offline event handler
/usr/sbin/laptop_mode auto
echo "AC adapter"
sudo -u fede notify-send "ACPI Status" "Switched to AC Power" -i /usr/share/icons/nuvola/48x48/status/battery-charging.png -t 5000
/etc/rc.d/bluetooth start
modprobe usb-storage
modprobe uhci_hcd
modprobe ehci_hcd
modprobe uvcvideo
modprobe sky2
modprobe joydev
modprobe usbhid
modprobe hid
modprobe usbcore
modprobe btusb
modprobe bluetooth
modprobe rfcomm
modprobe sco
modprobe bnep
modprobe l2cap
modprobe btusb
exit 0
I run this with a keyboard shortcut. It's quite dirty, but it's up to the task xD.
[fede@Dell ~]$ cat /usr/bin/usb-modules
#!/bin/bash
if [ $(lsmod | grep -c usbcore) == "0" ]
then
echo "loading usb modules"
sudo -u fede notify-send "USB Modules" "USB Modules Loaded" -i /usr/share/icons/oxygen/64x64/devices/drive-removable-media-usb-pendrive.png -t 5000
modprobe usb-storage
modprobe uhci_hcd
modprobe ehci_hcd
modprobe usbcore
else
echo "unloading usb modules"
sudo -u fede notify-send "USB Modules" "USB Modules Unloaded" -i /usr/share/icons/oxygen/64x64/devices/drive-removable-media-usb-pendrive.png -t 5000
rmmod usb-storage
rmmod uhci_hcd
rmmod ehci_hcd
rmmod uvcvideo
rmmod usbhid
rmmod hid
rmmod uas
rmmod btusb
rmmod rfcomm
rmmod sco
rmmod bnep
rmmod l2cap
rmmod btusb
rmmod usbcore
rmmod bluetooth
fi
I've added the last one to the sudoers file, and allowed it to run passwordless. I run it with "Super+U".
All this + laptop_mode properly configured + No compositing + firefox's cache on ram lowered my power consumption from 12w down to ~8.5w.
Hope it's helpful.
PS: I forgot to mention I'm running arch x86_64 on a Dell Inspiron 1545, with kernel26-lts.
Offline
now my notebook is working about 1hour and 30 minutes. any other ideas?
Offline
Well, graphics cards are usually a huge power drain so make sure you use power management tools on those, if you have optimus disable the nvidia card.
I'm not sure if the open source drivers for ATI/NVidia have any power management options but the proprietary drivers do a decent job.
EDIT: just read your specs, sorry lol. But yeah search for power management tools for the open source nvidia driver or use the proprietary driver.
Last edited by Tzbob (2011-04-16 17:56:48)
Offline
I've set PowerMizer to lowest GPU clock. My notebook does not support optimus. I use properietary drivers
Offline
try i7z tool. The CPU should spend most of the time in the C6 (deep sleep) C-state.
Offline
I doubt that his laptop has C6 support, I for one, can't enable it in my bios. Although thanks for the tool it's awesome.
Offline
My cpu is spending most time in C3(whatever it is)- about 65%
Offline
My cpu is spending most time in C3(whatever it is)- about 65%
Does it support C6? If it does, something is preventing the CPU to reach deeper C-state. Btw, 65% is not good at all. C3+C6 should be around 90% when idle.
Offline
how to check if C6 is supported? To be honest- I've never heard about it before
Offline
could you post the output of this command?
for s in /sys/devices/system/cpu/cpu0/cpuidle/state*/name ; do echo $s `cat $s` ; done
Offline
/sys/devices/system/cpu/cpu0/cpuidle/state0/name POLL
/sys/devices/system/cpu/cpu0/cpuidle/state1/name NHM-C1
/sys/devices/system/cpu/cpu0/cpuidle/state2/name NHM-C3
/sys/devices/system/cpu/cpu0/cpuidle/state3/name NHM-C6
Offline
/sys/devices/system/cpu/cpu0/cpuidle/state0/name POLL /sys/devices/system/cpu/cpu0/cpuidle/state1/name NHM-C1 /sys/devices/system/cpu/cpu0/cpuidle/state2/name NHM-C3 /sys/devices/system/cpu/cpu0/cpuidle/state3/name NHM-C6
OK, it means the intel_idle driver is in use, which is correct for the Arrandale CPU. What's the output of powertop -d ?
Offline
Cn average residency
C0 (CPU aktywny) ( 6,0%)
polling 1,1ms ( 0,1%)
C1 mwait 0,1ms ( 0,6%)
C2 mwait 0,7ms (54,0%)
C3 mwait 2,2ms (39,2%)
P-stany (frequency)
2,54 GHz 3,5%
2,14 GHz 0,1%
1333 MHz 0,0%
1066 MHz 0,1%
933 MHz 96,2%
idle awakening per second: 1018,2 przedział: 15,0s
most interruption causes:
92,2% (7005,3) SignalSender
3,1% (234,2) Klawiatura/mysz/touchpad PS/2 interrupt
1,1% ( 80,9) [nvidia] <interrupt>
0,7% ( 52,4) kworker/0:1
0,6% ( 47,4) chrome
0,6% ( 46,9) [hda_intel] <interrupt>
0,5% ( 37,7) kworker/0:0
0,4% ( 31,9) [kernel scheduler] Load balancing tick
0,3% ( 20,0) knotify4
0,2% ( 14,1) [hda_intel, brcm80211] <interrupt>
0,1% ( 9,8) kwin
0,1% ( 5,1) [ahci] <interrupt>
0,0% ( 3,0) bangarang
0,0% ( 3,0) plasma-desktop
0,0% ( 2,2) mysqld
0,0% ( 1,9) [kernel core] clocksource_watchdog (clocksource_watchdog)
0,0% ( 0,9) [kernel core] nv_kern_rc_timer (nv_kern_rc_timer)
0,0% ( 0,5) [kernel core] hrtimer_start (tick_sched_timer)
0,0% ( 0,5) udisks-daemon
0,0% ( 0,5) NetworkManager
0,0% ( 0,3) gpg-agent
0,0% ( 0,3) pidgin
0,0% ( 0,2) init
0,0% ( 0,2) X
0,0% ( 0,2) kded4
0,0% ( 0,1) yakuake
0,0% ( 0,1) akonadiserver
0,0% ( 0,1) wpa_supplicant
0,0% ( 0,1) [kernel core] sk_reset_timer (tcp_keepalive_timer)
0,0% ( 0,1) upowerd
0,0% ( 0,1) akonadi_control
0,0% ( 0,1) kworker/1:3
0,0% ( 0,1) preload
0,0% ( 0,1) [kernel core] sk_reset_timer (tcp_delack_timer)
0,0% ( 0,1) khugepaged
0,0% ( 0,1) flush-8:0
An audio device is active 100,0% of the time:
hwC0D1 Conexant CX20585
Hint: włącz tryb oszczędzanie energii urządzeń bezprzewodowych komendą:
iwconfig wlan0 power timeout 500ms
To nieznacznie zmniejszy wydajność sieci, aby oszczędzać energię.
Hint: włącz opcję CONFIG_NOTIFY w konfiguracji jądra.
Ta opcja umożliwia programom bierne śledzenie zmian w wybranych
plikach i katalogach bez konieczności ciągłego sprawdzania ich
Ostatnie statystyki uśpienia USB
Aktywne Nazwa urządznia
Runtime Device Power Management statistics
Aktywne Nazwa urządznia
0,0% 07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
0,0% 06:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
0,0% 01:00.1 Audio device: nVidia Corporation High Definition Audio Controller
0,0% 01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 310M]
0,0% 00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller
0,0% 00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5
0,0% 00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3
0,0% 00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2
0,0% 00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1
0,0% 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio
0,0% 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
0,0% 00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port
Devices without runtime PM
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller
Recent audio activity statistics
active device name
100,0% hwC0D1 Conexant CX20585
Recent SATA AHCI link activity statistics
Active Partial Slumber Device name
I've translated some words(I'm Polish) so if something would be not understantable please tell me
Last edited by rzepaczyk (2011-04-18 16:12:42)
Offline
OK, now close all Chrome / Chromium windows please and run LC_ALL=en_US powertop -d
EDIT:
I'm almost sure, that it's the Chrome browser draining your battery - 7000 wakeups per 15s is huge number. I just want to see the proof.
Last edited by laloch (2011-04-18 16:37:30)
Offline
PowerTOP 1.13 (C) 2007 - 2010 Intel Corporation
Collecting data for 15 seconds
Cn Avg residency
C0 (cpu running) ( 0.0%)
polling 23.5ms ( 0.1%)
C1 mwait 0.1ms ( 0.0%)
C2 mwait 1.9ms ( 2.8%)
C3 mwait 5.3ms (98.6%)
P-states (frequencies)
2.54 Ghz 1.0%
1333 Mhz 0.0%
1199 Mhz 0.1%
1066 Mhz 0.1%
933 Mhz 98.7%
Wakeups-from-idle per second : 204.4 interval: 15.0s
Power usage (ACPI estimate): 18.2W (1.4 hours)
Top causes for wakeups:
33.9% ( 73.6) [nvidia] <interrupt>
21.6% ( 46.9) [hda_intel] <interrupt>
9.2% ( 20.0) knotify4
6.0% ( 13.1) [kernel scheduler] Load balancing tick
5.5% ( 11.9) [hda_intel, brcm80211] <interrupt>
5.0% ( 10.9) kworker/0:1
5.0% ( 10.8) kworker/0:0
4.5% ( 9.8) [ahci] <interrupt>
2.0% ( 4.3) kwin
1.4% ( 3.1) plasma-desktop
1.1% ( 2.4) [acpi] <interrupt>
1.1% ( 2.4) mysqld
0.9% ( 2.0) [kernel core] clocksource_watchdog (clocksource_watchdog)
0.8% ( 1.8) [kernel core] hrtimer_start (tick_sched_timer)
0.5% ( 1.0) [kernel core] nv_kern_rc_timer (nv_kern_rc_timer)
0.2% ( 0.5) udisks-daemon
0.2% ( 0.4) NetworkManager
0.2% ( 0.3) gpg-agent
0.2% ( 0.3) upowerd
0.1% ( 0.2) init
0.1% ( 0.2) kded4
0.1% ( 0.2) akonadiserver
0.1% ( 0.1) yakuake
0.1% ( 0.1) kworker/1:0
0.1% ( 0.1) wpa_supplicant
0.1% ( 0.1) khugepaged
0.0% ( 0.1) X
0.0% ( 0.1) pidgin
0.0% ( 0.1) [kernel core] fib6_run_gc (fib6_gc_timer_cb)
0.0% ( 0.1) gconfd-2
0.0% ( 0.1) akonadi_control
0.0% ( 0.1) flush-8:0
0.0% ( 0.1) preload
0.0% ( 0.1) krunner
0.0% ( 0.1) [kernel core] mce_start_timer (mce_start_timer)
An audio device is active 100.0% of the time:
hwC0D1 Conexant CX20585
Suggestion: Enable wireless power saving mode by executing the following command:
iwconfig wlan0 power timeout 500ms
This will sacrifice network performance slightly to save power.
Suggestion: Enable the CONFIG_INOTIFY kernel configuration option.
This option allows programs to wait for changes in files and directories
instead of having to poll for these changes
Recent USB suspend statistics
Active Device name
Runtime Device Power Management statistics
Active Device name
0.0% 07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
0.0% 06:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller
0.0% 01:00.1 Audio device: nVidia Corporation High Definition Audio Controller
0.0% 01:00.0 VGA compatible controller: nVidia Corporation GT218 [GeForce 310M]
0.0% 00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller
0.0% 00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5
0.0% 00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3
0.0% 00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2
0.0% 00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1
0.0% 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio
0.0% 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
0.0% 00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port
Devices without runtime PM
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge
00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller
Recent audio activity statistics
Active Device name
100.0% hwC0D1 Conexant CX20585
Recent SATA AHCI link activity statistics
Active Partial Slumber Device name
btw, my notebook is working on battery mostly when I'm travelling so I don't use chrome or sth. Im reading pdf's and listening to music
Last edited by rzepaczyk (2011-04-18 16:46:31)
Offline
You see? 98.6% in C3 (or deeper) w/o Chrome, 39.2% with Chrome.
I've just found, that the issue is already reported: http://code.google.com/p/chromium/issue … l?id=77625
Offline