Linux Graphics Card Switching for the Asus EeePC-1015PN
Our Netbooks (EeePc 1015PN) are a corner case of hybrid graphics because they have a rather unusual hybird setup. The nvidia chip is directly wired to the display device and hdmi port (most muxless hybrid setups are build without this feature) allowing this model to switch the GPU modes manually or use a dual gpu mode (there is no bios change required - or available - to set the gpu mode. Everything is done in 'user space' via sending a acpi_call ).
This Laptop defaults to nvidia - only mode in Linux (the intel GPU is not visible via lspci) but via sending a specific acpi-call you can set the VGA Mode for the next boot cycle manually.
Available VGA Modes are:
We have prepared some gui scripts to manage the GPU states for the 1015pn as painless as possible.
After the install completed reboot to initialize the acpi-state.
Abstract:download and install acpi-call-tools (dkms) [ all ]
download and install bbswitch-dkms [ all ]
download and install nvidia binary driver via repo: apt-get install nvidia-glx nvidia-settings
install other dependencies via repo: apt-get install mesa-utils openbox libnotify-bin gksu
download and install eee1015pn-acpitools: [ all ]
remove ubuntu upstart files: rm -rf /etc/init
add init.d startup links: update-rc.d fixvga.debian defaults
... but you are invited to extend support for your distro. Look at the ubuntu / debian examples in the scripts to handle the glx libs, kernel modules and xorg configs. Also upstart or sysinit scripts are needed to trigger the automatic configuration at the right time of the boot process. Make sure the display manager starts after the script finished running.
Default Options can be set in the /etc/eee1015pn/ds.conf configuration file. You do not need to edit this file manually. All settings (except the overrides) can be altered via the VGA-Selector GUI. Lines beginning with ## are comments.
### Configuration file for the EeePC-1015PN GPU Tool
### You can edit this file manually or use the provided gui
## set the default GPU mode
## Options: intel|nvidia|optimus
## print debug info
## Options: 0(off)|1(on)
## enable logging to file
## Options: 0(off)|1(on)
## Optimus mode - Auto power down the nvidia chip during boot
## Options: 0(off)|1(on)
## uncomment next Line to override the automatic Desktop Session detection
## Options: gnome|kde|mate|cinnamon|xfce|LXDE
## uncomment next Line to override the automatic Operating System detection
## Options: ubuntu|debian|fedora|arch
## uncomment next Line to override the automatic architecture detection
## Options: i386|x86_64
Open the VGA Selector and double click on the icon of the active GPU. In intel and optimus mode the default randr manager of your Desktop Environment will open (in nvidia mode the nvidia-settings gui is launched) and assist you in setting up the new screens. The VGA Port works in intel & Optimus mode, the HDMI Port in nvidia & Optimus mode
The default settings for the x Server depend on the VGA Mode. /etc/X11/xorg.conf is linked automatically during boot and all changes to this file will be lost.
To change the Default setup edit
Mode # active GPU Xorg Configuration file to edit
Mode 1 Intel GMA 3150 /etc/X11/xorg.conf.asus1015pn.intel
Mode 2 Nvidia GT-218 /etc/X11/xorg.conf.asus1015pn.nvidia
Mode 3 Optimus (Dual GPU) /etc/X11/xorg.conf.asus1015pn.intel
Mode 4 HDMI out in Optimus /etc/X11/xorg.conf.asus1015pn.optimushdmi
Optimus Mode uses the intel GPU & config as default. Same as in bumblebee you can start a new X-Server that draws to the Nvidia GPU (see 'Advanced - Optimus : Start Xserver (nvidia) on HDMI' ) and run another independent X-Server on a external HDMI Display.
So what makes this approach different from bumblebee?
Bumblebee draws the window also on the nvidia gpu but puts its output via virtualgl "embedded" into the main
Xservers Screen. This brings some drawbacks to us like a unusable HDMI port and no vdpau acceleration. Sarting a new Xserver on the Nvidia GPU does not show this negative side effects.
The current configuration allows you to hook up a Display device to HDMI and either play a media file on the device via vdpau or start a simple openbox desktop (in the screenshot i use Ambience OB openbox theme, tint2 panel and conky). Your main X-Server on the laptop display will run in the background.
To switch between the two X-Servers use STRG+ALT+F8 (Intel X-Server drawing to the Laptop Screen) or STRG+ALT+F9 (Nvidia X-Server drawing to the external HDMI Device).
To edit the default xorg configuration for this second X-Server adjust
Configure System for second X-Server:
- install openbox & tint2 panel & gmrun (a Program Launcher):
sudo apt-get install openbox tint2 gmrun- check that your Xserver is set to allow "anybody" in the "/etc/X11/Xwrapper.config" file:
sudo less /etc/X11/Xwrapper.config | grep allowed
if the terminal output reads "allowed_users=anybody" you're ready to proceed. If not fix it.- add magic cookie to xauth
and you should get an output like:
<your hostname>/unix:0 MIT-MAGIC-COOKIE-1 9fde426e5g03b20f4b7e51cb329d3033
Your long alphanumeric string WILL be different, thats ok. You need to add a new line and then exit to save it. Type in (of course replace <your-alpha-numeric-string>) :
add :1.0 MIT-MAGIC-COOKIE-1 <your-alpha-numeric-string>- add user to audio group & run 'ck-launch-session' in the new X-Screen
and exit the xauth shell
Run the gui script via 'System Tools - VGA Selector'
...shows the current GPU Mode. Double click on the icon to open the native xrandr manager of your Desktop Enviroment. (Supported DE's are unity, unity-2d, gnome-shell,
gnome-fallback, xfce, lxde and kde)
To switch between the power saving intel GMA3150 mode and the nvidia mode click on the "reboot with..." button. Now choose the GPU Mode you want to use and press ok.
Each line in the table represents a settings option and it's current status (green=on / red=off / yellow=not supported on your Desktop Environment) . To change a setting double click on the corresponding line.
The available Settings are:
Start a new X-Server that draws to the Nvidia GPU (see 'Optimus Mode: Second X-Server settings' above) and outputs to a external HDMI Display Device. (vdpau & 3d fully works!)
To set your primary GPU Mode go to the Settings Window and click on the "set default..." button.
sudo display-settings regenerate-glx && sudo display-settings fix
So replace mdm with lightdm. Instructions are here
To regenerate the GLX libraries after a system upgrade (or mesa/nvidia update) run
sudo display-settings regenerate-glx
Video out via HDMI works in nvidia or Optimus mode only. To configure it in nvidia mode use the nvidia-settings program. For Optimus mode see "Optimus Mode - Second Xserver settings" above.
Use the Volume control panel icon to open the pulse sound settings and choose the Nvidia Device in the Output tab. If you still get no audio via hdmi check via 'alsamixer' that the hdmi output is unmuted.
the bumblebee project [url]https://launchpad.net/~bumblebee[/url] is working on a way to use the nvidia gpu on demmand. Our eeepc needs to be in Optimus mode to work with bumblebee. bumblebee and this helper script can be installed next to each other but be aware that this is in a very early development state and might break anytime.
See post http://ubuntuforums.org/showpost.php?p=11657158&postcount=274 for a short bumblebee install howto.
ubuntu & it's direct spins are fully supported (Lubuntu, Xubuntu, Kbuntu, Mint). Debian testing (Mint Debian Edition) is mostly done but gdm start might fail (see debian below)
Debian support is mostly done. Manually install the acpi_call dkms package, yad and the lastest eee1015pn-acpitools deb from the ppa. The package does not add any init.d scripts automatically because I'm having problems with them. Since debian does not use upstart, how can i make sure that my scripts finishes before gdm tries to start ?
If you want to test the init scripts add it via update-rc.d
update-rc.d fixvga.debian defaults
With the traditional init.d scripts i managed to get it working most of the time but sometimes gdm starts too fast and the script is not done preparing the configuration for the xserver so you will be dropped to a terminal login shell. Just login and run as root:
display-settings fix && /etc/init.d/gdm restart
usage: sudo display-settings <option> - where <option> is one of the following
Optional: (usually not needed; just for me to remember... ) configure bzr to sign in to launchpad:
Optional: login to launchpad with your Launchpad username. If no error is shown all is good ;)
Please use the included "Report a Bug" Wizard. It automatically collects some needed debug information that i'm tired asking about. A list of outstanding bugs is here. If your bug disappears from this list it means that the issue is fixed in current trunk.
To get help post your problem in this ubuntuforums.org thread (english lang only!). Crowdsourcing is much better than waiting for me to answer ;)