2 篇文章带有标签 “x11”

Ubuntu 上将 NVIDIA GPU 切换为 Intel 集成显卡 IGD

IGD(Integrated Graphics Device)

操作系统:Ubuntu 18.04,主机有一张 NVIDIA 的独立显卡 GP106 [GeForce GTX 1060 6GB],还有 Intel 酷睿处理器 i5 8500 自带的集成显卡(Intel UHD Graphics 630)。为了更充分的使用独立显卡用于深度学习计算,需要把集成显卡用于显示。在这个过程中遇到了各种各样的问题:

  • 鼠标和键盘失灵。
  • 登录 X Window 时,输入正确的密码不能登录。

BIOS 设置

显卡设置

  • IGD 内置图形显示集成显卡
  • PEG 独立PCI Express接口图形显卡

选择 IGD,保存退出。

配置 X Window 显示显卡设备信息 lspci lspci -k | grep -EA3 'VGA|3D|Display' | | | | | - Only VGA is not good enough, | | | | | because Nvidia mobile adapters | | | | | are shown as 3D and some AMD | | | | | adapters are shown as Display. | | | | --------- Print 3 lines after the regexp match.

SSH X11 Forwarding

macOS

XQuartz

  • 安装
brew cask install xquartz
  • 验证
xclock
xeyes

不使用XAuth

$ ssh -Y username@hostname
(base) username@hostname:~$ gedit

使用XAuth

  • 查找XAuth的位置
$ which xauth
/opt/X11/bin/xauth
  • 配置XAuth
$ vim ~/.ssh/config
Host *
    XAuthLocation /opt/X11/bin/xauth
  • SSH登录,可以尝试使用 ssh -X -vv 查看更多的失败信息。
$ ssh -X username@hostname
(base) username@hostname:~$ gedit

参考资料 How To Set Up And Use X11 Forwarding On Linux And Mac What does “Warning: untrusted X11 forwarding setup failed: xauth key data not generated” mean when ssh'ing with -X?