Ubuntu

Raspberry Pi4 on xrdp has screen tearing or distortion

January 10, 2024 · 2 min read

I use my Raspberry Pi4 as a home media server with Plex using Ubuntu Desktop. I use a large flash drive for content that needs me to login every time the machine reboots. I started running into a consistent issue where every login would be met with distortion that looked something like:

xrdp distortion on Raspberry Pi4

I had a difficult time searching for just what this could be and took a few different approaches that worked with mixed results:

  1. Installed a different window manager like xfce4 or kde-plasma

    1. This worked for a minute until it stopped. I have no clue what magic I did at first but I oddly prefer Gnome now.
  2. Created a new user.

    1. I'm not using the default user to begin with but my user jeremy was the only one on the system.
    2. This worked perfectly but it meant setting quite a bit up under the second user.
    3. I absolutely do not understand what in a new user is different to make this one option work consistently.
    4. See https://www.reddit.com/r/raspberry_pi/comments/qw1cdw/comment/huqutq1/?utm_source=share&utm_medium=ios_app&utm_name=iossmf&context=3
    5. See https://www.reddit.com/r/raspberry_pi/comments/176cz2u/raspberry_bookworm_xrdp_gpu_acceleration_issue/
  3. The approaches outlined in https://devicetests.com/fixing-xrdp-black-screen-issue-ubuntu including the installation script.

    1. I made some of these tweaks before as I had the blackscreen problem and I bit the bullet to reinstall xrdp on a whim.
    2. The updated installation script can be found at https://www.c-nergy.be/products.html.
    3. This did nothing and now I'm greeted with self-sign cert warnings every time I connect.

The solution I ended up going with was outlined in https://forums.raspberrypi.com/viewtopic.php?t=358088 as it works flawlessly for my current user, just as it was before whatever recent update broke it.

sudo nano /etc/X11/xrdp/xorg.conf

Find the line Option DRMDevice line and change it to

Option "DRMDevice" ""

reboot raspberry pi

This is one of the reasons I am not a fan of Linux on the desktop, even in 2024 nor do I think it passes the "grandma test." It was damn near impossible to search for this reliably and took me multiple days of searching over a few weeks. Grandma may have that kinda time because she's retired but I'm not, I need the shit to just work(tm). The Linux desktop experience has come a really long way from when I started working with it though.