insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

RasPi 4 is on RDP slower than the RasPi 3

Fri Aug 23, 2019 10:31 am

Hi Guys,
I already have 20 of the RPi3 at work as a replacement for HP ThinClient.

Works wonderfully, costs only a fraction of a "real" thin client of e.g. HP and is also faster in the configuration.

Now I have bought a RPi4 (4GB), because more and more colleagues use two monitors, which is not possible with the RPi3.
What I noticed right now is that the RPi4 itself is faster than the RPI3, where the RemoteDesktop task is inferior to the "old one". Even on the RPi2 it worked better.

With the RPi3, there is absolutely no jerking or line building during the RDP session. The picture is really there immediately, as if I would not access the server by RDP, but sit directly in front of it and that even over WLAN or good InterNet connection.


On the RPi4 I have to use because of the "/ multimon" feature "xfreerdp-x11". The image structure is horrible and in comparison to what I know of the RPi3 not reasonable. How to use over a slow 1MBit internet connection. Lines / blockwise screen layout.

Also the program used on the RPi3 "rdesktop" (unfortunately without /multimon) builds up the picture just as slowly.

I have set up the GPU as on the RPi3 whole 512MB memory. Unfortunately with the same effect.

My assumption is that the operating system (Buster) has to do with it.

Has anyone similar experience or ideas on i can set the PRi4 (as RDP client) to runs it just as fast as on the RPi3?


Thank you :-)

ejolson
Posts: 10966
Joined: Tue Mar 18, 2014 11:47 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Fri Aug 23, 2019 3:43 pm

insidERR wrote:
Fri Aug 23, 2019 10:31 am
My assumption is that the operating system (Buster) has to do with it.
Buster is an interesting theory. I would have suspected the vc6 video.

Have you tried pulling the SD card out of the Pi 4 and placing it in a Pi 3 to check? It should just work.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6505
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RasPi 4 is on RDP slower than the RasPi 3

Fri Aug 23, 2019 3:49 pm

Can you try disabling fkms driver on Pi4 (or enabling it on Pi3)?

User avatar
pi-tastic
Posts: 173
Joined: Mon Jul 29, 2019 6:34 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Fri Aug 23, 2019 4:44 pm

are you using xrdc/krdc
maccaps.com - bringing life to dead electronics.

tulsti
Posts: 2
Joined: Fri Aug 23, 2019 7:46 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Sun Aug 25, 2019 10:57 am

I had a simlar effect when using the gl (fake kms).
Using xfreerdp with the switch "/gdi:hw" all seems fine and it works fast. But I am also connected with gigabit-ethernet to my server.

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Aug 26, 2019 6:12 am

ejolson wrote:
Fri Aug 23, 2019 3:43 pm
insidERR wrote:
Fri Aug 23, 2019 10:31 am
My assumption is that the operating system (Buster) has to do with it.
Buster is an interesting theory. I would have suspected the vc6 video.

Have you tried pulling the SD card out of the Pi 4 and placing it in a Pi 3 to check? It should just work.
Hi ejoslon
It was a good advice/idea. Thank you :-)
I put the SD card (with Buster) into a Pi3 and it runs fast like expected (like i want it to run).
Bur what should i do to make it it runs on the Pi4 the same speed? Dis/enable some drivers?

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Aug 26, 2019 6:14 am

dom wrote:
Fri Aug 23, 2019 3:49 pm
Can you try disabling fkms driver on Pi4 (or enabling it on Pi3)?
Hi dom,
thank you for your reply.
Could you pls explain how to do this?

User avatar
bertlea
Posts: 313
Joined: Wed Dec 07, 2016 6:33 am
Location: Hong Kong

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Aug 26, 2019 6:48 am

@insidERR, I think dom meant you use the command “sudo raspi-config” and go to “Advanced Options” --> “GL Driver” and select “Legacy” driver and then press “<Ok”>… Then reboot.

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Aug 26, 2019 8:08 am

bertlea wrote:
Mon Aug 26, 2019 6:48 am
@insidERR, I think dom meant you use the command “sudo raspi-config” and go to “Advanced Options” --> “GL Driver” and select “Legacy” driver and then press “<Ok”>… Then reboot.
Hi bertlea,
thanks for your comment. You're right :-)
I've never used the Legavy driver before.

It actually makes RDP faster(runs like on the Pi3) but now i have only one screen. The possibility to use two screens is the only reason i want to use the Pi4.

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Aug 26, 2019 9:55 am

tulsti wrote:
Sun Aug 25, 2019 10:57 am
I had a simlar effect when using the gl (fake kms).
Using xfreerdp with the switch "/gdi:hw" all seems fine and it works fast. But I am also connected with gigabit-ethernet to my server.
Hi tulsti,
thank you for your reply.
It's runs faster with "/gdi:hw"
My problem is now when i connect to "Windows Server 2008 R2" the connection close immediately every time i start "MS Access"
Error:
[11:50:05:404] [1338:1339] [INFO][com.freerdp.gdi] - Local framebuffer format PIXEL_FORMAT_BGRX32
[11:50:05:404] [1338:1339] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
[11:50:06:550] [1338:1339] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
[11:50:06:056] [1338:1339] [INFO][com.freerdp.client.x11] - Logon Error Info SESSION_ID [LOGON_MSG_SESSION_CONTINUE]
[11:50:16:388] [1338:1339] [ERROR][com.freerdp.client.x11] - Unsupported ROP3: 0x00C000CA
[11:50:16:388] [1338:1339] [WARN][com.freerdp.core.update] - Primary Drawing Order [0x0e] Mem3Blt failed
[11:50:16:388] [1338:1339] [ERROR][com.freerdp.core.update] - order flags 4d failed
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.core.fastpath] - Fastpath update Orders [0] failed, status 0
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.core.fastpath] - fastpath_recv_update() - -1
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.core.fastpath] - fastpath_recv_update_data() fail
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -3
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.core] - freerdp_check_fds() failed - 0
[11:50:16:389] [1338:1339] [INFO][com.freerdp.client.common] - Network disconnect!
[11:50:16:389] [1338:1339] [ERROR][com.freerdp.client.x11] - Failed to check FreeRDP file descriptor


But when i connect to Server 2016, it works fine. Strange...

User avatar
billybangleballs
Posts: 191
Joined: Fri May 18, 2012 11:28 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Aug 27, 2019 10:02 am

I use rdesktop and I agree the RPi4 is painful to watch as it redraws the screen line by slow line.
It definitely runs much faster using the Legacy driver.
By 'runs' I mean the screen updates faster than the zx81 speed I've been struggling with all week.

It also cured my lack of cursors, I now have a flashing vertical line indicating where the next character is going to appear.
Grumpy old man.
Ex-G0KAP - I'd rather be doing it than talking about it.
"When found, make a note of." - Captain Cuttle

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Aug 27, 2019 10:20 am

Maybe it is too early to buy a Pi4.
The drivers are apparently not ready to use the full potential of the hardware. Hope the right programmer picks the problem on the todo list of developers.
The Pi is a great invention. Use it since the first generation at work and at home.

velis
Posts: 9
Joined: Wed Sep 26, 2018 8:35 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Aug 27, 2019 11:32 am

I can confirm similar issues for me as well. Using Remmina on stock raspbian, as it comes with the demo kit (2GB RAM in my case)

The Pi is annoyingly slow refreshing (no significant CPU usage or network usage to speak of) in comparison to the other zero clients I have here in the office.

Remmina installed via apt, no special hacks or versions. RPi freshly installed from noobs and only rebooted. no special settings changed anywhere.

mind2cloud
Posts: 1
Joined: Wed Aug 28, 2019 1:58 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Wed Aug 28, 2019 2:05 pm

Hi i simiar problem with a rpi 4 with multimon , works with xfreerdp graphics HW , but te scrrens move very slow .

Did you find any solution?

User avatar
billybangleballs
Posts: 191
Joined: Fri May 18, 2012 11:28 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Wed Aug 28, 2019 2:28 pm

mind2cloud wrote:
Wed Aug 28, 2019 2:05 pm
Hi i simiar problem with a rpi 4 with multimon , works with xfreerdp graphics HW , but te scrrens move very slow .

Did you find any solution?
Did you ditch the experimental driver and go back to the legacy driver?

Code: Select all

sudo raspi-config
7 Advanced Options     Configure advanced settings 
A7 GL Driver         Enable/Disable experimental desktop GL driver 
G1 Legacy        Original non-GL desktop driver  
The G2 GL (Fake KMS) OpenGL desktop driver with fake KMS driver doesn't seem fit for purpose and was creating a multitude of issues for me, one of which was a screen update speed slightly slower than that of a ZX81.
Grumpy old man.
Ex-G0KAP - I'd rather be doing it than talking about it.
"When found, make a note of." - Captain Cuttle

villalvilla
Posts: 2
Joined: Tue Sep 17, 2019 9:52 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Sep 17, 2019 9:58 am

Hi insidERR,

We are also using Raspberry pi 3 in our classrooms. We are using wtware and also tested rpi3 with xfreerdp. Our main problem is with video. Is great to know that you managed to get RPI3 working flawlessly. Would you mind to share your tuning with me? I'm getting sick and tired about RDP problems with video playing. We are using windows 2019, that uses avc444 as default with GPU enhacement, but we cannot make it work with the rpi3 GPU stuff.

Thanks in advance for your help

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Mon Sep 23, 2019 8:47 am

villalvilla wrote:
Tue Sep 17, 2019 9:58 am
Hi insidERR,

We are also using Raspberry pi 3 in our classrooms. We are using wtware and also tested rpi3 with xfreerdp. Our main problem is with video. Is great to know that you managed to get RPI3 working flawlessly. Would you mind to share your tuning with me? I'm getting sick and tired about RDP problems with video playing. We are using windows 2019, that uses avc444 as default with GPU enhacement, but we cannot make it work with the rpi3 GPU stuff.

Thanks in advance for your help
Hi villalvillal,
sorry for the delay. I was on holidays.

On the Rpi3 i use "rdesktop" with this options: -f -z -x 0x80
Connect to Windows Server 2008R, 2016 and Windows 10 Pro.
The GPU-memory is set up to: 512 MB We use it to work with M$ Office (Word, Excel, Outlook) and to show some PDF(CAD-drawing), not to play videos.

roms2000
Posts: 4
Joined: Mon Sep 23, 2019 8:09 pm

Re: RasPi 4 is on RDP slower than the RasPi 3 - and dual screen setup with legacy drivers

Mon Sep 23, 2019 8:38 pm

I did have the same slow problem with rpi4. Screens update were lagging and terribly slow with FreeRDP on Rpi4 .

What I did, was to switch to the legacy driver like some users said before :

Code: Select all

sudo raspi-config
  • select "7 Advanced Options"
  • select "A7 GL Driver"
  • select "G1 Legacy"
  • then reboot.
To enable dual screen, I have created this file /usr/share/X11/xorg.conf.d/60-dualscreen.conf :

Code: Select all

#
# Configuration double ecran pour Raspberry Pi 4 et les drivers "Legacy"
# The order of precedence is Display, Screen, Monitor, Device.
# 
Section "Device"
        Identifier      "Rpi4 HDMI1"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb0"
        Option          "ShadowFB" "off"
        Option          "SwapbuffersWait" "true"
EndSection

Section "Device"
        Identifier      "Rpi4 HDMI2"
        Driver          "fbturbo"
        Option          "fbdev" "/dev/fb1"
        Option          "ShadowFB" "off"
        Option          "SwapbuffersWait" "true"
EndSection

Section "Monitor"
        Identifier      "HDMI1"
        Option          "Primary" "true"
EndSection

Section "Monitor"
        Identifier      "HDMI2"
        Option          "LeftOf" "HDMI1"
EndSection

Section "Screen"
        Identifier      "screen0"
        Device          "Rpi4 HDMI1"
        Monitor         "HDMI1"
EndSection

Section "Screen"
        Identifier      "screen1"
        Device          "Rpi4 HDMI2"
        Monitor         "HDMI2"
EndSection

Section "ServerLayout"
        Identifier      "default"
        Option          "Xinerama" "on"
        Option          "Clone" "off"
        Screen 0        "screen0"
        Screen 1        "screen1" RightOf "screen0"
EndSection

Reboot, and voila ! Dual Screen :)
For now, this work well if LCD is attached to HDMI1 only (single screen) or to both HDMI1 and HDMI2 (dual screen).
If attached to HDMI2 only, you get a dual screen setup but HDMI is off or unusable.
In case of problem with screen / xorg, remove the created file and reboot again.

For RDP, we are using FreeRDP Git version 2da425a - because, after this version, we have some problem with /gfx-h264 which is very slow with rpi.
Command line for FreeRDP is this one :

Code: Select all

xfreerdp /f /sec:rdp /d:MYDOMAIN /u:"" /p:"" /sound:sys:alsa,format:1,quality:high /rfx /gfx /gfx-h264 /multitransport /network:auto -bitmap-cache -glyph-cache /gdi:hw -fonts /v:SERVERNAME /multimon:force
/multimon:force is need to force and present multimonitor to server.

Our config for GPU memory on rpi3 and rpi4 are set to : 128M. I don't know if it is usefull to set more than that.

Hope all this info may help :)

insidERR
Posts: 9
Joined: Fri Aug 23, 2019 6:09 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Sep 24, 2019 9:08 am

Hi roms2000,
you're my hero :-)

That is the perfect sollution for me :!:

Now it works exactly like it should run.
I use "xfreerdp -f /multimon /v:SERVER-IP /d:DOMAIN /u:USERNAME /sec:tls" with the last version of freerdp and it works fine.
/sec:tls is to show the windows log-in screen instead of typing the password into the console.

roms2000
Posts: 4
Joined: Mon Sep 23, 2019 8:09 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Sep 24, 2019 11:58 am

Nice that I can help you ;)
insidERR wrote: /sec:tls is to show the windows log-in screen instead of typing the password into the console.
This is what I need to move from /sec:rdp : It's time to me to say, Thanks you insidERR :D

villalvilla
Posts: 2
Joined: Tue Sep 17, 2019 9:52 am

Re: RasPi 4 is on RDP slower than the RasPi 3

Tue Sep 24, 2019 4:34 pm

Hi InsiDERR and roms2000,

Thanks for your great feedback on this. As I supected, we will have to wait more time for videos to work as expected. Time goes by, but only legacy drivers seem to work more or less with "decent" acceleration. After some investigation, I found this tunning for android: https://konstakang.com/devices/rpi3/LineageOS16.0/

After testing microsoft's rdp client and video stuff in raspberry pi 3b+, I can say that it works flawlessly. In the greetings, the guy that posted it says that it is working based on VC4 using Mesa 19.1, so similar port might be done for raspbian in order to obtain hw acceleration in 3b+ and 4, but who knows. From my point of view, GPU is not really being used by xfreerdp, so that is why we get lags while video playing.

Another problem that we are detecting is that xfreerdp is not using RDP10, so our windows 2019 server doesn't use its dedicated GPU (tesla k10). That is another handycap...

Can anyone help on this, please?

Thank you very much guys!

GuilhermeFreire
Posts: 2
Joined: Tue Nov 12, 2019 5:41 pm

Re: RasPi 4 is on RDP slower than the RasPi 3 - and dual screen setup with legacy drivers

Tue Nov 12, 2019 5:47 pm

roms2000 wrote:
Mon Sep 23, 2019 8:38 pm
For RDP, we are using FreeRDP Git version 2da425a - because, after this version, we have some problem with /gfx-h264 which is very slow with rpi.
Command line for FreeRDP is this one :

Code: Select all

xfreerdp /f /sec:rdp /d:MYDOMAIN /u:"" /p:"" /sound:sys:alsa,format:1,quality:high /rfx /gfx /gfx-h264 /multitransport /network:auto -bitmap-cache -glyph-cache /gdi:hw -fonts /v:SERVERNAME /multimon:force
/multimon:force is need to force and present multimonitor to server.

Our config for GPU memory on rpi3 and rpi4 are set to : 128M. I don't know if it is usefull to set more than that.

Hope all this info may help :)
Man, you are about to save me, just lend me a hand in one detail (for the dumb windows user that I'm).

How can I install this specific version from git. like I never installed something from the command line before, and reading about looks like I need to have a git account, clone (?) this, then download from the command line (?) and flatpack (????)

how can I install from the link that you send?

n4p
Posts: 3
Joined: Sun Nov 24, 2019 2:36 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Sun Nov 24, 2019 2:44 pm

Hi,
i am currently struggling with the same Problem. The Performance from RDP with the RP4 is really poor :(
Videos with 720p stuck and generates a lot of ethernet throughput. (20Mbit or more)

Would you be so fine and tell us what cmake parameters you have used to compile the version above?

Thanks in advance!

roms2000
Posts: 4
Joined: Mon Sep 23, 2019 8:09 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Sun Nov 24, 2019 4:56 pm

For GuilhermeFreire and n4p, here is my bash script to compile FreeRDP for Pi4 :

Code: Select all

#!/bin/bash
export CFLAGS="-O2 -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -pipe"
export CXXFLAGS="-O2 -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -pipe"
export PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
NCPU=4
MAKEOPTIONS="-j 2 -l 2.5"
make() {
                /usr/bin/make $MAKEOPTIONS $@
}
if [ ! -e "/home/root/freerdp" ] ; then mkdir -p "/home/root/freerdp" ; fi
cd 
git clone https://github.com/FreeRDP/FreeRDP.git
cd FreeRDP
git pull
git reset --hard 2da425a
sed -i 's|{ "floatbar", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "floatbar in fullscreen mode" }|{ "floatbar", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "floatbar in fullscreen mode" }|g' client/common/cmdline.h
sed -i 's|settings->Floatbar = TRUE|settings->Floatbar = FALSE|g' libfreerdp/core/settings.c
perl -0 -p -i -e 's|(#ifdef.+TCP_USER_TIMEOUT.+optval\s*=)\s*[0-9]+\s*(;.+#endif)|\1 16000 \2|smg' libfreerdp/core/tcp.c
rm -rf "build-rpi4" ; sleep 1
mkdir "build-rpi4"
cd "build-rpi4"
make clean
cmake ..                -DCMAKE_C_FLAGS="${CFLAGS}"             -DCMAKE_CXX_FLAGS="${CXXFLAGS}"                         -DCMAKE_BUILD_TYPE=Release -DWITH_X11=ON -DWITH_XI=ON -DWITH_XV=ON -DWITH_XCURSOR=ON -DWITH_XFIXES=ON                         -DWITH_XKBFILE=ON -DWITH_PCSC=ON -DBUILD_SHARED_LIBS=ON -DWITH_CHANNELS=ON -DWITH_CHANNELS_PRINT=ON                         -DWITH_SERVER=OFF -DWITH_CLIENT=ON -DWITH_PULSE=OFF -DWITH_ALSA=ON -DWITH_CUPS=OFF                         -DWITH_FFMPEG=OFF -DWITH_DSP_FFMPEG=OFF                         -DCHANNEL_URBDRC_CLIENT=ON -DWITH_DIRECTFB=OFF -DWITH_XINERAMA=ON -DWITH_CUNIT=OFF -DWITH_JPEG=ON                         -DWITH_IPP=OFF -DWITH_NPP=OFF -DWITH_MANPAGES=OFF -DWITH_SAMPLE=OFF                         -DWITH_NEON=ON -DARM_FP_ABI=hard -DWITH_SSE2=OFF                         -DWITH_OSS=OFF -DBUILTIN_CHANNELS=OFF -DWITH_OPENH264=ON -DWITH_X264=OFF -DWITH_MEDIA_FOUNDATION=ON                         -DWITH_LIBAVCODEC=ON -DWITH_GSTREAMER_0_10=OFF -DWITH_GSTREAMER_1_0=ON -DWITH_GSM=ON                         -DWITH_WAYLAND=ON -DCHANNEL_GEOMETRY=ON -DCHANNEL_GEOMETRY_CLIENT=ON    && make && make install && echo OK
ldconfig

n4p
Posts: 3
Joined: Sun Nov 24, 2019 2:36 pm

Re: RasPi 4 is on RDP slower than the RasPi 3

Sun Nov 24, 2019 7:49 pm

Thanks for your script.
It requires openh264 what was missing before on my pi, just for info.

Seems it works a little bit better, but no way to compare this with citrix receiver or something. So my question, is there still anything wrong, or is this max from the raspberry?

Videos/youtube still stucks sometimes... and traffic is really high.

For Info: Currently i connect to a windows 10 machine, especually this is the problem?

Kind regards

Return to “General discussion”