关于nvidia-prime 不能切回nvidia的问题

手贱,把好好的nvidia切换到了intel,结果就切换不回去了,一切换就报错。reinstall似乎也没用。后来这样解决了:

1、删除,一定要删干净,连配置文件一起删。
sudo apt-get purge nvidia*sudo apt-get autoremove

2、安装

sudo add-apt-repository ppa:xorg-edgers/ppasudo apt-get updatesudo apt-get install xserver-xorg-video-intel nvidia-331 ppa-purge

3、升级,解决bug

sudo add-apt-repository ppa:darkxst/gdm-primesudo apt-get updatesudo apt-get upgrade

4、修改xorg.conf ,如果没有就新建一个 /etc/X11

Section “ServerLayout” Identifier “layout” Screen 0 “nvidia” Inactive "intel"EndSectionSection “Device” Identifier “intel” Driver “modesetting” BusID "PCI:0@0:2:0"EndSectionSection “Screen” Identifier “intel” Device "intel"EndSectionSection “Device” Identifier “nvidia” Driver “nvidia” BusID “PCI:1@0:0:0” Option “ConstrainCursor” "off"EndSectionSection “Screen” Identifier “nvidia” Device “nvidia” Option “AllowEmptyInitialConfiguration” "on"EndSectionSection “Monitor” Identifier “VGA-0” Option “Ignore” "True"EndSection

然后reboot。
成功!

本文参考了http://forum.ubuntu-fr.org/viewtopic.php?pid=16696581#p16696581
[b]Asus N56VZ Ubuntu gnome 14.04 : nvidia-prime+gdm+bbswitch
希望对大家有用!

[/b]