acpi_call Nvidia Optimus

Hello everyone I'm new to FreeBSD and really want to run it on my NVidia optiums laptop so I took 9.1 RC1 for a spin and tried playing around with the sysutils/acpi_call port and the ACPI method I used under Linux to turn off my Nvidia video card. The first time I tried it just worked. It output 0, I heard the fans spin down and apm reported a battery increase of more than one hour (I guess there are better ways to tell if it was off but I didn't know any. After that I could not turn it back on but rebooting in Linux gave me the certainty that it was off (since on my laptop if it is rebooted,and not powered off and on again, with the NVidia card off the card is not re-initialized by the BIOS and basically disappears and doesn't get listed by lspci). Anyway since then I haven't been able to power the NVidia card off again and I always get the Unknown object type '0' error.
That's it, I don't know if someone can help, just wanted to share in the hope that it can be useful to someone with more skills and experience.
Claudio
 
I didn't know we had a acpi_call port (it's sysutils/acpi_call) - thanks for telling us.
Your post is unclear; is the problem that you can't turn on the nVidia card at all, not even in Linux?
Under FreeBSD, what is the difference in the output of # pciconf -lv before and after you turn off the card?
 
There's no problem, sorry if it was unclear but I wrote it late at night. I just wanted to inform those that have an Optimus Nvidia laptop that it looks like it's possible to turn it off using the sysutils/acpi_call port, but I succeeded only on my first attempt. Later attempts have always failed for some reason with the Unknown object type '0' error. Anyway I did do a pciconf -lv to see if there were any changes before and after issuing the command but the output stayed unchanged. I'm sure it had been turned off on my first attempt only because of the battery life sudden increase and the fact that when I rebooted (which is different than turning the PC on and off from a BIOS perspective) into Linux lspci was not listing the card any more and this in my experience only happens when the laptop is rebooted with the Nvidia card off. I think it would be useful to investigate this since most laptops these days come with an Optimus Nvidia card and having it always on under FreeBSD means a drastically shortened battery life and much higher temperatures.
 
For posteriority and as this post frequently shows up on Google results for 'acpi_call freebsd nvidia optimus' or the likes, I ported
https://github.com/mkottman/acpi_call/blob/master/examples/turn_off_gpu.sh

to FreeBSD and put it to http://xmj.me/freebsd/turn_off_gpu.sh.

You'll need the acpi_call kernel module from sysutils/acpi_call.
Once the script is run it probes all known ACPI oids for NVIDIA Optimus / AMD+ATI GPU chipsets, and disables them.

This resulted on my machine in a power decrease from about 18W down to 11W, along with the resulting battery life expectency increase.
 
Asus EEEPC 1015pn. On Linux I can disable ION just with this command:
Code:
echo "\_SB.PCI0.P0P4.DGPU.DOFF" > /proc/acpi/call
In FreeBSD this:
Code:
Trying "\_SB.PCI0.P0P4.DGPU.DOFF"
Call succedded
and nothing happens.
 
Ah. This uses a "standard" Intel CPU/GPU and added a separate NVidia ION2 chip to that. The original ION was an NVidia GPU and Intel CPU integrated on the same chip, it had no Intel GPU (so there's nothing to switch off).

Looking through the ArchWiki page I see you need to do 2 or 3 steps in order to switch it off. None of them seem to be included with the script that's posted here.
 
Or you can try and follow the ArchWiki calls and translate that to your own script.
 
Back
Top