tang@ubuntu:~$ sudo su
[sudo] password for tang:
可以先查看显卡的状态
root@ubuntu:/home/tang# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.01:DIS: :Pwr:0000:01:00.0
root@ubuntu:/home/tang# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
root@ubuntu:/home/tang# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0
这样就可以了