1、在ubuntu桌面上右键“打开终端”。
2、输入以下命令,应该显示的是自己的集显。$DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
3、然后输入以下命令,是不是显示自己的独显。$DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
4、防止独显打开某些应用游戏可能会出现黑屏,我们可以打开xorg.conf.failsafe(如果没有黑屏问题就不需要修改了)。$sudo gedit /etc/X11/xorg.conf.failsafe
5、在里面添加一个Device然后保存。Section "Device" Identifier "Intel Graphics" Driver "intel" Option "DRI" "3"EndSection
6、现在我们想要用独显运行游戏或者应用,可以直接在终端“DRI_PRIME=1 命令”,也可以直接写到某些游戏应用的desktop中使用。$DRI_PRIME=1 sh stuntrally