this is great. how do I compile it? do I need a 2.6.34+ kernel? I get this error by doing: sudo make default make -C /lib/modules/2.6.32-22-generic/build M=/home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8 modules make[1]: Entering directory `/usr/src/linux-headers-2.6.32-22-generic' CC [M] /home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8/acpi_call.o /home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8/acpi_call.c: In function ‘acpi_proc_write’: /home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8/acpi_call.c:58: error: implicit declaration of function ‘copy_from_user’ make[2]: *** [/home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8/acpi_call.o] Error 1 make[1]: *** [_module_/home/avilella/hybrid_graphics/acpi_call/mkottman-acpi_call-dc3faa8] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-22-generic' make: *** [default] Error 2
On Sun, Jun 27, 2010 at 11:54 PM, Michal Kottman <[email protected]> wrote: > Hi list, > > I have an ASUS K52J laptop. It has i3 350m CPU with integrated Intel HD > Graphics and a discrete NVIDIA 310m GPU. > > $ sudo dmidecode -s system-product-name > K52Jc > $ sudo dmidecode -s system-version > 1.0 > $ lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA > 00:02.0 VGA compatible controller [0300]: Intel Corporation Core > Processor Integrated Graphics Controller [8086:0046] (rev 12) > 01:00.0 VGA compatible controller [0300]: nVidia Corporation Device > [10de:0a70] (rev a2) > > Although I cannot use the NVIDIA in Ubuntu 10.10 right now, at least I > wanted to turn it off, so it drains less battery. > > I've created a simple module ( http://github.com/mkottman/acpi_call ) > that allows to call ACPI methods by writing to /proc/acpi/call, mainly > to test out the methods listed on > http://linux-hybrid-graphics.blogspot.com/ > > I can confirm that \_SB.PCI0.PEG1.GFX0.DOFF and \_SB.PCI0.PEG1.GFX0.DON > turn the NVIDIA card off and on respectively. A test run showing > acpi_call in action is attached as acpi_call_test.txt > > However, when I try to do the same thing using vga_switcheroo, using: > > echo 'OFF' > /sys/kernel/debug/vgaswitcheroo/switch > > I get a kernel stack trace somewhere in nouveau_switcheroo_set_state > (see attached vga_switcheroo_off_stacktrace.txt). > > _______________________________________________ > Mailing list: https://launchpad.net/~hybrid-graphics-linux > Post to : [email protected] > Unsubscribe : https://launchpad.net/~hybrid-graphics-linux > More help : https://help.launchpad.net/ListHelp > > _______________________________________________ Mailing list: https://launchpad.net/~hybrid-graphics-linux Post to : [email protected] Unsubscribe : https://launchpad.net/~hybrid-graphics-linux More help : https://help.launchpad.net/ListHelp

