在多座位设置中无法使用 nvidia 专有驱动程序和 nvidia 卡

在多座位设置中无法使用 nvidia 专有驱动程序和 nvidia 卡

我有一个带有板载英特尔显卡和 nVidia 显卡的 Ubuntu 15.10 安装,我正尝试使用 udev/loginctl 在多座环境中进行设置。

虽然我在主英特尔服务器 (seat0) 中获得了输出,但另一个带有 nvidia 的座位 (seat-1) 拒绝启动。相关配置和日志文件已附上。

我尝试过 nouveau 和 nvidia 二进制驱动程序。Nouveau 驱动程序出现段错误,而 nvidia 驱动程序则拒绝被服务器识别。

我正在遵循这里给出的说明: https://wiki.ubuntu.com/MultiseatTeam/Instructions https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia


$ ps -aef | grep X

root       727   718  0 19:34 tty7     00:00:00 /usr/bin/X -core :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch

$ cat /var/log/Xorg.0.log

[    17.672] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    17.672] (II) FBDEV: driver for framebuffer: fbdev
[    17.672] (II) VESA: driver for VESA chipsets: vesa
[    17.672] (II) [drm] nouveau interface version: 1.2.2
[    17.672] (WW) Falling back to old probe method for modesetting
[    17.672] (WW) Falling back to old probe method for fbdev
[    17.672] (II) Loading sub module "fbdevhw"
[    17.672] (II) LoadModule: "fbdevhw"
[    17.673] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    17.673] (II) Module fbdevhw: vendor="X.Org Foundation"
[    17.673]    compiled for 1.17.2, module version = 0.0.2
[    17.673]    ABI class: X.Org Video Driver, version 19.0
[    17.673] (WW) Falling back to old probe method for vesa
[    17.673] (EE) Screen 0 deleted because of no matching config section.
[    17.673] (II) UnloadModule: "modesetting"
[    17.673] (EE) Screen 0 deleted because of no matching config section.
[    17.673] (II) UnloadModule: "modesetting"
[    17.673] (EE) Device(s) detected, but none match those in the config file.
[    17.673] (EE)
Fatal server error:
[    17.673] (EE) no screens found(EE)
[    17.673] (EE)

$ sudo ubuntu-drivers 设备

== /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0 ==
vendor   : NVIDIA Corporation
model    : NV44 [GeForce 7100 GS]
modalias : pci:v000010DEd0000016Asv00001043sd0000821Fbc03sc00i00
driver   : nvidia-304 - distro non-free recommended
driver   : nvidia-304-updates - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[    17.673] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    17.673] (EE)
[    17.673] (EE) Server terminated with error (1). Closing log file.

$ lspci

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 09)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 09)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
03:00.0 VGA compatible controller: NVIDIA Corporation NV44 [GeForce 7100 GS] (rev a1)

$ loginctl 座位状态

n/a
         Devices:
                  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
                  │ input:input1 "Power Button"
                  ├─/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5
                  │ input:input5 "Video Bus"
                  ├─/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
                  │ input:input0 "Power Button"
                  ├─/sys/devices/pci0000:00/0000:00:02.0/drm/card0
                  │ [MASTER] drm:card0
                  │ ├─/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1
                  │ │ [MASTER] drm:card0-LVDS-1
                  │ └─/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-VGA-1
                  │   [MASTER] drm:card0-VGA-1
                  ├─/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
                  │ drm:renderD128
                  ├─/sys/devices/pci0000:00/0000:00:02.0/graphics/fb0
                  │ [MASTER] graphics:fb0 "inteldrmfb"
                  ├─/sys/devices/pci0000:00/0000:00:1a.0/usb3
                  │ usb:usb3
                  │ ├─/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/0003:046D:C313.0001/input/input6
                  │ │ input:input6 "BTC USB Multimedia Keyboard"
                  │ ├─/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.1/0003:046D:C313.0002/input/input8
                  │ │ input:input8 "BTC USB Multimedia Keyboard"
                  │ └─/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/0003:04CA:0061.0004/input/input11
                  │   input:input11 "PixArt USB Optical Mouse"
                  ├─/sys/devices/pci0000:00/0000:00:1a.2/usb5
                  │ usb:usb5
                  ├─/sys/devices/pci0000:00/0000:00:1a.7/usb1
                  │ usb:usb1
                  ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
                  │ sound:card0 "Intel"
                  │ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input12
                  │ │ input:input12 "HDA Intel Rear Mic"
                  │ ├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input13
                  │ │ input:input13 "HDA Intel Line"
                  │ └─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/input14
                  │   input:input14 "HDA Intel Line Out"
                  ├─/sys/devices/pci0000:00/0000:00:1d.0/usb6
                  │ usb:usb6
                  ├─/sys/devices/pci0000:00/0000:00:1d.1/usb7
                  │ usb:usb7
                  ├─/sys/devices/pci0000:00/0000:00:1d.2/usb8
                  │ usb:usb8
                  ├─/sys/devices/pci0000:00/0000:00:1d.7/usb2
                  │ usb:usb2
                  └─/sys/devices/virtual/misc/rfkill
                    misc:rfkill

$ cat /etc/udev/rules.d/99-multiseat.rules

SUBSYSTEM=="drm", KERNEL=="card[0-9]*" TAG+="master-of-seat"

# seat0
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:02.0/*", ENV{ID_SEAT}="seat0", TAG+="seat0"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1a.0/*", ENV{ID_SEAT}="seat0", TAG+="seat0"

# seat-1
#TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1c.1/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"
TAG=="seat", DEVPATH=="/devices/pci0000:00/*03:00.0/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1a.1/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"

答案1

删除 seat0 udev 规则。所有没有规则的设备都附加到 seat0。

对于 seat1 创建下一个 udev 规则:

SUBSYSTEM=="pci", DEVPATH=="/devices/pci0000:00/0000:00:05.0/0000:02:00.0", TAG+="seat", TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1", ENV{ID_SEAT}="seat1"

将 /devices/pci0000... 替换为您的 nvidia 卡

重启或者触发 udev

使用

sudo loginctl attach seat1 /sys/devices/pci0000....

将显卡、键盘和鼠标安装到座位 1

在 /etc/X11/xorg.conf.d 中为 nvidia 卡创建一个文件:

/etc/X11/xorg.conf.d$ cat 20-nvidia.conf 
Section "Device"
    Identifier     "Seat1"
    Driver         "nvidia"
    BusID          "PCI:3:0:0"
    Option         "ProbeAllGpus" "FALSE"
    MatchSeat      "seat1"
EndSection

成功,

弗洛里斯

相关内容