Sunday, August 6, 2023

Linux - (X)Ubuntu - RDP-session crashes with xfreerdp & xrdp

TLDR:

If you RDP into a Linux/Xubuntu/Ubuntu PC and you always need two attempts to 'get in' and then the session constantly crashes,

try adding your RDP user to the 'render' group on the remote machine.

That fixed all problems for me.

 -------------------

I recently set up a new NAS/file-server with Xubuntu 22.04 Jammy Jellyfish.

The RDP host was a Seeedstudio reServer with an Intel Tiger Lake Core i3-1125G4 running the standard xrdp installation from the repos.

Whenever I connected to it with xfreerdp it would show a black window for a short time and then the window would vanish.

On the second try it would open a session correctly. But eventually, often when I clicked through some levels of directories in Thunar file manager, the session would crash. And I mean really crash, any commands running in a terminal session on the remote PC would be ended and a new attempt at RDP-ing in would give me a new 'fresh' session.


I searched a lot and tried a lot of things that were recommended, trying the xrdp install script from here

https://c-nergy.be/blog/?p=17994

to get the newest version, added an ~/.xsession file with recommended content and a lot of other things. Nothing helped.

Since I had already an AMD based remote machine running (with Xubuntu 20.04 Focal Fossa) without problems for many years I figured I'll look to see if there are any different drivers for the integrated Intel graphics.

I found this page

https://dgpu-docs.intel.com/driver/installation.html#ubuntu-install-steps

where, apart from a new repository with new Mesa and driver files I saw the mention of this

"In order to access GPU capabilities, the active user must be able to access DRM render nodes in /dev/dri."

So I thought I'll try that first before I screw around more with setup and config changes.

Added my RDP user to the 'render' group on the server and started a new xfreerdp session. Tried everything I had done before to make it crash, it didn't.

Has been stable for days now, never crashed.

And I get an RDP login on the first attempt.

So there.

I don't know why it works and I don't care.

I already spent so much time investigating this problem I won't spend any more time on finding out why it works.

No comments:

Post a Comment