z0rc / debumblebee

DEPRECATED. Don't use it anymore — Optimus graphics support for Debian through VirtualGL
http://suwako.nomanga.net/
GNU General Public License v3.0
26 stars 2 forks source link

Power Saving on Asus 1215n #11

Closed Mecin closed 13 years ago

Mecin commented 13 years ago

Hello again. How can I add this script (turn off nvidia on Asus 1215n): https://github.com/mkottman/acpi_call to optirun?

This acpi_call after clear installation (without debumblebee) works well, we can turn off/on nvidia card, but i can't connect this two scripts to work together.

This is a short instruction what i install this script:

  1. Download : https://github.com/mkottman/acpi_call
  2. Unpack and cd to the unpacked dir.
  3. Type commands: $make $echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf

    update-initramfs -u

    cp acpi_call.ko /lib/modules/uname -r/kernel/

    nano /etc/modules

Add acpi_call to the end of /etc/modules, close and save.

depmod

modprobe acpi_call

And now we can disable/enable nvidia card, go to the unpack dir and type: asus1215n.sh off

My first question is: that this two scripts can work together? Can I install debumblebee and this one to disable enable card without any crashes? If can, I think this step: $echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf I should skip. Second question: in which file (which line) I should add this command: /home/user/example/asus1215n.sh off/on to automatic disable/enable graphic card?

Now I have new clear Debian Testing install on my Asus 1215n, without any external scripts, and I thought that it could somehow combine these two scripts to work together and I test it on fresh install.

PS Sorry for my language. PS2 Thanks for Your good work.

Mecin commented 13 years ago

Now I can see that the disabling/enabling card is implemented to the debumblebee, only I must :

Replace this command string depending on your laptop model.

echo $(acpi_call "SB.PCI0.PEGR.GFX0._ON") ??

Here is a asus1215n.sh file: https://github.com/mkottman/acpi_call/blob/master/asus1215n.sh What string values I should provide to getting work disable/enable my nvidia card?

z0rc commented 13 years ago

In /etc/default/debumblebee: ENABLECARD="/path/to/asus1215n.sh on" DISABLECARD="/path/to/asus1215n.sh off"

Mecin commented 13 years ago

Ok, I installed first debumblebee and second this acpi_call script.

Then I changed the /etc/defaults/debumbleblee (POWER_SAVE=yes and patches to the enable/disable card): # Do not run nVidia X server constantly and start

After reboot, when I type f.e. optirun glxinfo | grep rendering its doing nothing (dont disable/enable card): mecin@debian:~$ optirun glxinfo | grep rendering direct rendering: Yes mecin@debian:~$

Card seems to work: mecin@debian:~/Dokumenty/acpi$ ./asus1215n.sh Usage: ./asus1215n.sh [on|off] P3MO 0x0 DGPS 0x0 _PSC 0x0 Asus 1215N Optimus appears to be on mecin@debian:~/Dokumenty/acpi$

Maybe I must modify script without $enablecard/disablecard variables?

When I manualy turn off nvidia card and I type optirun glxinfo | grep rendering: mecin@debian:~$ optirun glxinfo | grep rendering [VGL] ERROR: Could not open display :1. mecin@debian:~$

When again manuali turn on, the debumblebee doesnt work (the same prompt).

z0rc commented 13 years ago

I've just pushed updates for enable/disable card. I'm not going to do blind debugging so it's up to you to find what isn't working. Also I'm not going to debug any acpi_call's without owning the needed hardware.

Mecin commented 13 years ago

Okey so I can now install new version? Should I first uninstall older version before install newest? And should I remove this my apci scripts to manual disable/enable graphic card?

z0rc commented 13 years ago

If you are on testing or stable 0.4 won't work for you. If it runs OK you don't need to update. First you need to make sure that debumblebee works with POWER_SAVE=no, that I suggest to modify (enable|disable)card scripts inserting proper acpi_calls. For example acpi_call "_SB.PCI0.P0P4.GFX0._DSM" \ "{0xF8,0xD8,0x86,0xA4,0xDA,0x0B,0x1B,0x47," \ "0xA7,0x2B,0x60,0x42,0xA6,0xB5,0xBE,0xE0}" \ "0x100 0x1A {0x1,0x0,0x0,0x3}" acpi_call "_SB.PCI0.P0P4.GFX0._PS3" should go into disable card