# Battery problems



## Naos (Nov 18, 2013)

Hi, 

I have an Asus N56VV with Ubuntu, Windows 7 and FreeBSD. I've checked the remaining time of my laptop during FreeBSD and it was 1:39. Maybe because of Bluetooth, internet stuff (even if I'm not connected to the internet), CPU, NVidia and Intel graphic cards. How may I extend the battery life?

Thank you


----------



## deflected (Nov 18, 2013)

Hi @Naos,

You can try with this nice guide for power tuning ->  https://wiki.freebsd.org/TuningPowerConsumption


----------



## Naos (Nov 18, 2013)

This is my /boot/loader.conf:


```
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
dev.cpu.0.freq_levels: 800/14000 //not sure of this
performance_cx_lowest="C2"
economy_cx_lowest="C2"
hw.pci.do_power_nodriver=3
```


----------



## deflected (Nov 19, 2013)

Hi Naos,

It is wrong to use:

```
dev.cpu.0.freq_levels: 800/14000 //not sure of this
performance_cx_lowest="C2"
economy_cx_lowest="C2"
```

in /boot/loader.conf

1. Remove 

```
dev.cpu.0.freq_levels: 800/14000 //not sure of this
```

and put:

```
powerd_enable="YES"
```

in /etc/rc.conf. This will start a small service that will automatically choose and switch best frequency for you. Take a look at powerd() for more information.

2. Move 

```
performance_cx_lowest="C2"
economy_cx_lowest="C2"
```

from /boot/loader.conf to /etc/rc.conf.


----------



## Naos (Nov 19, 2013)

So this is my /boot/loader.conf

```
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1
drm.i915.enable_rc6=7
hw.pci.do_power_nodriver=3
```

and this is my /etc/rc.conf

```
hostname="intel"
keymap="it.iso.kbd"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
performance_cx_lowest="C2"
economy_cx_lowest="C2"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
# -- sysinstall generated deltas -- # Sun Nov 17 15:27:43 2013
ifconfig_usbus0="inet 192.168.0.1  netmask 255.255.255.0"
ipv6_activate_all_interfaces="YES"
defaultrouter="192.168.0.1"
hostname="intel"
# -- sysinstall generated deltas -- # Sun Nov 17 15:30:52 2013
ipv6_activate_all_interfaces="YES"
defaultrouter="192.168.0.1"
hostname="intel"
```


----------



## Naos (Nov 22, 2013)

With that configuration it still doesn't work.


----------



## deflected (Nov 22, 2013)

Any improvements?


----------



## kpedersen (Nov 22, 2013)

I noticed that setting the following in /etc/sysctl.conf resets (to C1) when you plug in or unplug the power adapter.

```
dev.cpu0.cx_lowest=C2
dev.cpu1.cx_lowest=C3
```

Whereas the following in /etc/rc.conf persists but doesn't allow you to set the second cpu to C3 (which is safe as long as one cpu is C2 to avoid lag)


```
performance_cx_lowest="C2"
economy_cx_lowest="C2"
```


----------

