You are not logged in.

#526 2013-09-21 19:18:16

centos
Member
From: Ostrava, Czech Republic
Registered: 2009-01-09
Posts: 65

Re: 3x+ battery life

cris9288 wrote:

I get this message when I execute powerdown

[powerdown] cannot write powersave to /sys/module/pcie_aspm/parameters/policy
[powerdown] cannot write 1 to /sys/module/i915/parameters/i915_enable_rc6

Same for me. I also have Core i3 cpu -- ThinkPad E430.

hazote: I'm also experiencing this.

Offline

#527 2013-09-28 19:14:13

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

changelog:
* major clean up
* add support for cpu bias


"After you do enough distro research, you will choose Arch."

Offline

#528 2013-09-29 10:36:06

centos
Member
From: Ostrava, Czech Republic
Registered: 2009-01-09
Posts: 65

Re: 3x+ battery life

Hi, this new version freezes my Gnome when not connected to AC or when I run 'sudo powerdown'. I can move cursor, but everything else is freezed.
I tried to find out which part of the script caused this so I commented all the lines out thinking I will uncommented them one by one and test it. But it freezed even with all lines commented out. When I unistall powerdown and install pm-utils instead, it work as it is supposed to.

uname -a

Linux inkognito 3.11.2-1-ARCH #1 SMP PREEMPT Fri Sep 27 07:35:36 CEST 2013 x86_64 GNU/Linux

grep "model name" /proc/cpuinfo

model name	: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz

lshw

inkognito                 
    description: Notebook
    product: 3254TPG (LENOVO_MT_3254)
    vendor: LENOVO
    version: ThinkPad Edge E430
    serial: MP2X1E4
    width: 64 bits
    capabilities: smbios-2.7 dmi-2.7 vsyscall32
    configuration: administrator_password=disabled chassis=notebook family=ThinkPad Edge E430 power-on_password=disabled sku=LENOVO_MT_3254 uuid=815DD70D-B452-CB11-9EF6-9DE44ABDD767
  *-core
       description: Motherboard
       product: 3254TPG
       vendor: LENOVO
       physical id: 0
       version: Win8 STD DPK TPG
       serial: 1ZM4931EB4Z
       slot: Not Available
     *-cpu
          description: CPU
          product: Core i3 (None)
          vendor: Intel Corp.
          physical id: 5
          bus info: cpu@0
          version: Intel(R) Core(TM) i3-3110M CPU @ 2.40GHz
          serial: None
          slot: CPU Socket - U3E1
          size: 2400MHz
          capacity: 2400MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms cpufreq
          configuration: cores=2 enabledcores=2 threads=4
        *-cache:0
             description: L1 cache
             physical id: 7
             slot: L1-Cache
             size: 32KiB
             capacity: 32KiB
             capabilities: internal write-through instruction
        *-cache:1
             description: L2 cache
             physical id: 8
             slot: L2-Cache
             size: 256KiB
             capacity: 256KiB
             capabilities: internal write-through unified
        *-cache:2
             description: L3 cache
             physical id: 9
             slot: L3-Cache
             size: 3MiB
             capacity: 3MiB
             capabilities: internal write-back unified
     *-cache
          description: L1 cache
          physical id: 6
          slot: L1-Cache
          size: 32KiB
          capacity: 32KiB
          capabilities: internal write-through data
     *-memory
          description: System Memory
          physical id: a
          slot: System board or motherboard
          size: 4GiB
        *-bank:0
             description: DIMM [empty]
             physical id: 0
             slot: ChannelA-DIMM0
        *-bank:1
             description: SODIMM DDR3 Synchronous 1600 MHz (0,6 ns)
             product: RMT3160ED58E9W1600
             vendor: Fujitsu
             physical id: 1
             serial: 0752221C
             slot: ChannelB-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1600MHz (0.6ns)
     *-firmware
          description: BIOS
          vendor: LENOVO
          physical id: 0
          version: H0ET90WW (2.50 )
          date: 01/15/2013
          size: 128KiB
          capacity: 4032KiB
          capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification uefi
     *-network
          description: Ethernet interface
          product: RTL8111/8168 PCI Express Gigabit Ethernet controller
          vendor: Realtek Semiconductor Co., Ltd.
          physical id: 1
          bus info: pci@0000:0c:00.0
          logical name: enp12s0
          version: 07
          serial: b8:88:e3:ed:01:c7
          size: 10Mbit/s
          capacity: 1Gbit/s
          width: 64 bits
          clock: 33MHz
          capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
          configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168e-3_0.0.4 03/27/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
          resources: irq:45 ioport:2000(size=256) memory:f1404000-f1404fff memory:f1400000-f1403fff
     *-pci
          description: Host bridge
          product: 3rd Gen Core processor DRAM Controller
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 09
          width: 32 bits
          clock: 33MHz
        *-display
             description: VGA compatible controller
             product: 3rd Gen Core processor Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 09
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:47 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:5000(size=64)
        *-usb:0
             description: USB controller
             product: 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2
             vendor: Intel Corporation
             physical id: 1a
             bus info: pci@0000:00:1a.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:16 memory:f361a000-f361a3ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 3.11.2-1-ARCH ehci_hcd
                physical id: 1
                bus info: usb@3
                logical name: usb3
                version: 3.11
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@3:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=6 speed=480Mbit/s
                 *-usb UNCLAIMED
                      description: Generic USB device
                      product: TouchStrip Fingerprint Sensor
                      vendor: UPEK
                      physical id: 4
                      bus info: usb@3:1.4
                      version: 0.48
                      capabilities: usb-1.00
                      configuration: maxpower=100mA speed=12Mbit/s
        *-multimedia
             description: Audio device
             product: 7 Series/C210 Series Chipset Family High Definition Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=snd_hda_intel latency=0
             resources: irq:44 memory:f3610000-f3613fff
        *-pci:0
             description: PCI bridge
             product: 7 Series/C210 Series Chipset Family PCI Express Root Port 1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: c4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:16 ioport:4000(size=4096) memory:f2e00000-f35fffff ioport:f0400000(size=8388608)
           *-generic
                description: Unassigned class
                product: RTS5229 PCI Express Card Reader
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:02:00.0
                version: 01
                width: 32 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list
                configuration: driver=rtsx_pci latency=0
                resources: irq:40 memory:f2e00000-f2e00fff
        *-pci:1
             description: PCI bridge
             product: 7 Series/C210 Series Chipset Family PCI Express Root Port 2
             vendor: Intel Corporation
             physical id: 1c.1
             bus info: pci@0000:00:1c.1
             version: c4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:17 memory:f2d00000-f2dfffff
           *-network
                description: Wireless interface
                product: Centrino Wireless-N 2230
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:03:00.0
                logical name: wlp3s0
                version: c4
                serial: 60:36:dd:f9:04:d9
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=iwlwifi driverversion=3.11.2-1-ARCH firmware=18.168.6.1 ip=192.168.1.102 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
                resources: irq:46 memory:f2d00000-f2d01fff
        *-pci:2
             description: PCI bridge
             product: 7 Series/C210 Series Chipset Family PCI Express Root Port 3
             vendor: Intel Corporation
             physical id: 1c.2
             bus info: pci@0000:00:1c.2
             version: c4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:18 ioport:3000(size=4096) memory:f2500000-f2cfffff ioport:f0c00000(size=8388608)
        *-pci:3
             description: PCI bridge
             product: 7 Series/C210 Series Chipset Family PCI Express Root Port 4
             vendor: Intel Corporation
             physical id: 1c.3
             bus info: pci@0000:00:1c.3
             version: c4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:19 ioport:2000(size=4096) memory:f1d00000-f24fffff ioport:f1400000(size=9437184)
        *-usb:1
             description: USB controller
             product: 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:23 memory:f3619000-f36193ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 3.11.2-1-ARCH ehci_hcd
                physical id: 1
                bus info: usb@4
                logical name: usb4
                version: 3.11
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@4:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=8 speed=480Mbit/s
                 *-usb
                      description: Video
                      product: Integrated Camera
                      vendor: Chicony Electronics Co., Ltd.
                      physical id: 6
                      bus info: usb@4:1.6
                      version: 5.20
                      capabilities: usb-2.00
                      configuration: driver=uvcvideo maxpower=200mA speed=480Mbit/s
        *-isa
             description: ISA bridge
             product: HM77 Express Chipset LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master cap_list
             configuration: driver=lpc_ich latency=0
             resources: irq:0
        *-storage
             description: SATA controller
             product: 7 Series Chipset Family 6-port SATA Controller [AHCI mode]
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             version: 04
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:42 ioport:5088(size=8) ioport:509c(size=4) ioport:5080(size=8) ioport:5098(size=4) ioport:5060(size=32) memory:f3618000-f36187ff
        *-serial UNCLAIMED
             description: SMBus
             product: 7 Series/C210 Series Chipset Family SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 04
             width: 64 bits
             clock: 33MHz
             configuration: latency=0
             resources: memory:f3614000-f36140ff ioport:efa0(size=32)
        *-usb:2
             description: USB controller
             product: 7 Series/C210 Series Chipset Family USB xHCI Host Controller
             vendor: Intel Corporation
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi xhci bus_master cap_list
             configuration: driver=xhci_hcd latency=0
             resources: irq:41 memory:f3600000-f360ffff
           *-usbhost:0
                product: xHCI Host Controller
                vendor: Linux 3.11.2-1-ARCH xhci_hcd
                physical id: 0
                bus info: usb@2
                logical name: usb2
                version: 3.11
                capabilities: usb-3.00
                configuration: driver=hub slots=4 speed=5000Mbit/s
           *-usbhost:1
                product: xHCI Host Controller
                vendor: Linux 3.11.2-1-ARCH xhci_hcd
                physical id: 1
                bus info: usb@1
                logical name: usb1
                version: 3.11
                capabilities: usb-2.00
                configuration: driver=hub slots=4 speed=480Mbit/s
              *-usb
                   description: Mouse
                   product: Laser Mouse
                   vendor: Genius
                   physical id: 2
                   bus info: usb@1:2
                   version: 0.00
                   capabilities: usb-1.10
                   configuration: driver=usbhid maxpower=100mA speed=1Mbit/s
        *-communication
             description: Communication controller
             product: 7 Series/C210 Series Chipset Family MEI Controller #1
             vendor: Intel Corporation
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=mei_me latency=0
             resources: irq:43 memory:f3615000-f361500f
  *-battery
       product: 45N1049
       vendor: LGC
       physical id: 1
       slot: Rear
       capacity: 40400mWh
       configuration: voltage=10,8V

Offline

#529 2013-09-29 16:10:09

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

run

sudo powerdown && sudo powerup

if it does not freeze, it is a bug from powerdown


"After you do enough distro research, you will choose Arch."

Offline

#530 2013-09-29 18:39:19

VidarPT
Member
Registered: 2013-03-15
Posts: 5

Re: 3x+ battery life

Hum... I'm trying to install this on my ancient intel classmate laptop but it fails to build

/home/antonio/Builds/powerdown-git/PKGBUILD: line 26: make: command not found

EDIT: Oh dumb me, i didn't know i had to install "make" too, I didn't even know I didn't have it *facepalm*

Last edited by VidarPT (2013-09-29 18:45:00)

Offline

#531 2013-09-29 19:04:04

centos
Member
From: Ostrava, Czech Republic
Registered: 2009-01-09
Posts: 65

Re: 3x+ battery life

taylorchu wrote:

run

sudo powerdown && sudo powerup

if it does not freeze, it is a bug from powerdown

I've installed it again and now it does not freeze. So consider it fixed, I guess wink
But I'm getting this, not sure how to deal with it. First line means "Write error: Operation not permitted" and sda4 is NTFS partition.

/usr/lib/powerdown-functions: řádek 9: echo: chyba zápisu: Operace není povolena
[powerdown] cannot write powersave to /sys/module/pcie_aspm/parameters/policy
[powerdown] cannot run mount -o remount,noatime /dev/sda4

And: Is it normal that most of the watts are consumed by backlight? It sounds reasonable, but really that much?

% sudo powertop 
Spotřeba při chodu na baterii: 9.81 W
Odhadovaný zbývající čas do vybití baterie je 3 hodin, 28 minut

Souhrn: 600,1 probuzení/sekund,  8,1 GPU ops/sekund, 0,0 VFS ops/sec a 13,5% využití CPU

Energie zbývá              Využití       Událost/i    Kategorie       Popis
  8.31 W     20,0%                      Device         Display backlight
 80.2 mW      1,6 pkts/s                Device         Síťové rozhraní: wlp3s0 (iwlwifi)
 79.0 mW      0,0 pkts/s                Device         Síťové rozhraní: enp12s0 (r8169)
 76.4 mW     18,4 ms/s      42,2        Process        /usr/bin/gnome-shell
 54.5 mW    100,0%                      Device         USB zařízení: Laser Mouse (Genius)
 23.0 mW      2,9 ms/s     128,3        Process        /usr/bin/mplayer -noquiet -nofs -nomouseinput -sub-fuzziness 1 -identi
 17.1 mW      8,6 ms/s      41,8        Process        /usr/lib/gnome-terminal/gnome-terminal-server
 15.9 mW      7,0 ms/s      91,2        Process        /usr/lib/opera/pluginwrapper/operapluginwrapper-native -multiproc 2,0.
 12.2 mW     58,1 ms/s      35,1        Process        /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for
 10.3 mW      3,9 ms/s      58,9        Timer          hrtimer_wakeup
 9.79 mW      3,2 ms/s      28,1        Process        /usr/lib/chromium/chromium
 8.09 mW     87,0 us/s       7,9        kWork          ieee80211_iface_work
 4.96 mW    572,6 us/s      17,9        Process        /usr/lib/gpaste/gpasted
 4.32 mW      1,6 ms/s      24,7        Interrupt      [47] i915
 3.70 mW      1,1 ms/s      21,2        Process        [irq/46-iwlwifi]
 3.34 mW      1,7 ms/s      19,2        Interrupt      [41] xhci_hcd
 2.77 mW      7,5 ms/s      15,9        Process        smplayer /mnt/Data/Filmy/Heroes - Complete/Heroes - Season 4 (Volume 5
 2.60 mW    105,2 us/s      14,9        Interrupt      [46] iwlwifi
 2.55 mW      3,5 ms/s      14,6        Process        /usr/lib/chromium/chromium --type=renderer --lang=cs --force-fieldtria
 1.71 mW    345,8 us/s       9,8        Timer          tick_sched_timer
 1.37 mW    256,5 us/s       7,8        Process        nemo
  740 uW     14,2 ms/s       4,2        Process        /usr/lib/opera/opera

Offline

#532 2013-09-29 20:00:17

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: 3x+ battery life

VidarPT wrote:

Hum... I'm trying to install this on my ancient intel classmate laptop but it fails to build

/home/antonio/Builds/powerdown-git/PKGBUILD: line 26: make: command not found

EDIT: Oh dumb me, i didn't know i had to install "make" too, I didn't even know I didn't have it *facepalm*

Using the AUR or ABS, you should probably have the 'base-devel' group installed to ensure that you always have the required packages for building stuffs.

Offline

#533 2013-10-15 15:44:20

JoKo
Member
Registered: 2010-04-09
Posts: 37

Re: 3x+ battery life

Is there any easy way to poll the current battery capacity (percentage) and run automatically the suspend-to-disk script if it is too low?

Offline

#534 2013-10-15 16:45:11

sekret
Member
Registered: 2013-07-22
Posts: 205

Re: 3x+ battery life

I have something like this in my dwm status script. Here's how it can be done:

INTERVAL=10 #seconds
BATTERY_THRESHOLD=10 #percent
BATTERY_PATH="/sys/class/power_supply/BAT0"
BATTERY_STATUS="$BATTERY_PATH/status"
BATTERY_CAPACITY="$BATTERY_PATH/capacity"
while true;do
  if [ -d "$BATTERY_PATH" ];then #check if the battery is actually in the laptop
    if [ "$(cat "$BATTERY_STATUS")" = "Discharging" ];then #we don't want the system to suspend in case the battery loads and is still <10%
      if [ "$(cat "$BATTERY_CAPACITY")" -le "$BATTERY_THRESHOLD" ];then sync;sudo systemctl suspend;fi #you'll need to allow sudo tu run systemctl without a password, or if you run the script as root, just erase sudo from the commandline
    fi
  fi
  sleep $INTERVAL
done

I'm sure there are better ways and better codes, I'm not realls a talented hacker wink But it works.

Some batteries send a signal every time the battery load goes down 1%. In that case you can use a udev rule. I saw one here a few months back, but can't remember where. I deleted it, because it didn't work with my laptop.

Last edited by sekret (2013-10-15 16:45:35)

Offline

#535 2013-10-16 15:22:01

JoKo
Member
Registered: 2010-04-09
Posts: 37

Re: 3x+ battery life

Thanks a lot, sekret!

I have the same issue, my laptop battery isn't generating uevents while discharging, so I have to poll on my own for its current capacity.

Offline

#536 2013-10-18 03:42:45

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

powerdown is going to have a big update soon.

feature list:
1. remove its own suspend/hibernate with systemd suspend hibernate. it is a clean up but it will still "provide" pm-utils.
2. implement systemd pre/post suspend service
3. still provide powerdown/powerup when power supply is charging
4. auto-suspend when battery is low
5. providing sugguestion on your system config error

future of powerdown
it will try to behave like windows's powersave, and work optimally without config. stay tune.


"After you do enough distro research, you will choose Arch."

Offline

#537 2013-10-18 04:33:37

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 924

Re: 3x+ battery life

taylorchu wrote:

powerdown is going to have a big update soon.

feature list:
1. remove its own suspend/hibernate with systemd suspend hibernate. it is a clean up but it will still "provide" pm-utils.
2. implement systemd pre/post suspend service
3. still provide powerdown/powerup when power supply is charging
4. auto-suspend when battery is low
5. providing sugguestion on your system config error

future of powerdown
it will try to behave like windows's powersave, and work optimally without config. stay tune.

I have it set by xfce4-power-manager and I use hybrid so, the defaults is used to respect the main power manager??

PD: powerdown try to call community/x86_energy_perf_policy in my system so that is a dep now right??

Last edited by Jristz (2013-10-20 04:56:47)


Well, I suppose that this is somekind of signature, no?

Offline

#538 2013-12-18 18:47:29

up
Member
Registered: 2012-08-14
Posts: 12

Re: 3x+ battery life

Hello!

Can the powerdown/up script command screen power saving? I would like to use screen power saving only when on battery and otherwise have my monitor always on.  What I tried was to set these to powerup

xset s off
xset -dpms

and powerdown

xset s on
xset +dpms

but they are not working. They do work if set from terminal.

Edit: ok, fixed this with adding the following lines to both powerdown/up

export DISPLAY=:0.0
export XAUTHORITY=/home/<user>/.Xauthority

Last edited by up (2013-12-18 19:49:18)

Offline

#539 2014-01-09 10:29:58

sholojov
Member
Registered: 2014-01-09
Posts: 1

Re: 3x+ battery life

I ran the script as indicated in the first post and I get this message:

powerdown wrote:

[powerdown] cannot write powersave to /sys/module/pcie_aspm/parameters/policy
[powerdown] cannot run mount -o remount,noatime /dev/sda4

If required, /home is mounted in /dev/sda4, while / in /dev/sda3

Please, I need this script to work as I got just ~1,30 h battery life. I have to use my laptop to study and it gotta be able to work for some hours... I don't want to go back to Windows...

PS: This is my first post and I'm a noob Archlinux user, so please take this into account.

Thank you in advance and sorry about my basic English.

Last edited by sholojov (2014-01-09 10:32:14)

Offline

#540 2014-01-10 11:46:09

sekret
Member
Registered: 2013-07-22
Posts: 205

Re: 3x+ battery life

pcie_aspm isn't supported on every hardware. You could enforce it with a kernel parameter, but I don't recommend doing that! My laptop also doesn't support it and after forcibly enabling this, it consumed more power instead of less power. So it's best if you ignored it.
Why the remount doesn't work I don't know. Seems a bit odd imo.

But still, if you now only get ~1,3 h battery life, I guess it won't be possible to suddenly make it go up to "some hours" like you requested. How long does your laptop run when you use windows?

Offline

#541 2014-01-23 00:08:34

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,061
Website

Re: 3x+ battery life

Hi Taylor, I used this awhile back on my asus laptop and now I'm running a macbook air 6,2 13".  Just wanted to say thanks and the udev rule is activating powerdown perfectly.  I have a not-so-related-question in regards to keybinding a toggle for xset s off/on and dpms off/on.  Anyone here have a script that I can bind to a key (F4) to toggle between them?  That way, while on battery, if I want to watch a video, the screen doesn't blank out etc etc?  And I can toggle it back to go to power saving?


github       bible       blog       screenshot

Offline

#542 2014-01-23 07:48:09

sekret
Member
Registered: 2013-07-22
Posts: 205

Re: 3x+ battery life

Don't video players handle this? My screen turns off after 10 minutes of inactivity, but when I play a video in mpv, it stays on.

Offline

#543 2014-01-23 07:57:19

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: 3x+ battery life

Video players yes, but flash streams no.

Offline

#544 2014-01-28 15:23:36

I-sty
Member
From: Romania
Registered: 2012-11-30
Posts: 60
Website

Re: 3x+ battery life

@taylorchu does not plan to create an ui for your awesome app? big_smile

Last edited by I-sty (2014-01-28 15:23:59)

Offline

#545 2014-03-04 00:38:27

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: 3x+ battery life

I just installed it as per the rules on the front page.   grabbed the package, and added those parameters.

however, after doing a "ps aux | grep powerdown" i didn't see anything. i also noticed that there wasn't any need for a systemd enabling of a daemon.  i am skeptical that it is working.  how can i check that?

Offline

#546 2014-03-04 02:38:37

cris9288
Member
Registered: 2013-01-07
Posts: 347

Re: 3x+ battery life

powerup and powerdown are scripts that live in /usr/bin and are triggered by a udev rule. Try running the scripts (/usr/bin/powerdown and /usr/bin/powerup) from the commandline, running /usr/bin/powernow inbetween to see the difference. Also test this by unplugging the power and running powernow.

Last edited by cris9288 (2014-03-04 02:39:07)

Offline

#547 2014-03-04 14:16:18

Arup
Member
From: Earth
Registered: 2014-02-20
Posts: 67

Re: 3x+ battery life

Many thanks for your script. I was under a great dilemma, I use TLP on Ubuntu and it works quite good. However on my Arch laptop that has Optimus, TLP worked fine as long as I used Bumblebee, recently kernel 3.12 and above implemented GPU switching via PRIME that works really well with nouveau. Sadly TLP has some issues with that, as soon as I would install TLP and reboot, system would run hot as the discrete nvidia GPU gets turned on permanently regardless of load.
I was looking for an alternate desperately to squeeze out the five hours I get with this laptop. Powertop solved that issue for me well. Keep up the good work.

Offline

#548 2014-03-04 17:01:21

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: 3x+ battery life

From running powerdown manually:
[powerdown] cannot run x86_energy_perf_policy powersave

was the message I received.  the difference in wattage consumption isn't that big of a difference.  it still uses 16-19 watts.  is that normal?

Offline

#549 2014-03-04 18:01:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: 3x+ battery life

@3xOSC

% pkgfile x86_energy_perf_policy                                                                                                                                                               
community/x86_energy_perf_policy

Offline

#550 2014-03-04 19:14:40

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 373

Re: 3x+ battery life

In my case:

└──>  sudo powerdown
[powerdown] cannot run x86_energy_perf_policy powersave
[powerdown] cannot write 1 to /sys/module/i915/parameters/i915_enable_rc6

└──>  sudo powerup
[powerdown] cannot run x86_energy_perf_policy normal
[powerdown] cannot write 350 to /sys/kernel/debug/dri/0/i915_max_freq
[powerdown] cannot write 350 to /sys/kernel/debug/dri/64/i915_max_freq

x86_energy_perf_policy in installed.


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

Board footer

Powered by FluxBB