Wayland Linux 5.2 Gnome3 on Rockpi4!

Seriously I kid you not and if you can not be bothered with DiY the below is an image I will keep updating as things improve
https://1drv.ms/u/s!AocmAh35i26QiUjEeJEX4zboMH1X
The image above has got a bit fat with me themeing Adapta and various bits but the default below is still quite slim.

Start with Manjaro minimal as this gives us all the latest packages of Arch and much of the hard work of the RockPi4 image has been done for us.

Currently its running 5.1 but after a sudo pacman -Syu a full update/upgrade will take us to 5.2
5.2 has some boot delays that also seemed to escape the 5.2 window so we will have to put up with them.
What is great though is Manjaro run RC versions and when 5.3-rc1 is in the wild we can upgrade through pacman and hpefully incrementally see the end of a couple of bugs.
5.2 and Mesa 19.1.2 still have some problems dunno but they seemed to miss the window so we are going to jump ahead and grab the current master which is mesa 19.2.0-devel
First we will install Gnome as the default is wayland and it will cut down the libs we need for the mesa build

sudo pacman -S gnome  gnome-software-packagekit-plugin gnome-nettool archlinux-appstream-data 

Then we build the latest and most working mesa

sudo pacman -S bc python-pip flex bison base-devel ncurses cmake xorg-util-macros git valgrind llvm
sudo pip install scikit-build mako
# Install scikit-build mako first before meson ninja
sudo pip install meson ninja
git clone https://gitlab.freedesktop.org/mesa/mesa.git -b master
cd mesa
mkdir build
meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dprefix=/usr build/
ninja -C build/
sudo ninja -C build/ install
sudo systemctl enable gdm.service
sudo reboot

Apart from annoying boot delays enjoy and play!

If you have a 2gb RockPi4 use zram and even if you have more.

git clone https://github.com/StuartIanNaylor/zram-config
cd zram-config
sudo sh install.sh
nano /etc/ztab

I have 2gb if 4gb just double the mem_limit and resultant disk_size (2000M 6000M)

# swap  alg     mem_limit       disk_size       swap_priority   page-cluster    swappiness
swap    lzo-rle 1000M           3000M           75              0               1000

# dir   alg     mem_limit       disk_size       target_dir              bind_dir
#dir    lz4     50M             150M            /home/pi                /pi.bind

# log   alg     mem_limit       disk_size       target_dir              bind_dir                oldlog_dir
#log     lzo-rle 50M             150M            /var/log                /log.bind               /opt/zram/oldlog

sudo reboot
If not anything else you can test out the new lzo-rle compression supposed to be extremely light and fast.
Mem_limit is the max allocated to zram disk size is harder as its a virtual size so we are expecting approx 3:1 compression

[rock@rockpi4 ~]$ zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle         3G 27.7M  8.4M 11.7M       6 [SWAP]
[rock@rockpi4 ~]$ free -h
              total        used        free      shared  buff/cache   available
Mem:          1.9Gi       393Mi       503Mi       779Mi       1.1Gi       783Mi
Swap:         2.9Gi        29Mi       2.9Gi

With wayland you can run gtk+ apps and ones that use clutter/clutter_gtk with
GDK_BACKEND=wayland gnome-calculator for GTK+ apps like gnome-claculator or
GDK_BACKEND=wayland CLUTTER_BACKEND=wayland cheese for clutter apps like cheese
To be honest I am a bit bemused if an app needs it or not basically if it crashes on run try the above
Edit the desktop files in /usr/share/applications to suit.

Your last image didnt boot on my rockpi4. Ive tested kde with the idea of switching to wayland… Anyway, the lack of wifi on these manjaro builds ( even my usb wifi device wont work) prevent me to try out this amazing work. I will wait some more months.

I haven’t looked since 5.2 but 5.2.1 is out but it still has some really big boot delays so likely that as it was booting fine.
To be honest I got a bit carried away with Gnome and it runs smooth but I went a bit crazy with theming, Adapta theme and various bits and actually you really notice it.
Strangely Panfrost seems to be running OpenGL faster via X11 and doesn’t have all the app compatibility problems.
I haven’t really tested so could be wrong but the Manjaro images on 5.2.1 are working fine the above was built as soon as 5.2 was released but fixes where quickly released in 5.2.1 and it was the kernel not Manjaro.
Manajaro are going to stick mainline but there is a DTS error where the top USB is set to OTG so if testing USB make sure its not that port.
The WiFi/BT is the crappy Broadcom chip that was on the Pi3 that has been sold and repackaged several times now and now called APxxxx something.
It always had problems with BT & Wifi running at the same time and the sdio always needed tweaks dunno if these have been done or not.
I know its working but after time fails and a likely quick fix is just to disable the BT.
I am waiting for 5.3 as there are a huge rake of patches in there that are more related to the kernel than the Rockpi that should solve the boot delay but if testing get a serial console and check the output of why it isn’t booting.
5.3 is prob 2 month way minus a couple of days, but those fixes are likely to turn up into 5.2 as even though released in certain aspects still seems slightly broken.
So not really sure current Manjaro is the same as they released with 5.1 it needs a pacman -Syu for update and a reboot.
I would actually stick with X11 for now as I am totally bemused that performance seems to be better than wayland by about 30%!

1 Like

Extremely glad to read such an answer. Ok, I will keep trying! Very good info!! My usb wifi works, but doesnt get internet to work. Its reled to atheros drivers I think… 2019 and even old wifi devices are still problematic. Doesnt matter.

I did some testing against my Pi4 and the results are excellent with Panfrost and that is before optimisation.

Pi4

pi@raspberrypi:~ $ glmark2-es2
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     Broadcom
    GL_RENDERER:   V3D 4.2
    GL_VERSION:    OpenGL ES 3.0 Mesa 19.1.0-devel
=======================================================
[build] use-vbo=false: FPS: 201 FrameTime: 4.975 ms
[build] use-vbo=true: FPS: 198 FrameTime: 5.051 ms
[texture] texture-filter=nearest: FPS: 184 FrameTime: 5.435 ms
[texture] texture-filter=linear: FPS: 185 FrameTime: 5.405 ms
[texture] texture-filter=mipmap: FPS: 186 FrameTime: 5.376 ms
[shading] shading=gouraud: FPS: 193 FrameTime: 5.181 ms
[shading] shading=blinn-phong-inf: FPS: 185 FrameTime: 5.405 ms
[shading] shading=phong: FPS: 168 FrameTime: 5.952 ms
[shading] shading=cel: FPS: 163 FrameTime: 6.135 ms
[bump] bump-render=high-poly: FPS: 166 FrameTime: 6.024 ms
[bump] bump-render=normals: FPS: 186 FrameTime: 5.376 ms
[bump] bump-render=height: FPS: 180 FrameTime: 5.556 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 140 FrameTime: 7.143 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 97 FrameTime: 10.309 ms
[pulsar] light=false:quads=5:texture=false: FPS: 183 FrameTime: 5.464 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 62 FrameTime: 16.129 ms
[desktop] effect=shadow:windows=4: FPS: 141 FrameTime: 7.092 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 141 FrameTime: 7.092 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 138 FrameTime: 7.246 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 157 FrameTime: 6.369 ms
[ideas] speed=duration: FPS: 262 FrameTime: 3.817 ms
[jellyfish] <default>: FPS: 137 FrameTime: 7.299 ms
[terrain] <default>: FPS: 20 FrameTime: 50.000 ms
[shadow] <default>: FPS: 112 FrameTime: 8.929 ms
[refract] <default>: FPS: 40 FrameTime: 25.000 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 205 FrameTime: 4.878 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 174 FrameTime: 5.747 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 196 FrameTime: 5.102 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 187 FrameTime: 5.348 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 167 FrameTime: 5.988 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 185 FrameTime: 5.405 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 177 FrameTime: 5.650 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 129 FrameTime: 7.752 ms
=======================================================
                                  glmark2 Score: 158 
=======================================================

Rockpi4

[rock@Manjaro mesa]$ glmark2-es2
=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     panfrost
    GL_RENDERER:   panfrost
    GL_VERSION:    OpenGL ES 2.0 Mesa 19.2.0-devel (git-8c5692b696)
=======================================================
[build] use-vbo=false: FPS: 250 FrameTime: 4.000 ms
[build] use-vbo=true: FPS: 410 FrameTime: 2.439 ms
[texture] texture-filter=nearest: FPS: 431 FrameTime: 2.320 ms
[texture] texture-filter=linear: FPS: 371 FrameTime: 2.695 ms
[texture] texture-filter=mipmap: FPS: 442 FrameTime: 2.262 ms
[shading] shading=gouraud: FPS: 351 FrameTime: 2.849 ms
[shading] shading=blinn-phong-inf: FPS: 351 FrameTime: 2.849 ms
[shading] shading=phong: FPS: 317 FrameTime: 3.155 ms
[shading] shading=cel: FPS: 301 FrameTime: 3.322 ms
[bump] bump-render=high-poly: FPS: 229 FrameTime: 4.367 ms
[bump] bump-render=normals: FPS: 450 FrameTime: 2.222 ms
[bump] bump-render=height: FPS: 427 FrameTime: 2.342 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 338 FrameTime: 2.959 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 169 FrameTime: 5.917 ms
[pulsar] light=false:quads=5:texture=false: FPS: 463 FrameTime: 2.160 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 37 FrameTime: 27.027 ms
[desktop] effect=shadow:windows=4: FPS: 287 FrameTime: 3.484 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 121 FrameTime: 8.264 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 127 FrameTime: 7.874 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 256 FrameTime: 3.906 ms
[ideas] speed=duration: FPS: 41 FrameTime: 24.390 ms
[jellyfish] <default>: FPS: 239 FrameTime: 4.184 ms
[terrain] <default>: FPS: 12 FrameTime: 83.333 ms
Error: DepthRenderTarget::setup: glCheckFramebufferStatus failed (0x8cdd)
Error: Failed to set up the render target for the depth pass
[shadow] <default>: Set up failed
Error: DistanceRenderTarget::setup: glCheckFramebufferStatus failed (0x8cdd)
Error: Failed to set up the render target for the depth pass
[refract] <default>: Set up failed
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 376 FrameTime: 2.660 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 359 FrameTime: 2.786 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 463 FrameTime: 2.160 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 393 FrameTime: 2.545 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 358 FrameTime: 2.793 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 401 FrameTime: 2.494 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 403 FrameTime: 2.481 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 117 FrameTime: 8.547 ms
=======================================================
                                  glmark2 Score: 299 
=======================================================
2 Likes

Just GL ES profile? Not full profile?

Btw, why its just gl es 2 on rockpi4

That is what Mesa & Collabora are aiming to complete first, rk3399 is an embedded/android platform opengl es is the norm.

Two of the more significant differences between OpenGL ES and OpenGL are the removal of the glBegin … glEnd calling semantics for primitive rendering (in favor of vertex arrays) and the introduction of fixed-point data types for vertex coordinates and attributes to better support the computational abilities of embedded processors, which often lack an FPU

1 Like

Ok, a bit disapointing, but its too early for this driver. Hope than they get full profile on some point. I am on ethernet updating everything on kde. Its x11 for now. I will give it a shoot on x11 (based on your experiences) .

There is a lot of software than only accepts full profile.

Such as? Out of interest?

Hey, just updated everything and now everythings work. Wifi, sound… Great.

1 Like

For some reason after installing panfrost mesa it keeps displaying mesa 19.1 on glxinfo.
How should be the line “sudo systemctl enable gdm.service” on a kde envirionment ?? Its sddm on kde but I dont think its related to my problem… I will try it anyway.

Ive tried glmark2 on mea 19.1.2 ( dont know why) and the result its 62 on x11 hahahah so, 19.2 its a very good improvement.

Its not 19.1.2 its prob the initial 5.1 kernel I can not remember if it loads fbturbo or the llvm driver but yeah compared to panfrost it sucks.
I wouldn’t actually bother with the above, as Manjaro already to a complete KDE and its a great image I was purely testing Gnome as generally people say its too much for a SBC Arm SoC and was pleasantly surprised.

Grab KDE https://osdn.net/projects/manjaro-arm/storage/rockpi4/kde/19.06/
Lxqt https://osdn.net/projects/manjaro-arm/storage/rockpi4/lxqt/19.06/
Minimal https://osdn.net/projects/manjaro-arm/storage/rockpi4/minimal/19.06/

sudo pacman -Syu is an arch apt-get update && apt-get upgrade
pacman -Ss fbturbo will search packages and also tell you if its installed
pacman -R [package] will remove that package

If fbturbo is installed remove to force the KMS panfrost driver, but do on a reboot of 5.2 as when it was released.

Manjaro will only do mainline releases but usually they are hours after the latest release.

If you want to test Mesa 19.2.0 devel

sudo pacman -S bc python-pip flex bison base-devel ncurses cmake xorg-util-macros
sudo pip install scikit-build mako 
sudo pip install meson ninja

git clone https://gitlab.freedesktop.org/mesa/mesa.git -b master
cd mesa
mkdir build
meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dprefix=/usr build/
ninja -C build/
sudo ninja -C build/ install
1 Like

Many thanks to your help stuar. I am used to debian based distros so your tips are very helpful. I am on mainline already. It should be fbturbo whats preventing me to use panfrost. I am amazed how well this distro its working even with these shitty driver.

If I have got to be honest use the Armbian images and there forum as you get a bigger herd and probably much more stable images.

Ok, now panfrost its working. On x11, on wayland session it fails to start the session on kde. Last time ive tried armbian was awful. I have the armbian image builder ( the 25 gb source code armbian builder) non of these images want to boot. Or they booted and i didnt waited that long hahaha

Yeah KDE plasma is pure X11 from this build, that is where the Mesa team are heading but think that could be months away yet.
Slightly confused as opengl in X11 is benching considerably faster than wayland by about 25%

The Manjaro images are good if just missing pcie which hopefully with 5.3 the first RC is days off and we might see something soon apart from that complete and seem very solid even though bleeding edge.
The Armbian images seem far more stable than the Radxa provided images, but the build scripts do seem ok.
But the Manjaro images are far better but obviously bleeding edge being 5.2 and what will be 5.3 RC1
Mainline is where it is at and Manjaro are there.

Indeed, we have 2.1 opengl full profile, compiling sdl it detects full profile (and alyssa confirmed that). The lack of 3.x profile should be a matter of time. But so far its much better than the old driver. Its very unstable for now on x11. Manjaro its the only distro than its on mainline or its armbian too? Sorry, stupid question. Last time i built an armbian image you could select 5.1 , maybe they let you build 5.2 now? Indeed, these capability of manjaro to update so easily to latest kernel its awesome.

I found it very stable but as chance would happen for whatever reason the software components of Plasma would crash out to desktop.
You need to compile Mesa 19.2.0-devel which is the master branch that instructions are included above.

Manjaro is hopefully the first of many where rather than some flakey community images and actual distro offers support.
Its very early the only got boards a few weeks ago and its pretty damn amazing already, future is looking quite good.
I love Arch its a great distro just a shame it never seems to get a solid version of Chromium which I presume is very hardware specific, otherwise its my preferred distro unless I am installing something that has specific dependencies such as OMV and the likes.

1 Like

Ive recently compiled ppsspp but the performance wasnt ok hahaha to much glitches . innded, need to be polished but we have very good reasons to hope very good things about this driver. So far you gnome image didnt boot at all… Maybe its my burn utility, dont know. And i dont wont to make a new one from scratch. I will remain on x11 kde for now while pulling and upgrading mesa to see if anythings change.

If you are after game emulators then you prob better off with recallbox.
https://archive.recalbox.com/

Prob needs early testers with the freshness of panfrost I haven’t had a look and don’t know if it uses wayland or x11