1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

acpi_call Nvidia Optimus

Discussion in 'System Hardware' started by clod89, Aug 29, 2012.

  1. clod89

    clod89 New Member

    Messages:
    13
    Thanks Received:
    4
    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
     
  2. tingo

    tingo Active Member

    Messages:
    1,013
    Thanks Received:
    100
    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?
     
  3. clod89

    clod89 New Member

    Messages:
    13
    Thanks Received:
    4
    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.
     
  4. xmj@

    xmj@ New Member Developer

    Messages:
    35
    Thanks Received:
    8
    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.
     
    wblock@ and Andrew Hacking thanked for this.
  5. Andrew Hacking

    Andrew Hacking New Member

    Messages:
    5
    Thanks Received:
    1
    The above script successfully turns off the NVIDIA Optimus card in my ASUS R501VZ / N56V* laptop saving some 8258mW.

    I refactored into a /usr/local drop-in with rc.d script at: https://github.com/ahacking/freebsd-gpu-off.
     
    wblock@ thanks for this.