xrdp with egfx pipeline testrun #2383
Replies: 24 comments 41 replies
-
this greatly reduces cpu usage under WSL |
Beta Was this translation helpful? Give feedback.
-
Hi
im think SSL_write: I/O error is a main problem, i'm trying to search this error, but don't find working solution
if you catch this error and have a solution, tell me please |
Beta Was this translation helpful? Give feedback.
-
I am having some issues with this that I don't really understand :
I'm trying to connect with Remmina, in case that matters. The client just gets a black screen. |
Beta Was this translation helpful? Give feedback.
-
Not sure if I did this right, but it's still really slow for me
I connect with remmina and I can watch it paint the screen line by line (connected via 10Mbps connection)
|
Beta Was this translation helpful? Give feedback.
-
Here's a fun one, I migrated our production xRDP server to use egfx, with the following commands:
We have both plasma and gnome installed (plasma is the default). after switching to egfx, the session was switched to gnome, even though .xsession and .xsessionrc are:
|
Beta Was this translation helpful? Give feedback.
-
How does this relate to dri3/glamor hardware acceleration in xrdp (that is working stable for me) ? #1029 |
Beta Was this translation helpful? Give feedback.
-
Wow this is really impressive. Thanks for your work all. I'm happy to test out any changes that you want on my system to improve the stability. Should multi-monitor work already, or is this something that is known not to work yet? client:
xrdp.log:
|
Beta Was this translation helpful? Give feedback.
-
This really speed xrdp connection up. Only issue I encounter is when I was remote connecting to my ubuntu computer using microsoft remote desktop in fullscreen mode. When the remote desktop software window lose focus and regain focus, the remote desktop freezes and I have to reconnect to regain control. |
Beta Was this translation helpful? Give feedback.
-
Hi, Clean install , does not work at debian =) but still cannot install via apt-add-repository ppa:saxl/xrdp-egfx any ideas how to install that ? |
Beta Was this translation helpful? Give feedback.
-
I believe DBUS is not working for snap apps with XRDP_USE_MULTISESSION. In my case this resulted in firefox (from snap) unable to open links ("Firefox is already running, but is not responding" popup). So for now I had to disable this feature. |
Beta Was this translation helpful? Give feedback.
-
I'm a little puzzled at the moment. I'm running Endeavour OS (Arch-derived) and it's not entirely clear to me which features and settings are upstreamed. I'd love to have the nvidia acceleration and multi-session capabilities active; what's the correct way to proceed? 'Vanilla' xrdp is running fine, but is slow on the systems at the moment, with remmina as the client. Is there a summary / wiki overview of status, etc. somewhere to make it easy to get up to speed on the efforts? |
Beta Was this translation helpful? Give feedback.
-
I am very intrigued. Would an aging Nvidia Quadro P2000 be able to accelerate this? |
Beta Was this translation helpful? Give feedback.
-
Hello @akarl10 , first of all, thank you and the team so much for adding such significant improvements to xrdp with egfx features. I noticed that there have been some improvements and fixes related to efgx added to the project since the last build on the PPA. Could you update the ubuntu PPA with the latest code? I desperately want to try it out, but I don't know how to build the .deb package for Ubuntu, I did try some guides but I'm not able to make it work. Many thanks. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to build this on Alpine? |
Beta Was this translation helpful? Give feedback.
-
I wanted to try this on an Google Cloud instance, as that would mean easy access to a variety of GPUs. Is this a dumb idea? Will the gains from the GPU be nullified by the latency to the cloud? (I'm sitting approximately 20ms away.) What would be a good GPU for this? The list of available ones is here Edit: I got this to work. Ubuntu 23, don't forget to install GNOME, went with a n1-standard-4 with a single NVIDIA T4 GPU core. Can't really tell if it's snappy or not. Input greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
Good day! After last updates of msts client there is a bug. The bug appears only on egfx version of xrdp. After hiding/showing rdp window, all screen is "freezing", for the time until the client won't be reconnected. 2024-04-16.14-10-54-192.mp4 |
Beta Was this translation helpful? Give feedback.
-
I can confirm this happens since some time. I see that behavior when using MS Windows remote desktop client; when connecting from ubuntu using Remmina this works fine. |
Beta Was this translation helpful? Give feedback.
-
Hello! Thank you to you and everyone involved with with getting this working. I can't wait for it to hit the main xrdp branch so everyone can benefit from it. Right now I'm using it in a Lubuntu 22.04.0 LTS VM without a passed-through GPU, and even with software rendering it's night and day different. This fork of the server is the only way I've ever been able to get audio from a Linux XRDP server, for one thing. It's also, even with software rendering, giving me sufficiently low latency audio that I can do real time audio work (in my case, listening to live audio from a software defined radio hooked up to a ham radio antenna in my office). I think, at least for basic audio use cases that still need low-latency, this might actually be a perfect solution without GPU passthrough, which opens up a ton of mini-PCs that don't have dedicated GPUs to being used as hosts for xrdp-based VMs. Given what a mess both Intel and AMD iGPU PCI-e passthrough is right now, that's really awesome. |
Beta Was this translation helpful? Give feedback.
-
Hi Team Want to take a minute to express my gratitude for this work and how it has positively impacted me and homelab experience; I definitely look forward to the merge mentioned above. I am currently running Proxmox on some older enterprise hardware and running an LXC container with Ubuntu and KDE installed. Thanks to this work I am able to pass through my 3060 12GB GPU, remote in, and have an exceptional / smooth buttery UI GPU accelerated experience while developing remotely (still some kinks with the LXC based desktop configuration and I am at best a novice but it works okay). As a tangent, on account of the GPU pass through I can use LM Studio to host multiple quantized LLMs (i.e. DeepSeek Coder, Llama 3 instruct) and with the right plugins in VS Code (i.e. Twinny, Continue) can interface to coding LLMs to speed up work (all local based inferencing). Add in Tailscale and I can pretty much remote in from anywhere and pickup work efficiently; It's just so gorgeous and an exceptional lightweight experience. Thank you! I would like to share one observation/bug from using different RDP clients. I have tested this with Apache Guacamole (freeRDP I believe) and multiple Android RDP clients and there's a recurring theme that when you connect, you can access the XRDP login screen, however after entering credentials the desktop does not render and just stays blacks. Something is happening on the screen, as the cursor changes when you move around, but it still stays black. I have aggressively played around with client RDP options, but have not had success. I am more than happy to troubleshoot and share any logs; I would appreciate any guidance on where or how to start looking to support identifying the underlying issue. Thank you again! |
Beta Was this translation helpful? Give feedback.
-
Hi, any news for Ubuntu noble? |
Beta Was this translation helpful? Give feedback.
-
Hello! Thanks again for all your work on this. I've been using it with Proxmox 8.2.2 and Intel iGPU passthrough to a Lubuntu 22.04 VM via SR-IOV. I've noticed that the only resolution available inside the VM via xrdp is 2048x1152 at 25 fps on rdp0 and rdp1 (I currently have dual monitors running in full screen on the client side, which is equipped with two LG Ultrafine 4K monitors). "Screen 0" is 4096 x 1152--I assume this is a dummy driver type thing to get the Xorg server to start properly before I log in. Is there a reason its locked to this resolution? I wanted to ask before I tried it in case the current resolution is a limitation of the current implementation of xrdp. |
Beta Was this translation helpful? Give feedback.
-
First of all, thank you for your work. Now I try to connect to xrdp using freerdp and enable nvidia's h264 encoding acceleration feature.
Looking at the log, there are several places where errors occur, xorgxrdpWrapPreIntScreenInit function and xf86EnableIO function. ps.
but I bypassed that by adding the user to the tty group and setting the tty permissions to group readable. Operating environment: ubuntu 22, xorg 21.1.4, dual graphics cards: intel card0, nvidia card1). |
Beta Was this translation helpful? Give feedback.
-
@akarl10 I am using Remmina and manage to connect my GCP VM. |
Beta Was this translation helpful? Give feedback.
-
Hello! Thanks again for this. I couldn't do any actual VDI work on my home Proxmox cluster without it (using an i7-12700T's iGPU with SR-IOV passthrough). :) I had a question. According to this issue, "GFX graphics" has been implemented into the mainline xrdp package v. 0.10.0: #1422 How does that compare to the xrdp-egfx package, which is at 0.2.22.20230831 in the PPA (Lubuntu variant, in my case, on 22.04 Jammy)? That is, would I get better performance/more bugfixes in mainline xrdp at this point, or am I still better off sticking with xrdp-egfx? This could also be a moot point, as Jammy doesn't offer mainline xrdp version 0.10... (I apologize if this is an obvious question. I tried looking at the currently extant issues tracking development, and got pretty confused.) |
Beta Was this translation helpful? Give feedback.
-
#1422 tracks the progress of the addition the new gfx pipeline.
news for ubuntu 24.04
since now most of this is upstream, I built a package based on devel for ubuntu 24.04. This package has software h264 only and no specific nvidia support. If you need that, it seems the 23.04 version still works under 24.04.
when upgrading check if
/etc/xrdp/sesman.ini
containsSessionSockdirGroup=xrdp
in the[Security]
sectionThe upgrade should convert old nvidia configuration so that the session starts. In doubt apt purge xrdp-egfx xorgxrdp-egfx, remove /etc/xrdp, /etc/X11/xrdp and reinstall both packages.
Even though the pulseaudio module is still provided, pipewire-module-xrdp should be used instead
original post
This is a huge undertaking that has mostly be done by only two developers. @Nexarian is currently preparing merge requests, step by step, but this will take some time. @jsorg71 has done most of the groundwork.
I made some experiments for myself and to make it easer to test it on different platforms (intel gpu, amd gpu, nvidia gpu, virgl) I made a ubuntu ppa. This is still a moving target, but if someone wants to try out what xrdp will feel like in the (hopefully near) future here is my own instruction for my test setup
egfx xrdp installation
The patched version uses another name to prevent conflicts with the ubuntu version of xrdp
you may switch between them by uninstalling xrdp and installing xrdp-egfx.
Currently for jammy and kinetic only. Based on https://github.com/Nexarian/xrdp/commits/mainline_merge and https://github.com/Nexarian/xorgxrdp/commits/mainline_merge
all commands are running in a root session. In doubt simply put a sudo in front of every line or start a root shell with
sudo -i or sudo -s (what you prefer)
clean install
apt-add-repository ppa:saxl/xrdp-egfx apt install xrdp-egfx xorgxrdp-egfx #optional apt install pulseaudio-module-xrdp
I higly recommend replacing configuration files with the new provided ones if asked.
You should reboot now since a udev rule is added that allows anyone to use /dev/dri/renderD*. This is needed for non-nvidia 3d accelleration
The specific file is
/usr/lib/udev/rules.d/90-xorgxrdp-dri.rules
Also xorgxrdp-egfx has a postinstall script that reconfigures sesman.ini for nvidia gpu if needed. Consequiently a restart of that service might be needed.
swap from xrdp to xrdp-egfx
apt purge xrdp xorgxrdp apt-add-repository ppa:saxl/xrdp-egfx apt install xrdp-egfx xorgxrdp-egfx #optional apt install pulseaudio-module-xrdp
swap back to xrdp from xrdp-egfx
tweaks
desktop selection
The desktop that gets launched is configured in
/etc/xrdp/sesman.ini
Look for the line
you can put every desktop listed in
/usr/share/xsessions
. Just put the name wihout .desktopIf you want to use this feature on a per user basis you could put something like
in ~/.profile
nvidia h264 hardware encoding
if you have a nvidia gpu you might enable hardware h264 encoding by editing
/etc/xrdp/sesman.ini
simply change the line at the near bottom from
# XRDP_USE_HELPER=1
toXRDP_USE_HELPER=1
multisession support and more consistent pulseaudio
you might try enabling multisession support. This way reduces possible conflicts if you somehow are logged in twice or more (ex. locally and via xrdp)
Currently to get audio in Ubuntu Kinetic you need this (or at least it is the easies way)
Essentially this makes a "subsession" in /run/user/UID/, spawns a matching dbus, pulseaudio and pipewire (that uses pulseaudio)
simply change the line at the near bottom of
/etc/xrdp/sesman.ini
from# XRDP_USE_MULTISESSION=1
toXRDP_USE_MULTISESSION=1
Should work with both plasma and gnome.
check out https://github.com/matt335672/nest-systemd-user
verify that it's working
gfx pipeline
You should immediatly see a big performance improvement when connecting with a modern rdp client.
mstsc should connect with gfx h264 while stock freerdp in ubuntu repositories only uses gfx rfx progressive
what codec is used you will see in
/var/log/xrdp.log
. Look for a line that saysor
desktop 3d and video
For 3d check if
glxinfo | grep renderer
outputs your gpu. In a plasma desktop session your taskbar's background should be transparent with a blur effect.For video check the output of
vainfo
.Note that ubuntu jammy's version of libva2 has a issue with intel gpu's that has been fixed since in kinetic (see intel/libva#582). As a workaround you might set an appropriate
LIBVA_DRIVER_NAME=
in/etc/xrdp/sesman.ini
in the[SessionVariables]
section.client side considerations
to get h264 in freerdp you must recompile it with ffmpeg enabled (ubuntu has disabled it because ffmpeg is not in main).
you should also get better performance when connecting to a windows rdp server
other changes from ubuntu xrdp
startwm.sh
changed if x-session-manager is gnome-session and start with the correct environment so that the ubuntu shell is started instead of the default gnome one
some modifications for my own XRDP_USE_MULTISESSION idea
polkit
a polkit (
/etc/polkit-1/localauthority/10-vendor.d/01-xrdp-rules.pkla
) rule is added. This prevents popups for network and color managementissues
nvidia uses lrandr since standard randr will not work there. This one is incomplete and for plasma this means the desktop shell does not respond to size changes. At least it shows the correct output in xrandr
the gfx rfx pro codec makes a "scanline" effect.
snap does not work fully in XRDP_USE_MULTISESSION mode (mainly sound and maybe open file dialog issues)
flatpak works tough
Beta Was this translation helpful? Give feedback.
All reactions