Fedora Linux Support Community & Resources Center
  #1  
Old 22nd November 2011, 02:29 PM
sam88 Offline
Registered User
 
Join Date: Nov 2011
Location: Turin
Posts: 8
linuxchrome
Batterylife on Asus U36SD

Hi everybody,
I am a newbie of Fedora and i am using Fedora 16 on my new Asus U36 SD laptop; I noticed that the battery life running Fedora is dramatically reduced (from 8/9 hours in Windows 7 to 4 hours) and I read many posts concerning this kind of problems.

Until now I have understood that the main reason of this behaviour are linked to:
1) unoptimized CPU power management (acpi services)
2) unoptimized GPU power management (Optimus not present so my GT520M is always on...i think)

I found many posts in which there is a command to force the acpi on but I was not able to find the right file to modify (maybe they were related to previous version of fedora)... anyway it seems that the acpi is working due to the fact that if I type the command

cat /proc/cpuinfo

it shows a cpu frequency of 800Mhz (not 2.3Ghz as default for my i5 2410M). I also installed PowerTop and the two cores are for most of the time in c7 state (it should be the less consuming state right?).
So, first question: what is the right way to discover if acpi services are working fine? What could I do to reduce the consumption of the CPU?

For what concerns the GPU I tried to install bumblebee going into my home dir and typing:

git clone http://github.com/MrMEEE/bumblebee.git
cd bumblebee/
sudo -E ./install.sh

but I can't see any improvement in terms of batterylife.
So second question: is it necessary to launch the application somehow? instead of using bubblebee is there the possibility to disable the GT520M in other ways? I have navigated into the BIOS but no option seems available...

Thanks everybody and sorry for this long post!
Reply With Quote
  #2  
Old 23rd November 2011, 11:23 PM
sam88 Offline
Registered User
 
Join Date: Nov 2011
Location: Turin
Posts: 8
windows_7chrome
Re: Batterylife on Asus U36SD

any suggestion?
Reply With Quote
  #3  
Old 23rd November 2011, 11:56 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,055
linuxfirefox
Re: Batterylife on Asus U36SD

You could try running the acpi_call code directly, that's what I'm doing. The bumblebee stuff is just a fancy front end for figuring out what particular laptop you have and then using the matching acpi_call code string to turn off the card.

You can get the acpi_call code with:

git clone https://github.com/mkottman/acpi_call

you build it with "make", then as root user:

copy the acpi_call.ko file to /lib/modules/`uname -r`/extra
run depmod -a
and run the test_off.sh script, Take note of the code that says it "works" and make a script in
/etc/sysconfig/modules that loads the module and echos that code into /proc/acpi/call

(or just take a look in the test_off.sh script, it can be stripped down to do the right thing and copied to /etc/sysconfig/modules )

a script in /etc/sysconfig/modules should run automatically at start time.

If you have lm_sensors installed, a hint that the acpi_call has worked at turning off the card is that the nouveau entry shown by "sensors" will be "-1" (that is , an invalid temperature). I think turning off the nvidia turns off the sensor so lm_sensors ends up reporting -1 as the temperature on the NV card.
Reply With Quote
  #4  
Old 24th November 2011, 08:53 AM
sam88 Offline
Registered User
 
Join Date: Nov 2011
Location: Turin
Posts: 8
linuxchrome
Re: Batterylife on Asus U36SD

I tried to do what you have written but I am not a linux pro so maybe there are some mistakes in the commands I typed:
Code:
git clone https://github.com/mkottman/acpi_call
then in dir "/home/myname/acpi_call" i typed
Code:
make 
cp acpi_call.ko  /lib/modules/`uname -r`/extra
depmod -a
and then
Code:
chmod +x
./test_off.sh
but it says that
Code:
"The acpi_call module is not loaded"
I installed lm-sensors and the output is
Code:
acpitz-virtual-0
Adapter: Virtual device
temp1:        +55.0C  (crit = +108.0C)

asus-isa-0000
Adapter: ISA adapter
temp1:        +55.0C  

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +56.0C  (high = +86.0C, crit = +100.0C)
Core 0:         +46.0C  (high = +86.0C, crit = +100.0C)
Core 1:         +49.0C  (high = +86.0C, crit = +100.0C)
what's wrong with my commands?
Thank you very much!
Reply With Quote
  #5  
Old 24th November 2011, 05:57 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,055
linuxfirefox
Re: Batterylife on Asus U36SD

run
Quote:
modprobe acpi_call
anytime after you did the "depmod -a"

the test_off.sh script could be edited to insert that modprobe command at the start of the
script just before it does all those method tests:
Quote:
if lsmod | grep -q acpi_call; then
# nothing here
else
modprobe acpi_call
fi
then it would do that for you

Last edited by marko; 24th November 2011 at 06:07 PM.
Reply With Quote
  #6  
Old 24th November 2011, 06:34 PM
sam88 Offline
Registered User
 
Join Date: Nov 2011
Location: Turin
Posts: 8
linuxchrome
Re: Batterylife on Asus U36SD

Ok I have done what you wrote before and the output of test_off is:
Code:
Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB.PCI0.P0P2.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P3.PEGP._OFF: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: failed
Trying \_SB.PCI0.P0P1.PEGP._OFF: failed
Trying \_SB.PCI0.MXR0.MXM0._OFF: failed
Trying \_SB.PCI0.PEG1.GFX0._OFF: failed
Trying \_SB.PCI0.PEG0.GFX0.DOFF: works
and typing sensors:
Code:
acpitz-virtual-0
Adapter: Virtual device
temp1:        +53.0C  (crit = +108.0C)

asus-isa-0000
Adapter: ISA adapter
temp1:        +53.0C  

coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +54.0C  (high = +86.0C, crit = +100.0C)
Core 0:         +50.0C  (high = +86.0C, crit = +100.0C)
Core 1:         +51.0C  (high = +86.0C, crit = +100.0C)
how could I check if the GT520 is really off?
powertop gives a discharge rate of about 16W...under windows other softwares give more or less 4/5 W...

Last edited by sam88; 24th November 2011 at 06:55 PM.
Reply With Quote
  #7  
Old 25th November 2011, 08:36 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,055
linuxfirefox
Re: Batterylife on Asus U36SD

The value I was checking in the sensors output was "nouveau-pci-0100" like this from my Asus UL30vt laptop:
Quote:
acpitz-virtual-0
Adapter: Virtual device
temp1: +53.0C (crit = +100.0C)

nouveau-pci-0100
Adapter: PCI adapter
temp1: -1.0C (high = +100.0C, crit = +110.0C)

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +47.0C (high = +105.0C, crit = +105.0C)
Core 1: +47.0C (high = +105.0C, crit = +105.0C)
I think the "-1.0C" is a bogus value sensors shows because the card is powered off

I don't see any nvidia entry in your sensors output. It probably worked ok, I think you could also check if the card is off by using:
Quote:
lspci -v
If you see a line in there like:
Quote:
!!! Unknown header type 7f
under the VGA section for the Nvidia card, then I think the card is off
Reply With Quote
  #8  
Old 25th November 2011, 09:43 AM
Dutchy Offline
Registered User
 
Join Date: Aug 2011
Posts: 1,026
linuxfirefox
Re: Batterylife on Asus U36SD

You could check the watt usage with Powertop (while on battery of course).
You should see a drop of about 15 watt after using the acpi_call.
Reply With Quote
  #9  
Old 25th November 2011, 09:46 AM
sam88 Offline
Registered User
 
Join Date: Nov 2011
Location: Turin
Posts: 8
linuxchrome
Re: Batterylife on Asus U36SD

EDIT
The result of lspci -v is
Code:
...
01:00.0 VGA compatible controller: nVidia Corporation Device 1050 (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel driver in use: nouveau
...
So nvidia card seems to be switched off!
The battery life shown is now 4:30 hours with 76% of charge...a part from switching all the entry in the turnables list of
powertop from bad to good is there any other possible way to improve the batterylife?
Thank you very much!

Last edited by sam88; 25th November 2011 at 10:02 AM.
Reply With Quote
  #10  
Old 25th November 2011, 06:31 PM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,055
linuxfirefox
Re: Batterylife on Asus U36SD

You should also strip out the unnecessary echo codes out of the script and only use the one that worked which was:
\_SB.PCI0.PEG0.GFX0.DOFF
Reply With Quote
  #11  
Old 25th November 2011, 08:18 PM
Dutchy Offline
Registered User
 
Join Date: Aug 2011
Posts: 1,026
linuxfirefox
Re: Batterylife on Asus U36SD

Quote:
Originally Posted by sam88 View Post
EDIT
The result of lspci -v is
Code:
...
01:00.0 VGA compatible controller: nVidia Corporation Device 1050 (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel driver in use: nouveau
...
So nvidia card seems to be switched off!
The battery life shown is now 4:30 hours with 76% of charge...a part from switching all the entry in the turnables list of
powertop from bad to good is there any other possible way to improve the batterylife?
Thank you very much!
Sure, since you are using F16 you could look in to hard disk power saving (man these):
hdparm -S 24 /dev/sda
hdparm -B 1 /dev/sda

You probably don't want to enable all the power save advices of Powertop because it might bring your mouse or keyboard occasionally to sleep or even prevent you from suspending/hibernating/shutting down successfully.
Reply With Quote
  #12  
Old 6th January 2012, 02:18 PM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 100
linuxopera
Re: Batterylife on Asus U36SD

Sorry to revive an old thread ...
But i'm haing some issues with this as well.

I have gotten this far:

Quote:
Originally Posted by sam88 View Post
Code:
Trying \_SB.PCI0.P0P1.VGA._OFF: failed
Trying \_SB.PCI0.P0P2.VGA._OFF: failed
Trying \_SB_.PCI0.OVGA.ATPX: failed
Trying \_SB_.PCI0.OVGA.XTPX: failed
Trying \_SB.PCI0.P0P3.PEGP._OFF: failed
Trying \_SB.PCI0.P0P2.PEGP._OFF: failed
Trying \_SB.PCI0.P0P1.PEGP._OFF: failed
Trying \_SB.PCI0.MXR0.MXM0._OFF: failed
Trying \_SB.PCI0.PEG1.GFX0._OFF: failed
Trying \_SB.PCI0.PEG0.GFX0.DOFF: works
But when i run the test_off script and it reports as successful (like it does above), the laptops fan starts going faster, and powertop reports an increase in power consumption. Then the computer freezes completely, leaving me with only the option of holding down the power button to shut down. Hm.

Any ideas out there?
Reply With Quote
  #13  
Old 16th February 2012, 12:32 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Smile Asus U36SD

I have written something on Asus U36SD and Fedora 16.

http://amolh.weebly.com/2/post/2012/02/asusu36sd.html
Reply With Quote
  #14  
Old 16th February 2012, 01:46 PM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 100
linuxopera
Re: Batterylife on Asus U36SD

Thank you, that was rather helpful.

I already had gotten acpi_call working, but the upside down webcam was still bothering me.

Regarding your issue with suspend/hibernate, i obviously had the same, since we have the same computer.

However, i have resolved this issue.
You need to create a file with the following content:

Code:
#!/bin/sh
 TMPLIST_E=/tmp/ehci-dev-list
 TMPLIST_X=/tmp/xhci-dev-list
 E_DIR=/sys/bus/pci/drivers/ehci_hcd
 X_DIR=/sys/bus/pci/drivers/xhci_hcd
 E_BIND=$E_DIR""/bind
 E_UNBIND=$E_DIR""/unbind
 X_BIND=$X_DIR""/bind
 X_UNBIND=$X_DIR""/unbind
 #param1 = temp file, param2 = device dir, param3 = unbind

 unbindDev (){
 #inspired by http://art.ubuntuforums.org/showpost...0&postcount=19
 echo -n '' > $1
 for i in `ls $2 | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
 echo -n "$i" | tee $3
 echo "$i" >> $1
 done
 }
 #param1 = tem file, param2 = bind
 bindDev(){
 [ -f $1 ] || return
 for i in `cat $1`; do
 echo -n "$i" | tee $2
 done
 rm $1
 }
 case "${1}" in
 hibernate|suspend)
 unbindDev $TMPLIST_E $E_DIR $E_UNBIND
 unbindDev $TMPLIST_X $X_DIR $X_UNBIND
 ;;
 resume|thaw)
 bindDev $TMPLIST_E $E_BIND
 bindDev $TMPLIST_X $X_BIND
  echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/call
 ;;
 esac
and save it under /etc/pm/sleep.d

For this script to run when it's supposed to, it has to have a name that starts with '20'. For instance , mine is named '20_custom-ehci_hcd'.
(Remember to chmod 775 it to make et executable)

That get's suspend working. Don't know about hibernate, as i haven't tried.
(don't really see the point on a lappy with so much batterytime)

Hope i helps!
Reply With Quote
  #15  
Old 16th February 2012, 05:15 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

Thanks for the script. Now suspend is working fine. I would like to know where do put your acpi_call script ?
Reply With Quote
Reply

Tags
asus, batterylife, u36sd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASUS Motherboard P5GV - ASUS GEFORCE EN7600GS osakar Installation, Upgrades and Live Media 2 2nd September 2006 02:34 AM
Asus A8v arapidsfan Hardware & Laptops 0 8th April 2006 02:08 AM
Asus L3800C laptop plus Asus Wl-100g pcmcia wifi working (ndiswrapper with broadcom) andre@home Servers & Networking 1 26th June 2005 08:27 PM
Asus L5C Tv-out madrugada Hardware & Laptops 1 26th January 2005 06:49 PM


Current GMT-time: 06:24 (Thursday, 02-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin Copyright 2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat