Open Nexarian opened 4 years ago
Here is my /etc/X11/xorg.conf:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 440.64
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "DELL U3419W"
HorizSync 30.0 - 89.0
VertRefresh 48.0 - 85.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro P5000"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "HardDPMS" "false"
Option "Stereo" "0"
Option "nvidiaXineramaInfoOrder" "DFP-3"
Option "metamodes" "2560x1080 +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection
And here is my /etc/X11/xrdp/xorg.conf:
Section "ServerLayout"
Identifier "X11 Server"
Screen "Screen (xrdpdev)"
InputDevice "xrdpMouse" "CorePointer"
InputDevice "xrdpKeyboard" "CoreKeyboard"
EndSection
Section "ServerFlags"
Option "DontVTSwitch" "on"
Option "AutoAddDevices" "off"
EndSection
Section "Module"
Load "dbe"
Load "ddc"
Load "extmod"
Load "glx"
Load "int10"
Load "record"
Load "vbe"
Load "xorgxrdp"
Load "fb"
EndSection
Section "InputDevice"
Identifier "xrdpKeyboard"
Driver "xrdpkeyb"
EndSection
Section "InputDevice"
Identifier "xrdpMouse"
Driver "xrdpmouse"
EndSection
Section "Monitor"
Identifier "Monitor"
Option "DPMS"
HorizSync 30-80
VertRefresh 60-75
ModeLine "1920x1080" 138.500 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
ModeLine "1280x720" 74.25 1280 1720 1760 1980 720 725 730 750 +HSync +VSync
Modeline "1368x768" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync
Modeline "1600x900" 119.00 1600 1696 1864 2128 900 901 904 932 -hsync +vsync
EndSection
Section "Device"
Identifier "Video Card (xrdpdev)"
Driver "xrdpdev"
Option "DRMDevice" "/dev/dri/renderD128"
Option "DRI3" "1"
EndSection
Section "Screen"
Identifier "Screen (xrdpdev)"
Device "Video Card (xrdpdev)"
Monitor "Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "640x480" "800x600" "1024x768" "1280x720" "1280x1024" "1600x900" "1920x1080"
EndSubSection
EndSection
If you see this in the log [ 225.830] (II) NVIDIA dlloader X Driver 440.64 Fri Feb 21 00:49:33 UTC 2020 [ 225.830] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs it means Xorg is loading /usr/lib/xorg/modules/drivers/nvidia_drv.so I have not seen that work yet with xrdpdev Strange, I don't see it in your xrdp/xorg.conf file. Something else must triggering it to load.
That was all the hint I needed to fix it!
When you install the Nvidia Binary drivers it also dropped in /usr/share/X11/xorg.conf.d/20-nvidia.conf, contents were:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 440.64
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "HardDPMS" "false"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
Option "HardDPMS" "false"
EndSection
Removed that file and XRDP immediately started working.
I'm happy to answer more questions about this, otherwise you can resolve.
If we can get /usr/lib/xorg/modules/drivers/nvidia_drv.so working with xorgxrdp I think that's pretty big. It means we can use prime offloading to make use of the NVidia OpenGL. It works already with modesetting / glamor drivers so I'm hopeful.
Then we need to figure out why there are permission issues here, as a start.
These articles look like they have promising information:
It looks like the problem here might be that XRDP isn't using vtX. When I have other virtualized remote desktop systems that do work with Nvidia, they all have commands that look like this to load Xorg:
/usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1001/gdm/Xauthority -background none -noreset -keeptty -verbose 3
but my XRDP command uses:
/usr/lib/xorg/Xorg :11 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
Is there a reason why XRDP doesn't load using the virtual terminal system? (vtX)
/usr/lib/xorg/Xorg vt3 -displayfd 3 -auth /run/user/1001/gdm/Xauthority -background none -noreset -keeptty -verbose 1
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(--) Log file renamed from "/home/[username]/.local/share/xorg/Xorg.pid-21310.log" to "/home/[username]/.local/share/xorg/Xorg.2.log"
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-143-generic x86_64 Ubuntu
Current Operating System: Linux [hostname] 4.15.0-97-generic #98-Ubuntu SMP Tue Apr 7 10:21:29 UTC 2020 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-97-generic root=UUID=fb7276dc-f68e-40f3-b88d-09a52f3a52b5 ro quiet splash vt.handoff=1
Build Date: 03 April 2019 09:03:57AM
xorg-server 2:1.20.4-1ubuntu3 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/[username]/.local/share/xorg/Xorg.2.log", Time: Fri Apr 17 16:31:41 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) | |-->Monitor "Monitor0"
(**) | |-->Device "Device0"
(**) |-->Input Device "Keyboard0"
(**) |-->Input Device "Mouse0"
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
Entry deleted from font path.
(==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
(==) ModulePath set to "/usr/lib/xorg/modules"
(WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Keyboard0
(WW) Disabling Mouse0
(++) using VT number 3
(II) systemd-logind: took control of session /org/freedesktop/login1/session/_358
(II) xfree86: Adding drm device (/dev/dri/card0)
(EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
(--) PCI:*(101@0:0:0) 10de:1bb0:1028:11b2 rev 161, Mem @ 0xd7000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000b000/128, BIOS @ 0x????????/131072
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
compiled for 1.20.4, module version = 1.0.0
(II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
compiled for 1.6.99.901, module version = 1.0.0
(II) NVIDIA dlloader X Driver 440.64 Fri Feb 21 00:49:33 UTC 2020
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/[username]/.local/share/xorg/Xorg.2.log" for additional information.
(EE)
(WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
(WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
(WW) xf86CloseConsole: VT_ACTIVATE failed: Operation not permitted
(EE) Server terminated with error (1). Closing log file.
sudo /usr/lib/xorg/Xorg vt3 -displayfd 3 -auth /run/user/1001/gdm/Xauthority -background none -noreset -keeptty -verbose 1
[sudo] password for [username]:
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(--) Log file renamed from "/var/log/Xorg.pid-25893.log" to "/var/log/Xorg.2.log"
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-143-generic x86_64 Ubuntu
Current Operating System: Linux [hostname] 4.15.0-97-generic #98-Ubuntu SMP Tue Apr 7 10:21:29 UTC 2020 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-97-generic root=UUID=fb7276dc-f68e-40f3-b88d-09a52f3a52b5 ro quiet splash vt.handoff=1
Build Date: 03 April 2019 09:03:57AM
xorg-server 2:1.20.4-1ubuntu3 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.2.log", Time: Fri Apr 17 16:58:31 2020
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) | |-->Monitor "Monitor0"
(**) | |-->Device "Device0"
(**) |-->Input Device "Keyboard0"
(**) |-->Input Device "Mouse0"
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Automatically adding GPU devices
(==) Automatically binding GPU devices
(==) Max clients allowed: 256, resource mask: 0x1fffff
(WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
Entry deleted from font path.
(==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
(==) ModulePath set to "/usr/lib/xorg/modules"
(WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Keyboard0
(WW) Disabling Mouse0
(++) using VT number 3
(II) systemd-logind: took control of session /org/freedesktop/login1/session/_358
(II) xfree86: Adding drm device (/dev/dri/card0)
(EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
(--) PCI:*(101@0:0:0) 10de:1bb0:1028:11b2 rev 161, Mem @ 0xd7000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000b000/128, BIOS @ 0x????????/131072
(II) Loading /usr/lib/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
compiled for 1.20.4, module version = 1.0.0
(II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
compiled for 1.6.99.901, module version = 1.0.0
(II) NVIDIA dlloader X Driver 440.64 Fri Feb 21 00:49:33 UTC 2020
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Loading /usr/lib/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
compiled for 1.20.4, module version = 1.0.0
(II) Loading /usr/lib/xorg/modules/libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
compiled for 1.20.4, module version = 1.0.0
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Stereo disabled by request
(**) NVIDIA(0): NVIDIA SLI disabled.
(**) NVIDIA(0): NVIDIA Multi-GPU disabled.
(**) NVIDIA(0): Enabling 2D acceleration
(II) Loading /usr/lib/xorg/modules/extensions/libglxserver_nvidia.so
(II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
compiled for 1.6.99.901, module version = 1.0.0
(II) NVIDIA GLX Module 440.64 Fri Feb 21 00:46:14 UTC 2020
(II) NVIDIA: The X server does not support PRIME Render Offload.
(--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:101:0:0
(--) NVIDIA(0): DFP-0
(--) NVIDIA(0): DFP-1
(--) NVIDIA(0): DFP-2
(--) NVIDIA(0): DFP-3 (boot)
(--) NVIDIA(0): DFP-4
(--) NVIDIA(0): DFP-5
(--) NVIDIA(0): DFP-6
(--) NVIDIA(0): DFP-7
(--) NVIDIA(0): DFP-8
(II) NVIDIA(0): NVIDIA GPU Quadro P5000 (GP104GL-A) at PCI:101:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 16777216 kBytes
(--) NVIDIA(0): VideoBIOS: 86.04.69.00.3f
(II) NVIDIA(0): Detected PCI Express Link width: 16X
(--) NVIDIA(GPU-0): DFP-0: disconnected
(--) NVIDIA(GPU-0): DFP-0: Internal TMDS
(--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-1: disconnected
(--) NVIDIA(GPU-0): DFP-1: Internal DisplayPort
(--) NVIDIA(GPU-0): DFP-1: 1440.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-2: disconnected
(--) NVIDIA(GPU-0): DFP-2: Internal TMDS
(--) NVIDIA(GPU-0): DFP-2: 165.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DELL U3419W (DFP-3): connected
(--) NVIDIA(GPU-0): DELL U3419W (DFP-3): Internal DisplayPort
(--) NVIDIA(GPU-0): DELL U3419W (DFP-3): 1440.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-4: disconnected
(--) NVIDIA(GPU-0): DFP-4: Internal TMDS
(--) NVIDIA(GPU-0): DFP-4: 165.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-5: disconnected
(--) NVIDIA(GPU-0): DFP-5: Internal DisplayPort
(--) NVIDIA(GPU-0): DFP-5: 1440.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-6: disconnected
(--) NVIDIA(GPU-0): DFP-6: Internal TMDS
(--) NVIDIA(GPU-0): DFP-6: 165.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-7: disconnected
(--) NVIDIA(GPU-0): DFP-7: Internal DisplayPort
(--) NVIDIA(GPU-0): DFP-7: 1440.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(--) NVIDIA(GPU-0): DFP-8: disconnected
(--) NVIDIA(GPU-0): DFP-8: Internal TMDS
(--) NVIDIA(GPU-0): DFP-8: 165.0 MHz maximum pixel clock
(--) NVIDIA(GPU-0):
(II) NVIDIA(0): Validated MetaModes:
(II) NVIDIA(0): "2560x1080+0+0"
(II) NVIDIA(0): Virtual screen size determined to be 2560 x 1080
(--) NVIDIA(0): DPI set to (81, 83); computed from "UseEdidDpi" X config
(--) NVIDIA(0): option
(II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
(II) NVIDIA: access.
(II) NVIDIA(0): Setting mode "2560x1080+0+0"
(==) NVIDIA(0): Disabling shared memory pixmaps
(==) NVIDIA(0): Backing store enabled
(==) NVIDIA(0): Silken mouse enabled
(**) NVIDIA(0): DPMS enabled
(II) NVIDIA(0): [DRI2] Setup complete
(II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
(II) SELinux: Disabled on system
(II) Initializing extension GLX
(II) Indirect GLX disabled.
(II) GLX: Another vendor is already registered for screen 0
(II) config/udev: Adding input device Power Button (/dev/input/event2)
(**) Power Button: Applying InputClass "evdev keyboard catchall"
(**) Power Button: Applying InputClass "libinput keyboard catchall"
(II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
(II) Module libinput: vendor="X.Org Foundation"
compiled for 1.20.4, module version = 0.28.2
(II) Using input driver 'libinput' for 'Power Button'
(EE) systemd-logind: failed to take device /dev/input/event2: Operation not permitted
(**) Power Button: always reports core events
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
(II) config/udev: Adding input device Power Button (/dev/input/event1)
(**) Power Button: Applying InputClass "evdev keyboard catchall"
(**) Power Button: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'Power Button'
(EE) systemd-logind: failed to take device /dev/input/event1: Operation not permitted
(**) Power Button: always reports core events
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 7)
(II) config/udev: Adding input device Sleep Button (/dev/input/event0)
(**) Sleep Button: Applying InputClass "evdev keyboard catchall"
(**) Sleep Button: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'Sleep Button'
(EE) systemd-logind: failed to take device /dev/input/event0: Operation not permitted
(**) Sleep Button: always reports core events
(II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD, id 8)
(II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event5)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event6)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA Intel PCH Line Out (/dev/input/event7)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event8)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event10)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event11)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event12)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event9)
(II) No input driver specified, ignoring this device.
(II) This device may have been added with another device file.
(II) config/udev: Adding input device Dell WMI hotkeys (/dev/input/event4)
(**) Dell WMI hotkeys: Applying InputClass "evdev keyboard catchall"
(**) Dell WMI hotkeys: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'Dell WMI hotkeys'
(EE) systemd-logind: failed to take device /dev/input/event4: Operation not permitted
(**) Dell WMI hotkeys: always reports core events
(II) XINPUT: Adding extended input device "Dell WMI hotkeys" (type: KEYBOARD, id 9)
(II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)
(**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
(**) AT Translated Set 2 keyboard: Applying InputClass "libinput keyboard catchall"
(II) Using input driver 'libinput' for 'AT Translated Set 2 keyboard'
(EE) systemd-logind: failed to take device /dev/input/event3: Operation not permitted
(**) AT Translated Set 2 keyboard: always reports core events
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id 10)
(EE)
Fatal server error:
(EE) Cannot write display number to fd 3
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/var/log/Xorg.2.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
@metalefty any update for newer xorg version support
Hi @Nexarian
I've been looking at a similar issue in #2010 where a load of the modesetting
driver causes the X server to try to open the console. The solution I adopted in that instance was to prevent modesetting
driver loading.
I know you've been looking into this area with Jay. Is there anything at this point you'd like to add to the above, or is the best solution currently to stop the hardware driver (modesetting/nvidia/whatever) from loading?
Thanks for any info.
Hi @matt335672!
Thanks for reaching out. I feel like I'm often learning about how these systems work in the same way physicists learn using a particle accelerator, by smashing things about and investigating what cracks open, but I'll give you what I know and my recommendations:
First, some definitions?
Next, here's what I know so far:
lsof
to investigate what *.so
module files Xorg has actually loaded. Most of the time, I think you'll find that it's loading a driver we don't want or, in the case of the thing that made this difficult for me, two different versions of the same Nvidia driver that were incompatible. Once I figured that out, it's been rock-solid ever since.To conclude, both Glamor and "nvidia_hack" allow for the driver files to be directly loaded into the Xorg session without superuser permissions, and allow for direct access to the hardware. That's what Optimus is trying to do here, but to be sure we should do a scientific "remove and test" solution to see which file in the config directory of the affected system is really the culprit, and analyze further from there. Without special provisions to load whatever driver is being targeted, the xorgxrdp driver fails with this modesetting error, which is ultimately misleading. Finally, we should use lsof
on the failed process to confirm what it is that's attempting to be loaded.
Does this help?
Thanks for the info @Nexarian
From what I can tell from the X server sources, if certain modules are loaded, the X server will try to open the 'console', which is indeed a physical or virtual terminal. This is done by a call to xf86OpenConsole()
:-
The code which makes that determination is here:-
https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/common/xf86Init.c#L413-436
When the modesetting
(or nvidia
or whatever) module is loaded into the xf86DriverList, it's looks pretty inevitable that we will try to open the console. So I can only think that your existing loading methods are somehow bypassing this.
It's always possible of course I'm completely misreading the code here!
I've tried to be more scientific about this with the OP for the issue, but frankly I wasn't getting anywhere, and config management was not working at all. However:-
modesetting
was game over/etc/X11/xorg.conf.d/
. The other file was related to the keyboard, so I think we can be pretty sure that the load of the modesetting driver caused the error.I'm unable to reproduce the original fault here sadly. I don't have any hardware which seems to make this happen.
I'll bear the above in mind however, and next time I get a similar fault to triage (it shouldn't be long!), I'll be better prepared.
I hope the above is at least of some interest.
Just had the same error after Debian 12 upgrade.
Somehow the new lines in /etc/X11/xrdp/xorg.conf.dpkg-dist
didn't help
Section "ServerFlags"
# This line prevents "ServerLayout" sections in xorg.conf.d files
# overriding the "X11 Server" layout (xrdp #1784)
Option "DefaultServerLayout" "X11 Server"
Option "DontVTSwitch" "on"
But the comment gave me a idea.
A mv /etc/X11/xorg.conf.d/ /etc/X11/xorg.conf.d.bak
did make xrdp work again but I guess it broke anything else.
@Nexarian - can we close this one now?
As requested from my comment in https://github.com/neutrinolabs/xrdp/issues/1546, I keep seeing this issue with the latest versions of xrdp and xorgxrdp (built from source) on Ubuntu 18.04 with Gnome 3.32.
I had XRDP working with Ubuntu 18.04 on Gnome 3.32 (Yes, I recognize Gnome 3.32 doesn't come standard with Ubuntu 18.04, but I wanted fractional scaling!), but then made the following changes:
/opt/VirtualGL/bin/vglserver_config
(I also liked that CRD worked with VirtualGL, and I'm not sure XRDP does).I have tried all sorts of variants of xserver-xorg-legacy. I tried uninstalling dbus-user-session and installing dbus-x11 (for a while, both were installed SxS). I've tried the chmod 0660 trick on dev/tty* but that only moves the error down the pipe so that it can't access psaux for the mouse.
Still nothing. I'd love to help test patches or debug in any way I can. I would love to have XRDP back, because otherwise I have to suffer with NoMachine (my company's supported solution barf)
XVNC works (it's glacially slow), but xorgxrdp doesn't. I have both xrdp and xorgxrdp building from source at the head of their respective github repos.
Here is the log from .xorgxrdp.10.log: