Skip to content

Conversation

@jsorg71
Copy link
Contributor

@jsorg71 jsorg71 commented Nov 20, 2024

No description provided.

@matt335672
Copy link
Member

Fix some build issues with:-

--- a/scripts/install_xrdp_build_dependencies_with_apt.sh
+++ b/scripts/install_xrdp_build_dependencies_with_apt.sh
@@ -74,6 +74,7 @@ case "$ARCH"
 in
     amd64)
         PACKAGES_AMD64_MIN=" \
+            libepoxy-dev \
             libpam0g-dev \
             libssl-dev \
             libx11-dev \
@@ -118,6 +119,7 @@ in
         PACKAGES="$PACKAGES \
             g++-multilib \
             gcc-multilib \
+            libepoxy-dev:i386 \
             $LIBFREETYPE_DEV:i386 \
             libgl1-mesa-dev:i386 \
             libglu1-mesa-dev:i386 \

Also:-

  1. some files are missing from the xrdp_accel_assist directory; xrdp_accel_assist_yami.c xrdp_accel_assist_yami.h encoder_headers/yami_inf.h
  2. need to run astyle

Copy link
Member

@matt335672 matt335672 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to merge this as-is, when CI is fixed.

g_deinit();
g_exit(0);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding error logging if this doesn't work, for triaging user issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't t think the log ing system is initialized at this point. Can we still log?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're quite right. Calling LOG() won't work.

Two possible solutions:-

  1. Log errors to stderr in this function. This isn't ideal, but it will at least get picked up by the journal on systemd-based systems.
  2. Use a separate function for this purpose (g_cu_init()?) called explicitly from sesman after logging has started. We can remove it if you ever get a better answer as to why this function is required.

@matt335672
Copy link
Member

I don't want to hold up merging this, but I'd like to ask if we think the hack to call cuInit() is in the right place. Wouldn't it be better done as part of the session if NVidia is being used?

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 4, 2024

I don't want to hold up merging this, but I'd like to ask if we think the hack to call cuInit() is in the right place. Wouldn't it be better done as part of the session if NVidia is being used?

I tried to just call cuInit() in the session but as the user it fails. Once the call is made as root, something gets 'driver init' and then it will work as the user. I guess xrdp might not be running as root, is that right? Also, is this a security risk?
In order to reproduce this problem, you have to boot a server up without X GUI running as Xorg on console also does the 'driver init'.
I tried to use nvida_persistence or something like that as it claimed to fix this but it didn't work.
I've been meaning to ask NVidia about this but the problem is hard to describe.

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 4, 2024

I rebased this branch on current devel

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 4, 2024

Should we make xrdp_accel_assit a compile time flag because with it, epoxy and gbm are required to build xrdp. We didn't need that before? Xorg, or at least the modesetting driver requires the run time libraries but now we require the development packages and the user may never plan to use xrdp_accel_assist.

@matt335672
Copy link
Member

As far as the cuInit() goes, either sesman or sesexec runs as root. Since #2974, xrdp may not be running as root, and in fact it won't be on Debian/Ubuntu anyway - they patched it to run as non-root a long time ago.

I think a compile-time option is the best way to go, for platforms that may not support NVidia acceleration (are there any?).

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 24, 2024

As far as the cuInit() goes, either sesman or sesexec runs as root. Since #2974, xrdp may not be running as root, and in fact it won't be on Debian/Ubuntu anyway - they patched it to run as non-root a long time ago.

I think a compile-time option is the best way to go, for platforms that may not support NVidia acceleration (are there any?).

done and done

@jsorg71
Copy link
Contributor Author

jsorg71 commented Dec 24, 2024

accel_assist is using environment variables set int sesman.ini, but I think it might be better to use gfx.toml.

these are the current env vars. @metalefty can accell_assist use gfx.toml, does that make sense to use?

XRDP_NVENC_RATE_CONTROL_MODE
XRDP_NVENC_AVERAGE_BITRATE
XRDP_NVENC_QP

@metalefty
Copy link
Member

Yes, it looks good to me.

Copy link
Member

@matt335672 matt335672 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment on recent changes. I'm still happy to merge this sooner rather than later and work in devel if that suits.

g_deinit();
g_exit(0);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're quite right. Calling LOG() won't work.

Two possible solutions:-

  1. Log errors to stderr in this function. This isn't ideal, but it will at least get picked up by the journal on systemd-based systems.
  2. Use a separate function for this purpose (g_cu_init()?) called explicitly from sesman after logging has started. We can remove it if you ever get a better answer as to why this function is required.

@jsorg71
Copy link
Contributor Author

jsorg71 commented Jan 7, 2025

I'm good to merge this now and then continue work in devel.

@matt335672
Copy link
Member

Fine by me - it will get more exposure that way.

I've got #3346 to merge once @metalefty has looked at it, but it won't affect this at all.

@Nexarian
Copy link
Contributor

Nexarian commented Jan 7, 2025

Agreed.

@jsorg71 jsorg71 merged commit 3446614 into neutrinolabs:devel Feb 22, 2025
14 checks passed
@jsorg71 jsorg71 deleted the nvenc branch February 22, 2025 06:43
@huige007
Copy link

huige007 commented Mar 6, 2025

could anyone help me with how to use this build option, I don't know how to set XRDP_NVENC_CFLAGS and XRDP_NVENC_LIBS or where to download them.
--enable-nvenc Use nvenc library (default: no), env vars
XRDP_NVENC_CFLAGS and XRDP_NVENC_LIBS should be set
if used
--enable-accel Build xrdp_accel_assist (default: no, auto set if
--enable-nvenc)

@jsorg71
Copy link
Contributor Author

jsorg71 commented Mar 6, 2025

I can help
likely, you do not need to set XRDP_NVENC_CFLAGS and XRDP_NVENC_LIBS
First get nvidia-smi working, that is, get driver working.
Then build with --enable-nvenc and --enable-x264 and --enable-assist for xrdp
and --enable-lrandr for xorgxrdp.
After both xrdp and xorgxrdp and built and installed,
you need to edit /etc/sesman.ini and /etc/X11/xrdp/xorg_nvidia.conf to setup.

What NVIDIA card are you trying to use?

@huige007
Copy link

huige007 commented Mar 6, 2025

➜ ~ nvidia-smi
Thu Mar 6 18:45:22 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120 Driver Version: 550.120 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 Quadro P2000 Off | 00000000:21:00.0 Off | N/A |
| 44% 24C P8 4W / 75W | 74MiB / 5120MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 6402 G /usr/lib/xorg/Xorg 64MiB |
| 0 N/A N/A 6488 G /usr/bin/gnome-shell 5MiB |
+-----------------------------------------------------------------------------------------+

I am using Quadro P2000 , after build xrdp, xorg with specific option, also modified the /etc/X11/xrdp/xorg_nvidia.conf, I still can not login to xrdp, following is log in xorg log. by the way, I have added user to groups render and video.

➜ ~ cat .xorgxrdp.11.log
[ 1243.312]
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[ 1243.312] Current Operating System: Linux HP-Z6-G4-Workstation 6.8.0-52-generic #5322.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2 x86_64
[ 1243.312] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.8.0-52-generic root=UUID=9957888f-ede9-4401-9446-19b9ba4f28c4 ro quiet splash vt.handoff=7
[ 1243.312] xorg-server 2:21.1.4-2ubuntu1.7
22.04.13 (For technical support please see http://www.ubuntu.com/support)
[ 1243.312] Current version of pixman: 0.40.0
[ 1243.312] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 1243.312] Markers: (--) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 1243.312] (++) Log file: ".xorgxrdp.11.log", Time: Thu Mar 6 18:55:15 2025
[ 1243.312] (++) Using config file: "/etc/X11/xrdp/xorg_nvidia.conf"
[ 1243.312] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 1243.313] (
) Option "defaultserverlayout" "XRDP GPU Server"
[ 1243.313] () ServerLayout "XRDP GPU Server"
[ 1243.313] (
) |-->Screen "dGPU" (0)
[ 1243.313] () | |-->Monitor ""
[ 1243.313] (
) | |-->Device "dGPU"
[ 1243.313] (==) No monitor specified for screen "dGPU".
Using a default monitor configuration.
[ 1243.313] () |-->Input Device "xrdpMouse"
[ 1243.313] (
) |-->Input Device "xrdpKeyboard"
[ 1243.313] () Option "DontVTSwitch" "on"
[ 1243.313] (
) Option "AutoAddDevices" "off"
[ 1243.313] () Option "AutoAddGPU" "off"
[ 1243.313] (
) Not automatically adding devices
[ 1243.313] (==) Automatically enabling devices
[ 1243.313] () Not automatically adding GPU devices
[ 1243.313] (==) Automatically binding GPU devices
[ 1243.313] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 1243.313] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 1243.313] Entry deleted from font path.
[ 1243.313] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 1243.313] Entry deleted from font path.
[ 1243.313] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 1243.313] Entry deleted from font path.
[ 1243.313] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 1243.313] Entry deleted from font path.
[ 1243.313] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 1243.313] Entry deleted from font path.
[ 1243.313] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 1243.313] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 1243.313] (II) Loader magic: 0x579a9ac03020
[ 1243.313] (II) Module ABI versions:
[ 1243.313] X.Org ANSI C Emulation: 0.4
[ 1243.313] X.Org Video Driver: 25.2
[ 1243.313] X.Org XInput driver : 24.4
[ 1243.313] X.Org Server Extension : 10.0
[ 1243.314] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_316
[ 1243.315] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 1243.315] (II) Platform probe for /sys/devices/pci0000:20/0000:20:00.0/0000:21:00.0/drm/card0
[ 1243.315] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 1243.322] (
) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules"
[ 1243.328] (--) PCI:*(33@0:0:0) 10de:1c30:103c:11b3 rev 161, Mem @ 0xc6000000/16777216, 0x38bfe0000000/268435456, 0x38bff0000000/33554432, I/O @ 0x00008000/128, BIOS @ 0x????????/524288
[ 1243.328] (II) "glx" will be loaded by default.
[ 1243.328] (II) LoadModule: "xorgxrdp"
[ 1243.328] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[ 1243.328] (II) Module XORGXRDP: vendor="X.Org Foundation"
[ 1243.328] compiled for 1.21.1.4, module version = 0.10.80
[ 1243.328] ABI class: X.Org Video Driver, version 25.2
[ 1243.328] xorgxrdpSetup:
[ 1243.328] (II) LoadModule: "glx"
[ 1243.328] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 1243.329] (II) Module glx: vendor="X.Org Foundation"
[ 1243.329] compiled for 1.21.1.4, module version = 1.0.0
[ 1243.329] ABI class: X.Org Server Extension, version 10.0
[ 1243.329] (II) LoadModule: "nvidia"
[ 1243.329] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
[ 1243.329] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 1243.329] compiled for 1.6.99.901, module version = 1.0.0
[ 1243.329] Module class: X.Org Video Driver
[ 1243.329] (II) LoadModule: "xrdpmouse"
[ 1243.330] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[ 1243.330] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[ 1243.330] compiled for 1.21.1.4, module version = 0.10.80
[ 1243.330] Module class: X.Org XInput Driver
[ 1243.330] ABI class: X.Org XInput driver, version 24.4
[ 1243.330] rdpmousePlug:
[ 1243.330] (II) LoadModule: "xrdpkeyb"
[ 1243.330] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[ 1243.330] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[ 1243.330] compiled for 1.21.1.4, module version = 0.10.80
[ 1243.330] Module class: X.Org XInput Driver
[ 1243.330] ABI class: X.Org XInput driver, version 24.4
[ 1243.330] rdpkeybPlug:
[ 1243.330] xorgxrdpCheckWrap: NVIDIA driver found
[ 1243.330] (II) NVIDIA dlloader X Driver 550.120 Fri Sep 13 10:03:17 UTC 2024
[ 1243.330] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 1243.330] xorgxrdpDriverFunc:
[ 1243.330] xorgxrdpPlatformProbe:
[ 1243.330] (II) Loading sub module "fb"
[ 1243.330] (II) LoadModule: "fb"
[ 1243.330] (II) Module "fb" already built-in
[ 1243.330] (II) Loading sub module "wfb"
[ 1243.330] (II) LoadModule: "wfb"
[ 1243.330] (II) Loading /usr/lib/xorg/modules/libwfb.so
[ 1243.330] (II) Module wfb: vendor="X.Org Foundation"
[ 1243.330] compiled for 1.21.1.4, module version = 1.0.0
[ 1243.330] ABI class: X.Org ANSI C Emulation, version 0.4
[ 1243.330] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 1243.330] xorgxrdpPreInit:
[ 1243.330] (II) NVIDIA(0): Creating default Display subsection in Screen section
"dGPU" for depth/fbbpp 24/32
[ 1243.330] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[ 1243.330] (==) NVIDIA(0): RGB weight 888
[ 1243.330] (==) NVIDIA(0): Default visual is TrueColor
[ 1243.330] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[ 1243.330] (II) Applying OutputClass "nvidia" options to /dev/dri/card0
[ 1243.330] () NVIDIA(0): Option "DPI" "96 x 96"
[ 1243.330] (
) NVIDIA(0): Option "ConnectToAcpid" "false"
[ 1243.330] () NVIDIA(0): Option "AllowEmptyInitialConfiguration"
[ 1243.330] (
) NVIDIA(0): Option "UseDisplayDevice" "none"
[ 1243.330] () NVIDIA(0): Enabling 2D acceleration
[ 1243.330] (
) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
[ 1243.330] () NVIDIA(0): mode
[ 1243.330] (II) Loading sub module "glxserver_nvidia"
[ 1243.330] (II) LoadModule: "glxserver_nvidia"
[ 1243.330] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/libglxserver_nvidia.so
[ 1243.340] (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
[ 1243.340] compiled for 1.6.99.901, module version = 1.0.0
[ 1243.340] Module class: X.Org Server Extension
[ 1243.340] (II) NVIDIA GLX Module 550.120 Fri Sep 13 10:02:06 UTC 2024
[ 1243.340] (II) NVIDIA: The X server supports PRIME Render Offload.
[ 1243.341] (II) NVIDIA(0): NVIDIA GPU Quadro P2000 (GP106GL-A) at PCI:33:0:0 (GPU-0)
[ 1243.341] (--) NVIDIA(0): Memory: 5242880 kBytes
[ 1243.341] (--) NVIDIA(0): VideoBIOS: 86.06.74.00.04
[ 1243.341] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[ 1243.341] (II) NVIDIA(0): Validated MetaModes:
[ 1243.341] (II) NVIDIA(0): "NULL"
[ 1243.341] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[ 1243.341] (
) NVIDIA(0): DPI set to (96, 96); computed from "DPI" X config option
[ 1243.341] xorgxrdpScreenInit:
[ 1243.341] (WW) NVIDIA: Failed to bind sideband socket to
[ 1243.341] (WW) NVIDIA: '/var/run/nvidia-xdriver-d38da53a' Permission denied
[ 1243.342] (II) NVIDIA: Reserving 24576.00 MB of virtual memory for indirect memory
[ 1243.342] (II) NVIDIA: access.
[ 1243.362] (II) NVIDIA(0): Setting mode "NULL"
[ 1243.366] (==) NVIDIA(0): Disabling shared memory pixmaps
[ 1243.366] (==) NVIDIA(0): Backing store enabled
[ 1243.366] (==) NVIDIA(0): Silken mouse enabled
[ 1243.366] (==) NVIDIA(0): DPMS enabled
[ 1243.366] (II) Loading sub module "dri2"
[ 1243.366] (II) LoadModule: "dri2"
[ 1243.366] (II) Module "dri2" already built-in
[ 1243.366] (II) NVIDIA(0): [DRI2] Setup complete
[ 1243.366] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia
[ 1243.366] xorgxrdpScreenInit: nvidia_grid 0
[ 1243.366] xorgxrdpScreenInit: width 640 height 480
[ 1243.367] rdpClientConInit: disconnect idle session after [0] sec
[ 1243.367] rdpClientConInit: kill disconnected [0] timeout [0] sec
[ 1243.367] rdpSimdInit: assigning yuv functions
[ 1243.367] rdpSimdInit: cpuid ax 1 cx 0 return ax 0x00050657 bx 0x14200800 cx 0x7ffefbff dx 0xbfebfbff
[ 1243.367] rdpSimdInit: sse2 amd64 yuv functions assigned
[ 1243.367] (II) Initializing extension Generic Event Extension
[ 1243.367] (II) Initializing extension SHAPE
[ 1243.367] (II) Initializing extension MIT-SHM
[ 1243.367] (II) Initializing extension XInputExtension
[ 1243.367] (II) Initializing extension XTEST
[ 1243.367] (II) Initializing extension BIG-REQUESTS
[ 1243.367] (II) Initializing extension SYNC
[ 1243.367] (II) Initializing extension XKEYBOARD
[ 1243.367] (II) Initializing extension XC-MISC
[ 1243.367] (II) Initializing extension SECURITY
[ 1243.367] (II) Initializing extension XFIXES
[ 1243.367] (II) Initializing extension RENDER
[ 1243.368] (II) Initializing extension COMPOSITE
[ 1243.368] (II) Initializing extension DAMAGE
[ 1243.368] (II) Initializing extension MIT-SCREEN-SAVER
[ 1243.368] (II) Initializing extension DOUBLE-BUFFER
[ 1243.368] (II) Initializing extension RECORD
[ 1243.368] (II) Initializing extension DPMS
[ 1243.368] (II) Initializing extension Present
[ 1243.368] (II) Initializing extension DRI3
[ 1243.368] (II) Initializing extension X-Resource
[ 1243.368] (II) Initializing extension XVideo
[ 1243.368] (II) Initializing extension XVideo-MotionCompensation
[ 1243.368] (II) Initializing extension SELinux
[ 1243.368] (II) SELinux: Disabled on system
[ 1243.368] (II) Initializing extension GLX
[ 1243.368] (II) Initializing extension GLX
[ 1243.368] (II) Indirect GLX disabled.
[ 1243.368] (II) GLX: Another vendor is already registered for screen 0
[ 1243.368] (II) Initializing extension XFree86-VidModeExtension
[ 1243.368] (II) Initializing extension XFree86-DGA
[ 1243.369] (II) Initializing extension XFree86-DRI
[ 1243.369] (II) Initializing extension DRI2
[ 1243.369] (II) Initializing extension NV-GLX
[ 1243.369] (II) Initializing extension NV-CONTROL
[ 1243.369] rdpCreateScreenResources:
[ 1243.401] (II) Using input driver 'XRDPMOUSE' for 'xrdpMouse'
[ 1243.401] () Option "CorePointer"
[ 1243.401] (
) xrdpMouse: always reports core events
[ 1243.401] rdpmousePreInit: drv 0x579aad07e1e0 info 0x579aad7b53b0, flags 0x0
[ 1243.401] (II) XINPUT: Adding extended input device "xrdpMouse" (type: Mouse, id 6)
[ 1243.401] rdpmouseControl: what 0
[ 1243.401] rdpmouseDeviceInit:
[ 1243.401] rdpmouseCtrl:
[ 1243.401] rdpRegisterInputCallback: type 1 proc 0x7c60708db950
[ 1243.401] () xrdpMouse: (accel) keeping acceleration scheme 1
[ 1243.401] (
) xrdpMouse: (accel) acceleration profile 0
[ 1243.401] () xrdpMouse: (accel) acceleration factor: 2.000
[ 1243.401] (
) xrdpMouse: (accel) acceleration threshold: 4
[ 1243.401] rdpmouseControl: what 1
[ 1243.401] rdpmouseDeviceOn:
[ 1243.401] (II) Using input driver 'XRDPKEYB' for 'xrdpKeyboard'
[ 1243.401] () Option "CoreKeyboard"
[ 1243.401] (
) xrdpKeyboard: always reports core events
[ 1243.401] rdpkeybPreInit: drv 0x579aad07e190 info 0x579aad7b8fd0, flags 0x0
[ 1243.401] (II) XINPUT: Adding extended input device "xrdpKeyboard" (type: Keyboard, id 7)
[ 1243.401] rdpkeybControl: what 0
[ 1243.402] rdpLoadLayout: rules="evdev" model="pc104" variant=""layout="us" options=""
[ 1243.422] rdpkeybChangeKeyboardControl:
[ 1243.422] rdpkeybChangeKeyboardControl: autoRepeat on
[ 1243.422] rdpkeybChangeKeyboardControl:
[ 1243.422] rdpkeybChangeKeyboardControl: autoRepeat on
[ 1243.423] rdpRegisterInputCallback: type 0 proc 0x7c606fd35970
[ 1243.423] rdpkeybControl: what 1
[ 1243.423] rdpkeybDeviceOn:
[ 1243.423] rdpkeybChangeKeyboardControl:
[ 1243.423] rdpkeybChangeKeyboardControl: autoRepeat on
[ 1243.431] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[ 1243.431] (II) AutoAddDevices is off - not adding device.
[ 1243.431] (II) config/udev: Adding input device Power Button (/dev/input/event0)
[ 1243.431] (II) AutoAddDevices is off - not adding device.
[ 1243.432] (II) config/udev: Adding input device HDA Intel PCH Headset Mic (/dev/input/event7)
[ 1243.432] (II) AutoAddDevices is off - not adding device.
[ 1243.432] (II) config/udev: Adding input device HDA Intel PCH Line Out (/dev/input/event8)
[ 1243.432] (II) AutoAddDevices is off - not adding device.
[ 1243.432] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event9)
[ 1243.432] (II) AutoAddDevices is off - not adding device.
[ 1243.433] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event3)
[ 1243.433] (II) AutoAddDevices is off - not adding device.
[ 1243.433] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event4)
[ 1243.433] (II) AutoAddDevices is off - not adding device.
[ 1243.433] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event5)
[ 1243.433] (II) AutoAddDevices is off - not adding device.
[ 1243.433] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=9 (/dev/input/event6)
[ 1243.433] (II) AutoAddDevices is off - not adding device.
[ 1243.435] (II) config/udev: Adding input device HP WMI hotkeys (/dev/input/event2)
[ 1243.435] (II) AutoAddDevices is off - not adding device.
[ 1243.437] xorgxrdpDeferredStartup:
[ 1243.437] rdpLRRInit: AddCallback ok
[ 1243.437] rdpLRRInit: AddExtension ok
[ 1243.437] xorgxrdpSetupDamage: DamageRegister ok
[ 1243.522] rdpInDeferredRepeatCallback:
[ 1243.522] rdpkeybChangeKeyboardControl:
[ 1243.522] rdpkeybChangeKeyboardControl: autoRepeat off
[ 1243.522] rdpInDeferredRepeatCallback:
[ 1243.522] rdpkeybChangeKeyboardControl:
[ 1243.523] rdpkeybChangeKeyboardControl: autoRepeat off
[ 1243.523] rdpInDeferredRepeatCallback:
[ 1243.523] rdpkeybChangeKeyboardControl:
[ 1243.523] rdpkeybChangeKeyboardControl: autoRepeat off
[ 1244.365] rdpmouseControl: what 2
[ 1244.365] rdpmouseDeviceOff:
[ 1244.365] rdpkeybControl: what 2
[ 1244.365] rdpkeybDeviceOff:
[ 1244.367] xorgxrdpDamageDestroy:
[ 1244.368] rdpkeybControl: what 3
[ 1244.368] rdpkeybUnInit: drv 0x579aad07e190 info 0x579aad7b8fd0, flags 0x0
[ 1244.368] rdpUnregisterInputCallback: proc 0x7c606fd35970
[ 1244.368] rdpmouseControl: what 3
[ 1244.368] rdpmouseUnInit: drv 0x579aad07e1e0 info 0x579aad7b53b0, flags 0x0
[ 1244.368] rdpUnregisterInputCallback: proc 0x7c60708db950
[ 1244.368] rdpCloseScreen:
[ 1244.375] (II) NVIDIA(GPU-0): Deleting GPU-0
[ 1244.376] xorgxrdpDownDown:
[ 1244.376] xorgxrdpDownDown: 1
[ 1244.376] rdpClientConDeinit:
[ 1244.376] rdpClientConDeinit: deleting file /var/run/xrdp/1000/xrdp_display_11
[ 1244.376] rdpClientConDeinit: deleting file /var/run/xrdp/1000/xrdp_disconnect_display_11
[ 1244.376] (II) Server terminated successfully (0). Closing log file.

@huige007
Copy link

huige007 commented Mar 6, 2025

fortunately, after try login again, I can login to xrdp, and glxheas shows I am using L_RENDERER: Quadro P2000/PCIe/SSE2, but the fps output of glxgears is wired as following
➜ ~ glxheads
glxheads: exercise multiple GLX connections (any key = exit)
Usage:
glxheads xdisplayname ...
Example:
glxheads :0 mars:0 venus:1
Name: :11.0
Display: 0x6413cd1e8120
Window: 0x5a00002
Context: 0x6413cd340488
GL_VERSION: 4.6.0 NVIDIA 550.120
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: Quadro P2000/PCIe/SSE2
X connection to :11.0 broken (explicit kill or server shutdown).
➜ ~ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
59850 frames in 5.0 seconds = 11969.337 FPS
X connection to :11.0 broken (explicit kill or server shutdown).

@jsorg71
Copy link
Contributor Author

jsorg71 commented Mar 6, 2025

So you are good it seems.
I think the quatro lets you have unlimited encoder session so you should try to turn on accel_assist in sesman.ini.
uncomment the line XRDP_USE_ACCEL_ASSIST=1 at the end. Then you will have hardware h264 encoding.

@huige007
Copy link

huige007 commented Mar 7, 2025

it's very strange, I uncommented the line and restart xrdp service, when i login again, I got following errors. And event I commented the line and try again, I got the same issue.
[ 54971.142] (++) Log file: ".xorgxrdp.12.log", Time: Fri Mar 7 09:50:43 2025
[ 54971.142] (++) Using config file: "/etc/X11/xrdp/xorg_nvidia.conf"
[ 54971.142] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 54971.142] () Option "defaultserverlayout" "XRDP GPU Server"
[ 54971.142] (
) ServerLayout "XRDP GPU Server"
[ 54971.142] () |-->Screen "dGPU" (0)
[ 54971.142] (
) | |-->Monitor ""
[ 54971.142] () | |-->Device "dGPU"
[ 54971.142] (==) No monitor specified for screen "dGPU".
Using a default monitor configuration.
[ 54971.142] (
) |-->Input Device "xrdpMouse"
[ 54971.142] () |-->Input Device "xrdpKeyboard"
[ 54971.142] (
) Option "DontVTSwitch" "on"
[ 54971.142] () Option "AutoAddDevices" "off"
[ 54971.142] (
) Option "AutoAddGPU" "off"
[ 54971.142] () Not automatically adding devices
[ 54971.142] (==) Automatically enabling devices
[ 54971.142] (
) Not automatically adding GPU devices
[ 54971.142] (==) Automatically binding GPU devices
[ 54971.142] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 54971.142] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 54971.142] (II) Loader magic: 0x639ed4727020
[ 54971.142] (II) Module ABI versions:
[ 54971.142] X.Org ANSI C Emulation: 0.4
[ 54971.142] X.Org Video Driver: 25.2
[ 54971.142] X.Org XInput driver : 24.4
[ 54971.142] X.Org Server Extension : 10.0
[ 54971.143] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_392
[ 54971.144] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 54971.144] (II) Platform probe for /sys/devices/pci0000:20/0000:20:00.0/0000:21:00.0/drm/card0
[ 54971.144] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 54971.149] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules"
[ 54971.154] (--) PCI:*(33@0:0:0) 10de:1c30:103c:11b3 rev 161, Mem @ 0xc6000000/16777216, 0x38bfe0000000/268435456, 0x38bff0000000/33554432, I/O @ 0x00008000/128, BIOS @ 0x????????/524288
[ 54971.155] (II) "glx" will be loaded by default.
[ 54971.155] (II) LoadModule: "xorgxrdp"
[ 54971.155] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[ 54971.157] (EE) Failed to load /usr/lib/xorg/modules/libxorgxrdp.so: /usr/lib/xorg/modules/libxorgxrdp.so: undefined symbol: glamor_xv_init
[ 54971.157] (EE) Failed to load module "xorgxrdp" (loader failed, 0)
[ 54971.157] (II) LoadModule: "glx"
[ 54971.157] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 54971.157] (II) Module glx: vendor="X.Org Foundation"
[ 54971.157] compiled for 1.21.1.4, module version = 1.0.0
[ 54971.157] ABI class: X.Org Server Extension, version 10.0
[ 54971.157] (II) LoadModule: "nvidia"
[ 54971.157] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
[ 54971.158] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 54971.158] compiled for 1.6.99.901, module version = 1.0.0
[ 54971.158] Module class: X.Org Video Driver
[ 54971.158] (II) LoadModule: "xrdpmouse"
[ 54971.158] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[ 54971.158] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpmouse_drv.so: /usr/lib/xorg/modules/input/xrdpmouse_drv.so: undefined symbol: rdpUnregisterInputCallback
[ 54971.158] (EE) Failed to load module "xrdpmouse" (loader failed, 0)
[ 54971.158] (II) LoadModule: "xrdpkeyb"
[ 54971.158] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[ 54971.158] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: undefined symbol: rdpUnregisterInputCallback
[ 54971.158] (EE) Failed to load module "xrdpkeyb" (loader failed, 0)
[ 54971.158] (II) NVIDIA dlloader X Driver 550.120 Fri Sep 13 10:03:17 UTC 2024
[ 54971.158] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 54971.158] (EE)
Fatal server error:
[ 54971.158] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 54971.158] (EE)
[ 54971.158] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 54971.158] (EE) Please also check the log file at ".xorgxrdp.12.log" for additional information.
[ 54971.158] (EE)
[ 54971.158] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 54971.158] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 54971.159] (EE) Server terminated with error (1). Closing log file.

1 similar comment
@huige007
Copy link

huige007 commented Mar 7, 2025

it's very strange, I uncommented the line and restart xrdp service, when i login again, I got following errors. And event I commented the line and try again, I got the same issue.
[ 54971.142] (++) Log file: ".xorgxrdp.12.log", Time: Fri Mar 7 09:50:43 2025
[ 54971.142] (++) Using config file: "/etc/X11/xrdp/xorg_nvidia.conf"
[ 54971.142] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 54971.142] () Option "defaultserverlayout" "XRDP GPU Server"
[ 54971.142] (
) ServerLayout "XRDP GPU Server"
[ 54971.142] () |-->Screen "dGPU" (0)
[ 54971.142] (
) | |-->Monitor ""
[ 54971.142] () | |-->Device "dGPU"
[ 54971.142] (==) No monitor specified for screen "dGPU".
Using a default monitor configuration.
[ 54971.142] (
) |-->Input Device "xrdpMouse"
[ 54971.142] () |-->Input Device "xrdpKeyboard"
[ 54971.142] (
) Option "DontVTSwitch" "on"
[ 54971.142] () Option "AutoAddDevices" "off"
[ 54971.142] (
) Option "AutoAddGPU" "off"
[ 54971.142] () Not automatically adding devices
[ 54971.142] (==) Automatically enabling devices
[ 54971.142] (
) Not automatically adding GPU devices
[ 54971.142] (==) Automatically binding GPU devices
[ 54971.142] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 54971.142] Entry deleted from font path.
[ 54971.142] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 54971.142] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 54971.142] (II) Loader magic: 0x639ed4727020
[ 54971.142] (II) Module ABI versions:
[ 54971.142] X.Org ANSI C Emulation: 0.4
[ 54971.142] X.Org Video Driver: 25.2
[ 54971.142] X.Org XInput driver : 24.4
[ 54971.142] X.Org Server Extension : 10.0
[ 54971.143] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_392
[ 54971.144] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 54971.144] (II) Platform probe for /sys/devices/pci0000:20/0000:20:00.0/0000:21:00.0/drm/card0
[ 54971.144] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 54971.149] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/x86_64-linux-gnu/nvidia/xorg,/usr/lib/xorg/modules"
[ 54971.154] (--) PCI:*(33@0:0:0) 10de:1c30:103c:11b3 rev 161, Mem @ 0xc6000000/16777216, 0x38bfe0000000/268435456, 0x38bff0000000/33554432, I/O @ 0x00008000/128, BIOS @ 0x????????/524288
[ 54971.155] (II) "glx" will be loaded by default.
[ 54971.155] (II) LoadModule: "xorgxrdp"
[ 54971.155] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[ 54971.157] (EE) Failed to load /usr/lib/xorg/modules/libxorgxrdp.so: /usr/lib/xorg/modules/libxorgxrdp.so: undefined symbol: glamor_xv_init
[ 54971.157] (EE) Failed to load module "xorgxrdp" (loader failed, 0)
[ 54971.157] (II) LoadModule: "glx"
[ 54971.157] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 54971.157] (II) Module glx: vendor="X.Org Foundation"
[ 54971.157] compiled for 1.21.1.4, module version = 1.0.0
[ 54971.157] ABI class: X.Org Server Extension, version 10.0
[ 54971.157] (II) LoadModule: "nvidia"
[ 54971.157] (II) Loading /usr/lib/x86_64-linux-gnu/nvidia/xorg/nvidia_drv.so
[ 54971.158] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 54971.158] compiled for 1.6.99.901, module version = 1.0.0
[ 54971.158] Module class: X.Org Video Driver
[ 54971.158] (II) LoadModule: "xrdpmouse"
[ 54971.158] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[ 54971.158] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpmouse_drv.so: /usr/lib/xorg/modules/input/xrdpmouse_drv.so: undefined symbol: rdpUnregisterInputCallback
[ 54971.158] (EE) Failed to load module "xrdpmouse" (loader failed, 0)
[ 54971.158] (II) LoadModule: "xrdpkeyb"
[ 54971.158] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[ 54971.158] (EE) Failed to load /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: /usr/lib/xorg/modules/input/xrdpkeyb_drv.so: undefined symbol: rdpUnregisterInputCallback
[ 54971.158] (EE) Failed to load module "xrdpkeyb" (loader failed, 0)
[ 54971.158] (II) NVIDIA dlloader X Driver 550.120 Fri Sep 13 10:03:17 UTC 2024
[ 54971.158] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 54971.158] (EE)
Fatal server error:
[ 54971.158] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 54971.158] (EE)
[ 54971.158] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 54971.158] (EE) Please also check the log file at ".xorgxrdp.12.log" for additional information.
[ 54971.158] (EE)
[ 54971.158] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[ 54971.158] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[ 54971.159] (EE) Server terminated with error (1). Closing log file.

@huige007
Copy link

huige007 commented Mar 7, 2025

after resintall xrdp and xorg, it works again, but uncommented the line seem no effect on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants