【发布时间】:2026-01-14 21:00:02
【问题描述】:
我想使用两个 xserver,每个都在单独的显卡上运行,实际上我正在使用两个显示器,在我的计算机上安装了两个不同的显卡,像这样:
root@ziomario-Z87-HD3:/home/ziomario# lspci -nn | grep VGA
00:02.0 VGA 兼容控制器 [0300]:英特尔公司至强 E3-1200 v3/4th Gen Core Processor 集成图形控制器 [8086:0412](修订版 06)
01:00.0 VGA 兼容控制器 [0300]:NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1)
root@ziomario-Z87-HD3:/home/ziomario# lspci -nn | grep NVIDIA
01:00.0 VGA 兼容控制器 [0300]:NVIDIA Corporation GK106 [GeForce GTX 660] [10de:11c0] (rev a1)
01:00.1 音频设备 [0403]:NVIDIA Corporation GK106 HDMI 音频 控制器 [10de:0e0b] (rev a1)
我正在阅读这个article。
而且我已经更改了一些命令,因为他说要做的事情与我的情况之间存在差异。这就是我所做的:
使用此命令以 root 用户身份安装 NVidia 驱动程序:
./NVIDIA-Linux-x86_64-340.32.run –accept-license –no-backup –no-x-check –no-questions –ui=none –no-x-check –no-distro-scripts –utility-prefix=/nvidia –installer-prefix=/nvidia –opengl-prefix=/nvidia –opengl-libdir=glx
在 /nvidia/glx 目录中为 NVidia 创建了一个 libglx.so 链接:
ln -s /usr/lib/xorg/modules/extensions/libglx.so.295.59 libglx.so
以 root 身份创建文件夹 /etc/ld.conf.d(它以前不存在),其中包含文件:/etc/ld.conf.d/nvidia,其中两行指向新的库目录:
/nvidia/lib /nvidia/glx
以 root 身份运行此命令以激活上述路径。
ldconfig
使用命令创建文件 /etc/X11/xorg.conf
nvidia-xconfig
使用 ModulePath 选项将 nvidia xserver 定向到正确的 Glx。将此添加到现有文件部分的 /etc/X11/xorg.conf 中,如下所示:
这是我的 xorg.conf 文件:
“服务器布局”部分
Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection“服务器布局”部分
Identifier "Layout1" Screen 0 "Screen1" 0 0 Option "Xinerama" "0" EndSection“文件”部分
modulepath "/nvidia/glx,/nvidia/lib,/usr/lib/xorg/modules"结束部分
“输入设备”部分
# generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection“输入设备”部分
# generated from default Identifier "Keyboard0" Driver "kbd" EndSection“监控”部分
Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" HorizSync 28.0 - 33.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection“监控”部分
Identifier "Monitor1" VendorName "Unknown" Option "DPMS" EndSection“设备”部分
Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" EndSection“设备”部分
Identifier "Device1" Driver "intel" BusID "PCI:0:2:0" Option "AccelMethod" "uxa" EndSection“屏幕”部分
Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection“屏幕”部分
Identifier "Screen1" Device "Device1" Monitor "Monitor1" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection
在文件中配置用户 LD_LIBRARY_PATH 环境(这可以在 /etc/profile 和 /etc/bash.bashrc 配置文件中通用设置): ~/.profile ~/.bashrc 和 ~/.xsession 文件通过添加以下几行:
如果 [
echo $DISPLAY |grep -c ":1"-eq 1];然后 导出 LD_LIBRARY_PATH=/nvidia/glxfi
使用 Glx 重新安装了 xorg 包,以便更正以前安装 NVidia 造成的损坏:
apt-get --reinstall install glx-alternative-mesa xserver-xorg-core libgl1-mesa-glx libgl1-mesa-dri
重启Gdm3
/etc/init.d/gdm3 restart
它没有工作。与 NVIDIA 显卡相连的显示器工作正常,但另一个显示器,连接在哪里 INTEL 显卡关闭...有什么建议吗?
【问题讨论】:
标签: linux debian intel nvidia multiset