You are not logged in.
Pages: 1
Hey guys, I'm new in using Arch, so i need some help. I'm using Asus n53sv (nvidia optimus technology) laptop, with nvidia and intel graphics. With this acpi_call guide http://linux-hybrid-graphics.blogspot.c … onoff.html I can disable nvidia card, and I'm very happy for this, but how can I make a startup script to disable nvidia card on boot, because it is quite annoying to disable nvidia card manually every time I turn on my computer. I've already done that acpi_call module loads on boot, and now I just need to run test_off.sh script on boot. I've tried to load it in rc.local but i doesn't work for me (maybe I do something wrong). So maybe someone of you guys could tell me how to run that script on boot. I hope that you will understand me what I want. Thank you for your time.
Last edited by eli0 (2011-10-01 20:40:35)
Offline
Post your rc.local.
You need to have the script either in your $PATH or supply the full path.
Last edited by karol (2011-09-27 23:02:50)
Offline
This is my setup:
┌─[ 1:39]-[root@pedro]-[/home/viruszzz]
└─› /usr/share/acpi_call/test_off.sh
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: works!and then I've placed this in my rc.local
echo '\_SB.PCI0.P0P2.PEGP._OFF' > /proc/acpi/callTake Care
Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog
Offline
Ok, I've done as ViruSzZ posted, but result is the same as mine when I post that line in rc.local:
Normally I have to wait only few seconds before my login manager shows up, but with that line I got about 15 seconds freeze before my login managers shows up.
Secondly battery status indicator (near clock) disappears.
And of course acpi_call doesn't work, I need to run it manually.
My rc.local:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
#Disable Nvidia
echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/callI loaded acpi_call module on boot by doing these steps:
1. coppied acpi_call.ko to /lib/modules/3.0-ARCH/kernel/drivers/acpi/
2. depmod -a
3. added acpi call to rc.conf: MODULES=(acpi_call)
Thats all, it loads on boot, but nvidia's turning of script doesn't work.
Last edited by eli0 (2011-09-28 07:01:09)
Offline
What says dmesg about this? Can you post the output of:
┌─[ 9:22]-[root@pedro]-[/home/viruszzz/ABS/custom-kernel]
└─› dmesg | grep acpi_call
[ 6.904619] acpi_call: Module loaded successfully
[ 25.066996] acpi_call: Calling \_SB.PCI0.P0P2.PEGP._OFF
[ 25.082525] acpi_call: Call successful: 0x1Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog
Offline
[eli0@myhost ~]$ dmesg | grep acpi_call
[ 5.805240] acpi_call: Module loaded successfullyWith test_off.sh:
[eli0@myhost acpi_call]$ dmesg | grep acpi_call
[ 5.805240] acpi_call: Module loaded successfully
[ 1660.211920] acpi_call: Calling \_SB.PCI0.P0P1.VGA._OFF
[ 1660.211932] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.213046] acpi_call: Calling \_SB.PCI0.P0P2.VGA._OFF
[ 1660.213054] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.214105] acpi_call: Calling \_SB_.PCI0.OVGA.ATPX
[ 1660.214111] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.215159] acpi_call: Calling \_SB_.PCI0.OVGA.XTPX
[ 1660.215166] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.216208] acpi_call: Calling \_SB.PCI0.P0P3.PEGP._OFF
[ 1660.216214] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.217261] acpi_call: Calling \_SB.PCI0.P0P2.PEGP._OFF
[ 1660.217267] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.218302] acpi_call: Calling \_SB.PCI0.P0P1.PEGP._OFF
[ 1660.218307] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.219337] acpi_call: Calling \_SB.PCI0.MXR0.MXM0._OFF
[ 1660.219342] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.220317] acpi_call: Calling \_SB.PCI0.PEG1.GFX0._OFF
[ 1660.220322] acpi_call: Cannot get handle: Error: AE_NOT_FOUND
[ 1660.221346] acpi_call: Calling \_SB.PCI0.PEG0.GFX0.DOFF
[ 1660.313425] acpi_call: Call successful: 0xffLast edited by eli0 (2011-09-28 07:49:06)
Offline
So, the acpi_call module seems it's loaded on startup. However, the call to /proc/acpi/call FWIS isn't getting executed. And what if you run the command manually, is it succeeding?
echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/callIf that works when manually executed, then you may want to check if your local.rc is executing on your system' startup.
Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog
Offline
It executes manually:
[eli0@myhost ~]$ echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/call
[eli0@myhost ~]$ dmesg | grep acpi_call
[ 6.146390] acpi_call: Module loaded successfully
[ 79.538339] acpi_call: Calling \_SB.PCI0.PEG0.GFX0.DOFF
[ 79.601302] acpi_call: Call successful: 0xff
[eli0@myhost ~]$ so I guess it's rc.local problem. How can I test it?
EDITED:
I've added that line to rc.local again and everything is the same, freeze before login shows up, missing battery indicator and only 2 hours of battery life instead of 4. But dmesg says that it is executed. ![]()
Last edited by eli0 (2011-09-28 08:47:35)
Offline
It executes manually:
[eli0@myhost ~]$ echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/call [eli0@myhost ~]$ dmesg | grep acpi_call [ 6.146390] acpi_call: Module loaded successfully [ 79.538339] acpi_call: Calling \_SB.PCI0.PEG0.GFX0.DOFF [ 79.601302] acpi_call: Call successful: 0xff [eli0@myhost ~]$so I guess it's rc.local problem. How can I test it?
Check rc.local's permissions, also you can add something like this:
echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/call && logger -t Shutting down the discrete cardand then check in messages if it's logged. Another thought I have in mind is to check whether /proc/acpi/call exists at the time of the acpi_call execution.
Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog
Offline
Then as a workaround you can remove the acpi line from your rc.local and set an alias in your bashrc so you can disable your discrete card immediately after login.
I don't have any other ideas why you have those behaviors (freezing, missing battery indc etc ...).
Their Momma Made Em, Their Momma Gave em & now she can`t even SAVE`em | My WebLog
Offline
Thank you mate for your help. I'll test it tomorrow, coz today was quite busy day for me, so I need to relax.
Offline
Ok, I've done as ViruSzZ posted, but result is the same as mine when I post that line in rc.local:
Normally I have to wait only few seconds before my login manager shows up, but with that line I got about 15 seconds freeze before my login managers shows up.
Secondly battery status indicator (near clock) disappears.
And of course acpi_call doesn't work, I need to run it manually.My rc.local:
#!/bin/bash # # /etc/rc.local: Local multi-user startup script. # #Disable Nvidia echo '\_SB.PCI0.PEG0.GFX0.DOFF' > /proc/acpi/callI loaded acpi_call module on boot by doing these steps:
1. coppied acpi_call.ko to /lib/modules/3.0-ARCH/kernel/drivers/acpi/
2. depmod -a
3. added acpi call to rc.conf: MODULES=(acpi_call)
Thats all, it loads on boot, but nvidia's turning of script doesn't work.
I experienced the same odd behaviors as you did after adding this line including the login hangs and the disappearance of my battery meter. I found adding a value 3 or higher in a sleep command before the disable nvidia line did the trick for me on my Asus UL30VT.
sleep 3
Offline
Thank you mate, sleep 3 doesn't work for me but sleep 10 works perfectly:)
Offline
Pages: 1