 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

22nd November 2011, 02:29 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Location: Turin
Posts: 8

|
|
|
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!
|

23rd November 2011, 11:23 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Location: Turin
Posts: 8

|
|
|
Re: Batterylife on Asus U36SD
any suggestion?
|

23rd November 2011, 11:56 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,491

|
|
|
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.
|

24th November 2011, 08:53 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Location: Turin
Posts: 8

|
|
|
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.0°C (crit = +108.0°C)
asus-isa-0000
Adapter: ISA adapter
temp1: +55.0°C
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +56.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +46.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +49.0°C (high = +86.0°C, crit = +100.0°C)
what's wrong with my commands?
Thank you very much!
|

24th November 2011, 05:57 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,491

|
|
|
Re: Batterylife on Asus U36SD
run
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.
|

24th November 2011, 06:34 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Location: Turin
Posts: 8

|
|
|
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.0°C (crit = +108.0°C)
asus-isa-0000
Adapter: ISA adapter
temp1: +53.0°C
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +54.0°C (high = +86.0°C, crit = +100.0°C)
Core 0: +50.0°C (high = +86.0°C, crit = +100.0°C)
Core 1: +51.0°C (high = +86.0°C, crit = +100.0°C)
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.
|

25th November 2011, 08:36 AM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,491

|
|
|
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.0°C (crit = +100.0°C)
nouveau-pci-0100
Adapter: PCI adapter
temp1: -1.0°C (high = +100.0°C, crit = +110.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +47.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +47.0°C (high = +105.0°C, crit = +105.0°C)
|
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:
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
|

25th November 2011, 09:43 AM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 715

|
|
|
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.
|

25th November 2011, 09:46 AM
|
|
Registered User
|
|
Join Date: Nov 2011
Location: Turin
Posts: 8

|
|
|
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.
|

25th November 2011, 06:31 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,491

|
|
|
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
|

25th November 2011, 08:18 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 715

|
|
|
Re: Batterylife on Asus U36SD
Quote:
Originally Posted by sam88
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.
|

6th January 2012, 02:18 PM
|
|
Registered User
|
|
Join Date: Sep 2010
Location: Dk
Posts: 88

|
|
|
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
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?
|

16th February 2012, 01:46 PM
|
|
Registered User
|
|
Join Date: Sep 2010
Location: Dk
Posts: 88

|
|
|
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!
|

16th February 2012, 05:15 PM
|
|
Registered User
|
|
Join Date: Feb 2012
Location: Sweden
Posts: 13

|
|
|
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 ?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 05:11 (Thursday, 20-06-2013)
|
|
 |
 |
 |
 |
|
|