3 Haziran 2013 Pazartesi

Fedora Power Tweak Suggestion (For Intel based CPU)


Hello everyone ; Recently I noticed some of laptops has power consumption problem. That cause short time usage , run out so quickly and we gonna do something about that. Last weekend I got DELL INSPIRON N5110 laptop on my hand. And this laptop has only 1 hour can stand without tweak on Fedora 19 XFCE.
Yes that's a problem.So here what I did;

First thing we gonna do is , installing "powertop" . That handy app show our batter power consumption and on "Tunable" menu we can see how can we tune our laptop for make it long battery life. When I saw the tunable list It was all "bad" and that's mean we gonna tune every part of it. Another problem is this laptop has no "cpufreq-userspace" controller so what's mean It's always working on "performance" mode. So I can't set to "ondemand" mode but . most of laptops has all this feature. We don't have to worry about too much.

Audio


First tweak gonna be our "intel sound" card tweak. If you have Intel based sound system. So you can use it.

Well first I should say this ;  on Fedora 19  "modprobe.d" directory moved to "/usr/lib" and on Fedora 18 still on the old place. So If you're using F19 please consider that.

On modprobe.d directory We gonna create a "audio_power_save.conf" file and add this line ;

options snd_hda_intel power_save=1

That's give to our intel sound card will work in power_save mode.

Bluetooth(yum install rfkill -y)

If your laptop has bluetooth(which is most of laptop has it) We need to turn off on booting so If we gonna need bluetooth we can turn on manually or directly we close as hardware button If you have but I'm gonna use "software block" so here is rules;

cd /etc/udev/rules.d/ 

create a file ;

touch bt.rules

use your editor and add this line 

SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"

Disabling NMI watchdog

The NMI watchdog is a debugging feature to catch hardware hangs and cause a kernel panic. On some systems it can generate a lot of interrupts, causing a noticeable increase in power usage.
For closing this  we need to create another conf file so ; 

cd /etc/sysctl.d/
touch disable_watchdog.conf

kernel.nmi_watchdog = 0

Disabling Wake-on-LAN


 cd /etc/udev/rules.d/
touch disable_wol.rules

ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*" RUN+="/usr/bin/ethtool -s %k wol d"

PCI Runtime Power Management

cd /etc/udev/rules.d/
touch pci_pm.rules

ACTION=="add", SUBSYSTEM=="pci", ATTR{power/control}="auto"

Writeback Time

cd /etc/sysctl.d/
touch dirty_writeback.conf

vm.dirty_writeback_centisecs = 1500

SATA Active Link Power Management

cd /etc/udev/rules.d/
touch hd_power_save.rules

SUBSYSTEM=="scsi_host", KERNEL=="host*", ATTR{link_power_management_policy}="min_power"

USB Autosuspend

cd /etc/udev/rules.d/
touch usb_power_save.rules
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control" ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend" ATTR{power/autosuspend}="2"


After all this, you can reboot your computer and open powertop see how "good" it is :) After all thing I done for the laptop I have It was only stand 1 hour to 4 hour 30 minutes in idle without suspend or hibernate and brightness level also low. 

Other suggestion I can say ; 
  1. Don't over charge your battery
  2. If Laptop stand in one place too long you can remove your battery and use from adapter. 
  3. If you're not gonna remove your battery unplug from fuse and let it empty and re-charge it. 
  4. Follow the battery instruction If It's come from your laptop manufacturer.
  5. If you have a suggestion please comment it. 
  6. Use Fedora 19 :)) 
  7. Thank you for reading have good day :)