lxc nvidia error: xf86EnableIOPorts: не удалось установить IOPL для ввода-вывода (операция не разрешена)

В процессе попытки использовать контейнер lxc (хост 16.04, lxc 14.04) nvidia я сталкиваюсь с этой ошибкой при запуске X в контейнере:

startx - vt8

Я получаю следующую ошибку:

xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)

также я получаю следующее предупреждение в /var/log/Xorg.0.log:

(WW) NVIDIA(0): Unable to get display device for DPI computation.

Любая помощь будет оценена. До сих пор я не смог использовать графику lxc и nvidia с хостом 16.04. с контейнером 14.04 я не могу заставить графику начинать с контейнера 16.04 я не могу заставить работать клавиатуру / мышь.

1 ответ

У меня была такая же проблема, так что вот решение. Причина, по которой клавиатура / мышь не работают внутри контейнера Ubuntu 16.04 LXC, заключается в том, что xserver-xorg-input-kbd пакет был отброшен, так что если вы использовали что-то вроде

...
Driver "kbd"
...
Driver "mouse"
...

в конфигурации вашего контейнера xorg - он не будет работать на Ubuntu 16.04.

Вместо этого вы должны настроить входы xorg с помощью evdev. Поскольку точное количество event* записи в файле конфигурации (например, /usr/share/X11/xorg.conf.d/10-lxc-input.conf) будет зависеть от того, что находится в вашем контейнере /dev/input/Вы можете использовать скрипт для его генерации:

#!/bin/bash
cat >/usr/share/X11/xorg.conf.d/10-lxc-input.conf << _EOF_
Section "ServerFlags"
     Option "AutoAddDevices" "False"
EndSection
_EOF_

cd /dev/input
for input in event*
do
cat >> /usr/share/X11/xorg.conf.d/10-lxc-input.conf <<_EOF_
Section "InputDevice"
    Identifier "$input"
    Option "Device" "/dev/input/$input"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
_EOF_
done

Что приводит к чему-то вроде: cat /usr/share/X11/xorg.conf.d/10-lxc-input.conf

Section "ServerFlags"
     Option "AutoAddDevices" "False"
EndSection
Section "InputDevice"
    Identifier "event0"
    Option "Device" "/dev/input/event0"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event1"
    Option "Device" "/dev/input/event1"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event10"
    Option "Device" "/dev/input/event10"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event11"
    Option "Device" "/dev/input/event11"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event12"
    Option "Device" "/dev/input/event12"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event13"
    Option "Device" "/dev/input/event13"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event14"
    Option "Device" "/dev/input/event14"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event2"
    Option "Device" "/dev/input/event2"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event3"
    Option "Device" "/dev/input/event3"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event4"
    Option "Device" "/dev/input/event4"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event5"
    Option "Device" "/dev/input/event5"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event6"
    Option "Device" "/dev/input/event6"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event7"
    Option "Device" "/dev/input/event7"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event8"
    Option "Device" "/dev/input/event8"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Section "InputDevice"
    Identifier "event9"
    Option "Device" "/dev/input/event9"
    Option "AutoServerLayout" "true"
    Driver "evdev"
EndSection
Другие вопросы по тегам