Xorg is slooow on the RPi4

First, thank you for what seems to be a great distro. I am very new to Manjaro and RPi but a long time Linux user on x86_64.

Using the 20.08 release, Xorg is horribly slow. glxinfo does show hardware acceleration, but it is very laggy, including keyboard and mouse use. There does not appear to be anything running in the background which would cause this. Using glxgears, I see around 20 fps on a 4k monitor, just horrible.

If I boot with Ubuntu 20.04 LTS, I see 200+ fps and all is good. I will dig deeper and find the cause but thought I would post here to see if others experiencing this issue?

In chasing this down… this will “fix” the issue.

$ pacman -S xf86-video-fbdev

Then edit /boot/config.txt and comment out the following:
#dtoverlay=vc4-fkms-v3d

And now reboot

I still need to resolve a monitor resolution issue but the lag is gone and
glxgears now reports above 300 fps. So fbdev is better than VC at the moment.

1 Like

If you are going that route you did not say if you changed the gpu_mem= value. It needs to be at least 320 and probably be better with 512 for that monitor. You did not say also if you had hdmi_enable_4kp60=1 set in config.txt for thaat monitor.

It was a fresh image with updates applied, stock settings. If those modifications will resolve the issue, I will be happy run with them. Unfortunately I will have to wait until tomorrow to try it as I do not have access to a 4k at home.

Thank you for the tips.

Yes, those modification worked. I now have full 4K resolution. Those combined with the fbdev driver change, and my RPi4 runs like a champ.

Thanks again!

Should I consider using the fbturbo driver on a RPi4, rather than fbdev?

fbturbo

Eh, I asked before taking a look in the Manjaro Repo. I would prefer to stay in the official repo when possible. And at this point, since it ain’t broke, don’t fix it.

1 Like

That is always a good plan. You can never go wrong. lol

I tried this but it stopped my pi from booting afterwards until I reverted the changes using my laptop. I installed the package and commented out the line in config.txt successfully, is there anything I may be missing?

Hmm, well… there could be, depending on what you may have modified. But commenting out dtoverlay=vc4-fkms-v3d in config.txt will prevent the VC video drivers from loading. Installing xf86-video-fbdev will supply the fbdev driver and it should load without any further configuration. Check /var/log/Xorg.0.log you should see messages concerning fbdev being loaded. If you see it is being loaded and then subsequently unloaded, it is finding a different video driver to load.

You are running Xorg and not Wayland, correct? This only works for Xorg.

Raspberry os 64bit is giving my 1000fps in glxgears

This is the glxinfo output.
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Broadcom (0x14e4)
Device: V3D 4.2 (0xffffffff)
Version: 19.3.2
Accelerated: yes
Video memory: 3609MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Broadcom
OpenGL renderer string: V3D 4.2
OpenGL version string: 2.1 Mesa 19.3.2
OpenGL shading language version string: 1.20
OpenGL extensions:

Whereas my manjaro arm unstable on rpi4 is giving out this
SGI_make_current_read
Extended renderer info (GLX_MESA_query_renderer):
Vendor: VMware, Inc. (0xffffffff)
Device: llvmpipe (LLVM 10.0.1, 128 bits) (0xffffffff)
Version: 20.1.8
Accelerated: no
Video memory: 7632MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 3.3
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.1, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.1.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:

I do not know what you have going on in your config.txt but you have xf86-video-fbturbo-git installed evidently for it to show “OpenGL renderer string: llvmpipe” instead of “OpenGL renderer string: V3D 4.2” So you have no gpu aceleration.

What should I do to resolve?

See /boot/overlays/README for all available options

gpu_mem=256
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_force_hotplug=1
hdmi_drive=2
hdmi_group=2
hdmi_mode=58

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

Change gpu_mem=256 to gpu_mem=64
Uninstall xf86-video-fbturbo-git and reboot.

What is your monitor’s resolution specs.

Its headless hence the force hdmi hotplug options

Ok i uninstalled that xorg package and now the glxgears is reporting 600+~ fps

Glxinfo shows videocore now , still 400fps slower than raspberry os 64bit

I do not think that glxgears reports right some times. As far as the Pi OS I have seen mis-reporting with labeling (as in what glxgears sees) in their forums in the past. If they have V3D rendering now I am not aware of it. They had not in the past. The frame rate you reported above is more in line with llvmpipe in what it reports.

So how much memory does your RPi4 have?

I you are asking me I have one with 4G and 1 with 8G.

1 Like

I have 2
4gb is running raspberry os64 sdcard, and 8gb running manjaro ssd