Fedora Linux Support Community & Resources Center
  #16  
Old 17th February 2012, 12:23 AM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

Well actually, i haven't bothered with making it run at startup, since i usually just suspend my machine rather than turning it off.

So i just keep it in my home folder, where it's easy to find at startup.
Reply With Quote
  #17  
Old 17th February 2012, 12:57 AM
marko Online
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,031
solarisfirefox
Re: Batterylife on Asus U36SD

I think Fedora 16 will run at boot up any script it finds in /etc/sysconfig/modules
Reply With Quote
  #18  
Old 19th February 2012, 08:38 AM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

The suspend is not working consistently with that script after some updates. Just froze with fedora logo..I have to forcefully shut it down by power button. I guess
the same problem is listed here too

https://bbs.archlinux.org/viewtopic.php?id=135210

Last edited by amolh12; 19th February 2012 at 08:42 AM.
Reply With Quote
  #19  
Old 21st February 2012, 11:32 AM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

Quote:
Originally Posted by amolh12 View Post
The suspend is not working consistently with that script after some updates. Just froze with fedora logo..I have to forcefully shut it down by power button.
Interesting, i don't have that problem. A few times i have experienced the computer waking up instantly upon sleep, but a figured that had to do with some running process causing wakeup.

However, there are quite a few different versions of this script for different distros, that all supposedly do the same - try this http://www.google.dk/search?client=o...hannel=suggest
Reply With Quote
  #20  
Old 21st February 2012, 12:20 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

Quote:
Originally Posted by esbennn View Post
Interesting, i don't have that problem.
Which kernel you are using now. I think it worked fine with 3.1.x however for 3.2.x that script for suspend is not working.
Reply With Quote
  #21  
Old 21st February 2012, 01:00 PM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

I'm using kernel 3.2.6-3, and it has worked on all kernels with f16 for me.
But i guess it could be some kernel stuff causing trouble - i had a kernel that wouldn't even boot once.

Have you tried any other scripts from ubuntuforums or the likes?
Reply With Quote
  #22  
Old 23rd February 2012, 10:05 AM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

Now I have done the fresh install of Fedora 16 x86_64 and the updated kernel is 3.2.7

Can you please share the exact details to make is suspend...I tried that script and its not working. I guess apart from that script you must be running something else.
Reply With Quote
  #23  
Old 23rd February 2012, 05:50 PM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

I am using acpi_call to disable the discreet card, but from your previous post, i was under the impression that your are doing the same?

This is the actual script that i just grabbed from my file, 20_custom-ehci_hcd, located /etc/pm/sleep.d:

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
The file has these permission details:
Code:
-rwxrwxr-x. 1 root root
This script works for me. I am, however, still on kernel 3.2.6, but i am updating it this moment. If I find that this script is not working with the new kernel for me either, I'll let you know.
Reply With Quote
  #24  
Old 23rd February 2012, 06:32 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

I am indeed using acpi_call to disable the card and put the script as a cron job as root..so that at each startup it should run..

Please report the success of the suspend script after kernel update....

As you have mentioned that you are running the acpi_call manually each time and not added in startup. Can this cause a problem while suspending ?
Reply With Quote
  #25  
Old 24th February 2012, 07:28 AM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

I can confirm that the above script still cuts it for me on kernel 3.2.7.
Concerning running the acpi_call manually as opposed to on startup, I don't really know whether that makes any difference. Seems to me that it wouldn't matter - but i am unsure.

When your suspend fails, is there anything of use in var/log/messages ?
Reply With Quote
  #26  
Old 24th February 2012, 06:36 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

I have done following observations with 3.2.7 and suspend script you have posted.

Suspend script works when I dont use my acpi_call script to shutoff nVidia card either on startup or manually.

my acpi_call script is called nvidia.sh and located in /usr/local/bin

Code:
#!/bin/bash

echo "-------------------------------" >> /var/log/nvidia.log
echo `date` >> /var/log/nvidia.log
echo "Disabling Nvidia video adapter !! " >> /var/log/nvidia.log
echo "-------------------------------" >> /var/log/nvidia.log

/sbin/modprobe acpi_call
echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/call
How you are using your acpi_call script, and what is the output of lspci -v is showing ? Is it showing something like

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
if so then only your card is off.

I observe in your suspend script, while resuming you have use acpi_call to off nvidia card. Is
it working properly, as you have not used modprobe command, I am not sure though.

Please share the details !!

In your earlier post on the following thread shed some light on the same problem as

http://forums.fedoraforum.org/archiv.../t-274870.html

I could not understand the last post in that thread..

Please tell what are the procedures to blacklist the nouveau and nvidia card and which script you are using to disable the nvidia card

Last edited by amolh12; 25th February 2012 at 11:20 AM.
Reply With Quote
  #27  
Old 28th February 2012, 10:17 PM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

Sorry man, i completely forgot about you over the weekend..


The procedure to blacklist noveau (or at least what i did) is to create a file named 'blacklist-nvidia.conf' in /etc/modprobe.d with the following content:
Code:
blacklist nouveau
blacklist nvidia
and these rights: -rw-r--r-- (no need to chmod)

The script i use to disable the discreet looks like this:
Code:
#!/bin/sh
#Disable nvidia card
sudo insmod /home/esben/acpi_call/acpi_call.ko
sudo sh /home/esben/acpi_call/test_off.sh
So i'ts basically just a shortcut to the test_off.sh script located in the cloned acpi_call folder from github, that finds out which call actually works by trying them all.
The reason i haven't bothered getting it to autorun at startup is, that i practically only power my pc off when kernel has been updated, and then i need to recompile the acpi_call kernel module anyway.

Here's the output of lspci once the discreet card has been deactivated:
Code:
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller: nVidia Corporation Device 1050 (rev ff) (prog-if ff)
which indicates that the discrete card is indeed off. After running my "kill optimus.sh" script, battery time goes from 2-3 hrs to 6-8 hrs.

Quote:
I observe in your suspend script, while resuming you have use acpi_call to off nvidia card. Is
it working properly, as you have not used modprobe command, I am not sure though.
I am indeed disabling the discreet card upon resume in my script. As i recall, i made this tweak because i had some trouble with waking up. Adding that line to the script did, however, solve it.


It would seem to me, that blacklisting nvidia/nouveau is what you are lacking, so i would start off by doing that.

However, i am no expert, so if it still doesn't work, try all the steps.
Let me know how it goes
Reply With Quote
  #28  
Old 29th February 2012, 06:11 AM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

Good to see you after so long time. I was waiting for your response. Unfortunately this procedure is not working for me
even after blacklisting nvidia driver as you mentioned and using your acpi_call script its unable to suspend. Dont know
the reason...
Reply With Quote
  #29  
Old 29th February 2012, 09:58 AM
esbennn Offline
Registered User
 
Join Date: Sep 2010
Location: Dk
Posts: 96
linuxopera
Re: Batterylife on Asus U36SD

Hm, this is really strange.

What is your output of

dmesg |grep nvidia

and

dmesg |grep nouveau

?
Reply With Quote
  #30  
Old 29th February 2012, 02:18 PM
amolh12 Offline
Registered User
 
Join Date: Feb 2012
Location: Sweden
Posts: 13
linuxchrome
Re: Batterylife on Asus U36SD

Do you think I need to run dracut command to load initramfs so that it can recognize the blacklisted
module of nvidia and nouvou in /etc/modprobe.d/blacklist-nvidia.conf

dracut -f /boot/initramfs-currentimage
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: 16:15 (Saturday, 30-08-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