4

I have an RPi 4 4GB and I'm running RPi 64bit OS from a NVME HD connected via USB.

When remoted in via VNC, everything is very slow. It takes about 10s to open the browser. I remote in using the local home network and the RPi is connected via WiFi.

From my on-line research, everybody always points the finger to the SD card, hence I'm trying an NVME drive.

These are my results from the hdparm utility:

pi@raspberrypi:~ $ sudo hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   1920 MB in  2.00 seconds = 960.75 MB/sec
 Timing buffered disk reads: read(2097152) returned 524288 bytes

I also checked that the RPi is not being throttled:

pi@raspberrypi:~ $ vcgencmd get_throttled
throttled=0x0

What else can I try to improve the VNC performances?

3
  • is remoted in via VNC local network or through the internet? is the pi connected wired or wifi? Feb 17, 2023 at 23:41
  • added details in the post. Local home network and the RPi is connected via WiFi.
    – guidout
    Feb 18, 2023 at 2:00
  • Can you confirm the output of hdparm, you haven't shown the actual buffered disk read speed - should also be in MB/sec - anyway, doubt it's the disk speed that is causing the issue. it's likely to be the wifi - have you tried wired connection? If that works fine then it would more or less show the issue is with wifi Feb 18, 2023 at 2:06

3 Answers 3

0

I would first take a look at the GPU settings: How much memory is allocated to your GPU? If the value is low, you can try to increase it to 128MB or 256MB - you can do that in raspi-config. You can also overclock or underclock your GPU, but the default settings should be OK for VNC ...

As for the network - wifi could be an issue. You can test your wifi speed with iperf3, for example, and you can test wifi latency by simply pinging the rpi - or pinging your PC from the rpi.

I would also make sure CPU and RAM resources are sufficient by running top/htop utilities. Your disk speeds are more than sufficient.

0

I assume you are using Bullseye [the latest Pi OS release]

Bullseye uses Weyland for its desktop which is really good, but also very slow when used remotely, via VNC or xRDP.

Helpfully, the old desktop is still there because Weyland does not play nice on < 4GB RAM.

If you mostly use your Pi remotely, as I do, you need to turn off Wayland, and the easiest way is:

  1. sudo nano /usr/bin/startlxde-pi
  2. find and change 2048 [there is only one] to something really big, for example 992048

What this is doing is if RAM > 2048 then use Weyland, else use not-Weyland.

I simply change it so that it always uses not-Weyland regardless of the amount of Ram

1
  • Maybe that was true in Bullseye, but in Bookworm Wayland is no slower than X11 (and you can switch between them). Jan 23 at 19:28
0

I had a problem of VNC suddenly becoming slow (for no apparent reason), after which no amount of restarting helped. What did help is to force HDMI to be on with no display attached (which is how I always use my Pi). Add this to cmdline.txt:

video=HDMI-A-1:1600x900@60D

This doesn't explain why VNC suddenly became super slow, but at least it makes it not slow. You can obviously edit the mode, or use "screen configuration" to change it from GUI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.