The Asus Switcheroo module can be obtained at:
Script-based solution ( by firstname.lastname@example.org )
The script-based system includes several files, and allows automatic switching between intel and nvidia, at least on pre-optimus UL30VT.
Here is how it works:
- User writes either "intel" or "nvidia" to /home/user/switcheroo.txt.
- Script detects this and waits for the user to log out (detected as user's gnome-session not running)
- Turns off gdm3 (debian) or gdm (ubuntu).
- Uses the awilliam module (asus-switcheroo) to switch to the desired card.
- Uses acpi_call to turn off nvidia if required
- Links appropriate version of libglx.so and libGL.so, and xorg.conf so that X and openGL apps can find them
- Starts gdm again.
- my xorg.conf files for both cards.
- display-settings, the script that does one-shot card switching depending on switcheroo.txt, and runs at boot so that the last selected card will be used
- graphics-switch.sh, the script that monitors switcheroo.txt and calls display-settings when no user session is running
- graphics-switch-daemon, the script that starts graphics-switch.sh on the background at boot
- an example switcheroo.txt.
Hopefully comprehensive installation procedure:
In cloned acpi_call git compile acpi_call, and then
sudo cp acpi_call.ko into /lib/modules/$( uname -r )/kernel/drivers/acpi/ sudo depmod -a
- In cloned asus-switcheroo git, do sudo make install-ubuntu
- Make sure that both /etc/modules and /etc/initramfs-tools/modules have the lines: asus_switcheroo dummy_client=1 i915_jprobe
- IMPORTANT: If your PCI ID's are different, please modify. See lspci for the numbers.
- sudo cp xorg.conf.intel xorg.conf.nvidia /etc/X11/
To get nice notifications for scheduled switches:
sudo apt-get install notify-osd
Finally, my scripts:
- Make sure that U=your-user-name in the scripts
- Make sure that SESSION=your-session in the scripts (for example gnome-session or startx or ... )
sudo cp graphics-switch.sh graphics-switch-daemon display-settings /etc/init.d/. sudo update-rc.d display-settings defaults sudo update-rc.d graphics-switch-daemon defaults
These should run on Ubuntu and Debian, tested on Linux Mint Debian. Change the user (U=user) to your user.