Archlinux: Wayland GPU Acceleration Guide

Post Reply
jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Archlinux: Wayland GPU Acceleration Guide

Post by jgmdev »

Edit: Revised the instructions to include Odroid N2+

So I worked on packages to enable gpu acceleration of Odroid N2 on ArchLinuxARM, based on the packages done for Ubuntu 20.04 by @tobetter

Note: The supplied Mali binary drivers for bifrost (which is the code name of the G52 gpu model found on the Odroid N2), does not supports X11 so the gpu acceleration will only work on wayland compositors, for X11 acceleration check this other guide viewtopic.php?f=179&t=38835. There is also work on a compatibility layer to make the OpenGL ES part of the Mali binary driver work under X11 by OtherCrashOverride. More details can be read on viewtopic.php?f=182&t=34751

What Works?

Here is a list of what has been tested so far divided in 4 categories:
  • YES = Usable and supports Xwayland + runs glmark2-es2-wayland
  • PARTIALLY - Usable but Xwayland or glmark2-es2-wayland may not work
  • SLOW - Seems to run but really slow (wayland not properly loaded?)
  • NO - Doesn't starts
List of Environments
Environment Status Notes
GNOME YES Everything seems to work now! But, gnome 3.36 seem to have broken proper keyboard support
Weston YES Everything seems to work! Don't forget to enable xwayland on weston.ini
Liri (Alpha) YES No mouse cursor on start, ALT + F2 to launch application and mouse cursor appears.
Sway YES Requires a patched wlroots to work with Mali binary drivers and Xwayland
Wayfire YES Also requires a patched wlroots as with sway
Enlightenment PARTIALLY X applications run but, glmark2-es2-wayland segfaults on a regular user account, under root strangely works so something is wrong on the permissions system.
KDE SLOW Kwayland and Xwayland processes running but everything is slow.

Requirements for regular Odroid N2 (non plus)

First you will need to install linux-aarch64 package (version 5.7 at time of writing) which is supported and a requirement by the latest Mali kernel driver (dkms-mali-bifrost) that was patched by tobetter to work on this latest kernel version:

Code: Select all

sudo pacman -S linux-aarch64
Then modify your /boot/boot.ini file to be able to boot from this kernel, here is a working boot.ini example:

Code: Select all

ODROIDN2-UBOOT-CONFIG

# System Label
setenv bootlabel "ArchLinux"

# Default Console Device Setting
setenv condev "console=ttyAML0,115200n8"

# Boot Args
setenv bootargs "root=/dev/mmcblk${devno}p2 rootwait rw mitigations=off ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused"

# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x3080000"

# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson-g12b-odroid-n2.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
Don't forget to modify the root device if needed from root=/dev/mmcblk${devno}p2 to match your needs.

Requirements for regular Odroid N2+

The mainstream ArchLinuxArm linux-aarch64 or linux-aarch64-rc packages don't have support for the Odroid N2+ higher cpu frequencies yet (I submitted the needed changes here but they are still pending review) so you will need to install this kernel from my github repo instead. Also you will have to update u-boot to latest version provided by hardkernel which I also wrote a simple PKGBUILD. Pre-built packages can be found on my mega account.

For the Odroid N2+ the /boot/boot.ini file should look something like:

Code: Select all

ODROIDN2-UBOOT-CONFIG

setenv board "odroidn2"

# System Label
setenv bootlabel "ArchLinux"

# Default Console Device Setting
setenv condev "console=ttyAML0,115200n8"

# Boot Args
setenv bootargs "root=/dev/mmcblk${devno}p2 rootwait rw mitigations=off ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused"

# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x3080000"

# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson64_odroid${variant}.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
Note: you can also use this kernel, u-boot and boot.ini on regular Odroid N2, so it is your choice.

GPU Acceleration

Now you should proceed to clone the repository where I added the PKGBUILD's to enable the acceleration:

Code: Select all

git clone https://github.com/jgmdev/archlinux-odroid
The first package that needs to be installed is the Mali kernel driver which should be the dkms-mali-bifrost package:

Code: Select all

cd dkms-mali-bifrost
makepkg
sudo pacman -U dkms-mali-bifrost-24.0-1-aarch64.pkg.tar.xz
Then you will need to install the user space binary driver known as libMali.so, which interacts with the kernel driver part and is provided by the odroid-n2-libgl-wl package:

Code: Select all

cd odroid-n2-libgl-wl
makepkg
sudo pacman -U odroid-n2-libgl-wl-r16p0-1-aarch64.pkg.tar.zst
After installing these two packages you may restart the system to make sure that the changes will take effect. After reboot you should be able to use one of the working environments listed before. You can refer to the ArchLinux Wayland wiki entry for installation instructions. The most lightweight experience so far is with running weston, wayfire or sway. But the most complete desktop environment would simply be GNOME.

GNOME Performance Tips

Things you can do to decrease RAM usage of gnome and improve CPU usage when the system is idle.

Disable Trackers - The most important change

Code: Select all

Settings -> Search -> Turn Off
Uninstall evolution data server

Code: Select all

sudo pacman -Rcs evolution-data-server
Uninstall gnome software

Code: Select all

sudo pacman -Rcs gnome-software
Those changes should leave you a stable system :D

Weston

Weston is a limited desktop environment but it supports Xwayland which makes it capable of running any application you may use. Make sure to create a weston.ini file to enable it with xwayland=true and install xorg-server-xwayland, here an example:

~/.config/weston.ini

Code: Select all

[core]
xwayland=true
idle-time=0

[terminal]
font=monospace
font-size=20

[keyboard]
keymap_rules=evdev
keymap_layout=us
keymap_variant=intl
keymap_model=pc105
numlock-on=true

[shell]
background-image=/path/to/some/background
background-type=scale
num-workspaces=4
cursor-theme=Adwaita
cursor-size=48

[launcher]
icon=/usr/share/icons/Adwaita/24x24/legacy/system-search.png
path=GDK_BACKEND=wayland PATH=/usr/bin:/home/alarm/Applications/bin /usr/bin/xfce4-appfinder

[launcher]
icon=/usr/share/icons/Adwaita/24x24/legacy/utilities-terminal.png
path=/usr/bin/weston-terminal

[launcher]
icon=/usr/share/icons/Adwaita/24x24/places/folder.png
path=GDK_BACKEND=wayland /usr/bin/thunar

[launcher]
icon=/usr/share/icons/hicolor/24x24/apps/firefox.png
path=GDK_BACKEND=wayland MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox

[launcher]
icon=/usr/share/icons/hicolor/24x24/apps/chromium.png
path=GDK_BACKEND=x11 /usr/bin/chromium

[launcher]
icon=/usr/share/icons/hicolor/32x32/apps/geany.png
path=GDK_BACKEND=wayland /usr/bin/geany

[launcher]
icon=/usr/share/icons/Adwaita/24x24/devices/audio-headset.png
path=GDK_BACKEND=wayland /usr/bin/pavucontrol
Note: I added environment variables to the launcher icons because it seems that the weston launcher bar doesn't reads them from the environment.

You can create a custom launcher script that initializes the neccesary variables needed to run QT and GTK applications in wayland mode and set a specific GTK and icon theme for you. Here is another example:

west.sh

Code: Select all

#!/bin/bash

export GDK_BACKEND=wayland
export QT_QPA_PLATFORM=wayland
export QT_STYLE_OVERRIDE="kvantum"
export SDL_VIDEODRIVER=wayland
export CLUTTER_BACKEND=wayland
export COGL_RENDERER=egl_wayland
export MOZ_ENABLE_WAYLAND=1

gnome_scheme=org.gnome.desktop.interface

gsettings set $gnome_scheme gtk-theme 'Arc-Dark'
gsettings set $gnome_scheme icon-theme 'Papirus-Dark'
gsettings set $gnome_scheme cursor-theme 'Adwaita'
gsettings set $gnome_scheme cursor-size '48'
gsettings set $gnome_scheme font-name 'Sans 16'

weston
Also notice, for QT applications I added QT_STYLE_OVERRIDE="kvantum" to the example launcher script in order to have the same look as the GTK ones. You have to install kvantum-qt5 package, then launch kvantummanager and select the theme you want to match with the GTK applications.

You can read more about configuring weston on the ArchLinux Wiki.

Troubleshooting

Monitor screen resolution is not properly set with mainline kernel and instead a lower resolution is used.

You can pass a parameter to the kernel to force a screen resolution as explained on the ArchLinux wiki. First you need to retrieve the proper display connector name by executing the following code on your terminal emulator:

Code: Select all

for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
This code would return something like:

Code: Select all

HDMI-A-1
Then edit your /boot/boot.ini and append to your bootargs a line like:

Code: Select all

video=HDMI-A-1:1920x1080@60
Which should look similar to:

Code: Select all

setenv bootargs "root=/dev/sda2 rootwait rw mitigations=off ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused video=HDMI-A-1:1920x1080@60"
Last edited by jgmdev on Thu Aug 06, 2020 4:23 am, edited 8 times in total.
These users thanked the author jgmdev for the post (total 6):
rooted (Thu Apr 30, 2020 4:09 pm) • Sav (Thu Apr 30, 2020 6:26 pm) • brad (Fri May 01, 2020 11:03 am) • tobetter (Fri May 01, 2020 8:38 pm) • odroid (Wed May 06, 2020 12:23 pm) • joy (Tue May 19, 2020 10:23 am)

Sav
Posts: 211
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 48 times
Been thanked: 18 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by Sav »

Is it possibile to boot and log in Weston, with a minimal setup? I'd like to not have a full gnome environment for performances sake.

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

Sav wrote:
Thu Apr 30, 2020 6:29 pm
Is it possibile to boot and log in Weston, with a minimal setup? I'd like to not have a full gnome environment for performances sake.
Weston installs session files that are read by display managers like SDDM, GDM, etc... On ArchLinux the display manager that loaded wayland sessions for me was SDDM, GDM didn't even launched so there is something wrong with it. LightDM sometimes loaded the wayland session but other times it didn't so not sure, still need to inspect more what could be happening, but SDDM did seemed to work all the time.

Sav
Posts: 211
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 48 times
Been thanked: 18 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by Sav »

jgmdev wrote:
Fri May 01, 2020 6:19 am
Sav wrote:
Thu Apr 30, 2020 6:29 pm
Is it possibile to boot and log in Weston, with a minimal setup? I'd like to not have a full gnome environment for performances sake.
Weston installs session files that are read by display managers like SDDM, GDM, etc... On ArchLinux the display manager that loaded wayland sessions for me was SDDM, GDM didn't even launched so there is something wrong with it. LightDM sometimes loaded the wayland session but other times it didn't so not sure, still need to inspect more what could be happening, but SDDM did seemed to work all the time.
In the archwiki page is said that SDDM runs on X11. How do you manage to use Weston?

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

Sav wrote:
Fri May 01, 2020 4:26 pm
In the archwiki page is said that SDDM runs on X11.
Indeed, but it is able to properly launch wayland sessions, you can run a X session and Wayland session simultaneously without issues, I have run XFCE and Weston at the same time, one uses framebuffer and the other the drm.

By the way, when trying out liri I got the error “EGL Error : could not create the EGL surface: error 0x300b” when running liri own QT applications, and found out that to fix that, one needs to recompile the QT libraries, so who knows if that may also fix other issues (KDE maybe?), will test later.

For reference:

https://stackoverflow.com/questions/409 ... i#44821752

https://tigraphics.blogspot.com/2013/02 ... e-egl.html

Snippo
Posts: 2
Joined: Sat May 02, 2020 4:30 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by Snippo »

I think Sav is right and that only GDM is supported with this setup (Wayland). I tried LightDM and SDDM and neither of them worked. GDM + Weston worked flawlessly using the guide in the first post.
Everything that tries to use X11 seems to just display a blinking cursor.

Edit: I tried enabling autologin to skip the greeter, but could not get that to work. But maybe there is a way to launch a Wayland session from LightDM without needing X11 (for the greeter).?
These users thanked the author Snippo for the post:
jgmdev (Sun May 03, 2020 11:26 am)

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

Snippo wrote:
Sat May 02, 2020 4:34 pm
I think Sav is right and that only GDM is supported with this setup (Wayland). I tried LightDM and SDDM and neither of them worked. GDM + Weston worked flawlessly using the guide in the first post.
Ohhh, so you where able to run GDM with the Mali drivers? You make me think that maybe my setup is somehow borked... Also if you where able to run GDM you may be able to run GNOME.
Snippo wrote:
Sat May 02, 2020 4:34 pm
Everything that tries to use X11 seems to just display a blinking cursor.
You would need to install xf86-video-fbdev or xf86-video-fbturbo-git for anything X11.
Snippo wrote:
Sat May 02, 2020 4:34 pm
Edit: I tried enabling autologin to skip the greeter, but could not get that to work. But maybe there is a way to launch a Wayland session from LightDM without needing X11 (for the greeter).?
LightDM as far as I know doesn't works under Wayland, it should be able to launch Wayland sessions but LightDM itself runs under X11

spikerguy
Posts: 9
Joined: Thu Apr 30, 2020 12:35 am
languages_spoken: english
ODROIDs: Waiting for Hk to Send sample
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by spikerguy »

This is some great development.

Nice work. I think Panfrost is coming along very well and hopefully it will support bifrost soon afaik it have got some basic work done already.
Let see which one can be useable in the near future.

Keep up the good work OP.
Manjaro ARM Team

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

Was finally able to run gdm/gnome on wayland! :D Updated the first post with some performance tips for gnome and trouble shooting section with instructions on how to fix wrong display resolution on mainline kernel, which happened to me on one of the displays I own. Here is a screenshot to celebrate :lol:

Image

Performance is nice!
These users thanked the author jgmdev for the post (total 5):
odroid (Thu May 07, 2020 1:50 pm) • istanbulls (Fri May 08, 2020 5:56 pm) • brad (Sat May 09, 2020 4:36 pm) • spikerguy (Sat May 09, 2020 9:36 pm) • tobetter (Sat May 09, 2020 9:41 pm)

spikerguy
Posts: 9
Joined: Thu Apr 30, 2020 12:35 am
languages_spoken: english
ODROIDs: Waiting for Hk to Send sample
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by spikerguy »

This is some good news.
Can you share `inxi -Fxzi` and also the glmark2 -s 1920x1080 result score?
Interesting to see gpu support finally arriving for Bifrost yeayyy..
Can't wait for Amlogic S922x to take over Desktop mini pc's once gpu and vpu support is in stable production stage :D
Manjaro ARM Team

wallyz21
Posts: 139
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 16 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by wallyz21 »

If gnome is running could MATE work as well?
Walter Zambotti
N2 - Ubuntu Mate Desktop

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

spikerguy wrote:
Sat May 09, 2020 9:35 pm
Can you share `inxi -Fxzi` and also the glmark2 -s 1920x1080 result score?
RIght now I'm testing mesa-git and the panfrost module, but it seems that initial Bifrost support is only enabled for the g31 and not yet the g52 so will run those test once I install again the dkms and user space mali driver.
wallyz21 wrote:
Sun May 10, 2020 12:16 am
If gnome is running could MATE work as well?
Does mate already works under Mir (which is now a wayland compositor)? If yes, it could be a possibility...

spikerguy
Posts: 9
Joined: Thu Apr 30, 2020 12:35 am
languages_spoken: english
ODROIDs: Waiting for Hk to Send sample
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by spikerguy »

jgmdev wrote:
Sun May 10, 2020 6:37 pm
spikerguy wrote:
Sat May 09, 2020 9:35 pm
Can you share `inxi -Fxzi` and also the glmark2 -s 1920x1080 result score?
RIght now I'm testing mesa-git and the panfrost module, but it seems that initial Bifrost support is only enabled for the g31 and not yet the g52 so will run those test once I install again the dkms and user space mali driver.
wallyz21 wrote:
Sun May 10, 2020 12:16 am
If gnome is running could MATE work as well?
Does mate already works under Mir (which is now a wayland compositor)? If yes, it could be a possibility...
Why not try on C4 ?
As it has G3x gpu.
Manjaro ARM Team

wallyz21
Posts: 139
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 16 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by wallyz21 »

Can the procedure described in this guide be safely applied to an already installed HK Ubuntu 18.04 MATE image?
Walter Zambotti
N2 - Ubuntu Mate Desktop

Sav
Posts: 211
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 48 times
Been thanked: 18 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by Sav »

wallyz21 wrote:
Wed May 13, 2020 1:15 pm
Can the procedure described in this guide be safely applied to an already installed HK Ubuntu 18.04 MATE image?
No, because arch has a different way to manage install packages and because Mate doesn't do well with Wayland.

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

spikerguy wrote:
Sat May 09, 2020 9:35 pm
This is some good news.
Can you share `inxi -Fxzi` and also the glmark2 -s 1920x1080 result score?
Interesting to see gpu support finally arriving for Bifrost yeayyy..
Can't wait for Amlogic S922x to take over Desktop mini pc's once gpu and vpu support is in stable production stage :D
Sorry I took so much to share what you asked I got lost playing around with gl4es and fbdev driver. Here is the output of inxi, almost feels like walking naked lol

Code: Select all

ystem:
  Kernel: 5.7.0-rc6-1-ARCH aarch64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Gnome 
  Distro: Arch Linux ARM 
Machine:
  Type: ARM Device System: Hardkernel ODROID-N2 details: N/A 
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard K360 
  charge: 55% (should be ignored) status: Discharging 
  Device-2: hidpp_battery_1 model: Logitech M570 charge: 5% status: Discharging 
CPU:
  Topology: 6-Core (2-Die) model: N/A variant-1: cortex-a73 variant-2: cortex-a53 
  bits: 64 type: MCP MCM arch: ARMv8 rev: 4 
  features: Use -f option to see features bogomips: 0 
  Speed: 1000 MHz min/max: 100/1896:1704 MHz Core speeds (MHz): 1: 1000 2: 1000 
  3: 1000 4: 1000 5: 1000 6: 1000 
sh: line 1: 10782 Segmentation fault      (core dumped) /sbin/glxinfo 2> /dev/null
Graphics:
  Device-1: meson-g12a-mali driver: mali v: N/A bus ID: N/A 
  Device-2: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: kernel bus ID: N/A 
  Display: wayland server: X.Org 1.20.8 driver: modesetting resolution: 1920x1080~60Hz 
  Message: No advanced graphics data found on this system. 
Audio:
  Device-1: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: kernel bus ID: N/A 
  Device-2: axg-sound-card driver: N/A bus ID: N/A 
  Device-3: Generalplus type: USB driver: hid-generic,snd-usb-audio,usbhid 
  bus ID: 1-1.4:5 
  Sound Server: ALSA v: k5.7.0-rc6-1-ARCH 
Network:
  Device-1: meson-axg-dwmac driver: meson8b_dwmac v: N/A port: N/A bus ID: N/A 
  IF: eth0 state: down mac: <filter> 
  Device-2: Realtek RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter type: USB 
  driver: rtl8812au bus ID: 1-1.3.1:6 
  IF: wlan0 state: up mac: <filter> 
  IP v4: <filter> type: noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Drives:
  Local Storage: total: 260.09 GiB used: 142.96 GiB (55.0%) 
  ID-1: /dev/mmcblk0 model: BJTD4R size: 29.12 GiB 
  ID-2: /dev/mmcblk1 model: SA08G size: 7.40 GiB 
  ID-3: /dev/sda type: USB model: TO Exter nal USB 3.0 size: 223.57 GiB 
Partition:
  ID-1: / size: 218.81 GiB used: 133.16 GiB (60.9%) fs: ext4 dev: /dev/sda2 
  ID-2: /boot size: 255.7 MiB used: 84.8 MiB (33.1%) fs: vfat dev: /dev/sda1 
Swap:
  ID-1: swap-1 type: partition size: 9.34 GiB used: 0 KiB (0.0%) dev: /dev/mmcblk0p3 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Info:
  Processes: 222 Uptime: 17m Memory: 3.54 GiB used: 1.41 GiB (39.8%) Init: systemd 
  Compilers: gcc: 9.3.0 clang: 10.0.0 Shell: zsh v: 5.8 inxi: 3.1.00
 
And finally the glmark2-es2-wayland Score: 452 which I got by running with --fullscreen (my resolution is already set to 1920x1080) and with the -s 1920x1080 that you said glmark2 Score: 254.

Maybe it is too late (since I also worked on generating ready to use ArchLinux images) and you already did it but leave it here for future reference. Now I'm going to play with gl4es once more but inside a wayland environment.

squidd
Posts: 22
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 15 times
Been thanked: 1 time
Contact:

Re: Archlinux: Wayland GPU Acceleration Guide

Post by squidd »

So I understand what needed to be done with boot.ini. My new question is, will this work correctly with the n2+? And, when I install dkms-mali-bifrost, a dependency is linux-headers. Which linux-headers should be used? linux-headers odroid n2?

squidd
Posts: 22
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 15 times
Been thanked: 1 time
Contact:

Re: Archlinux: Wayland GPU Acceleration Guide

Post by squidd »

Was able to get the steps completed, used linux-headers-rc, but getting solid blue light on reboot. is this maybe because I have an n2+ and not the n2? sorry for the noob questions but i'd like try and get this working.

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: Wayland GPU Acceleration Guide

Post by jgmdev »

squidd wrote:
Sat Aug 01, 2020 10:39 am
Was able to get the steps completed, used linux-headers-rc, but getting solid blue light on reboot. is this maybe because I have an n2+ and not the n2? sorry for the noob questions but i'd like try and get this working.
The N2+ should boot on kernels that also work on the regular N2, in any case I used a forked 5.7.10 kernel from tobetter that does has proper support for the N2+. You can build it using a PKGBUILD I put together for it or download pre-built packages I compiled this week in preparation to release an updated archlinux wayfire image with n2+ support and maybe finally some archlinux gnome (since gnome performance was nicely improved on latest releases):

Kernel: https://mega.nz/file/yB1FUaDY#8FYrTR0F4 ... cXQr4gK8UY
Kernel Headers: https://mega.nz/file/3AtzgSpQ#1XSpmmkBn ... tIWhqWgnPE

I tested the following boot.ini file and worked with the kernel that I just shared:

Code: Select all

ODROIDN2-UBOOT-CONFIG

setenv board "odroidn2"

# System Label
setenv bootlabel "ArchLinux"

# Default Console Device Setting
setenv condev "console=ttyAML0,115200n8"

# Boot Args
setenv bootargs "root=/dev/sda2 rootwait rw mitigations=off ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused video=HDMI-A-1:1920x1080@60"

# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x3080000"

# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson64_odroid${variant}.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
But... for this boot.ini to work you will also need to install/flash latest u-boot. After installing you may need to manually flash it:

Code: Select all

cd /boot
sudo dd if=u-boot.bin of=/dev/mmcblk# conv=fsync,notrunc bs=512 seek=1
Finally with the kernel you would need to install dkms-8812au which I submitted to archlinuxarm repos in case you are using wifi module sold by hardkernel/ameridroid, dkms-mali-bifrost from my repo and the odroid-n2-libgl-wl for wayland blobs.

I guess that should cover the basics for the Odroid N2+ support... Remember to read the PKGBUILD scripts (if possible) to get a better understanding of what is happening under the hood. That is one of the things I like about archlinux, that package manager build scripts are easy to read :)
These users thanked the author jgmdev for the post (total 3):
tobetter (Mon Aug 03, 2020 9:00 am) • odroid (Mon Aug 03, 2020 1:21 pm) • squidd (Mon Aug 03, 2020 10:46 pm)

squidd
Posts: 22
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 15 times
Been thanked: 1 time
Contact:

Re: Archlinux: Wayland GPU Acceleration Guide

Post by squidd »

Thank you so much for the info! It is greatly appreciated. I will get some time to play with this later today, I'll let you know how it works out.


btw Arch is amazing. Once you switch from Debian based OS's it's hard to go back. pacman is amazing compared to apt/PPA.

jgmdev
Posts: 104
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 30 times
Been thanked: 67 times
Contact:

Re: Archlinux: GPU Acceleration Guide

Post by jgmdev »

Sav wrote:
Thu Apr 30, 2020 6:29 pm
Is it possibile to boot and log in Weston, with a minimal setup? I'd like to not have a full gnome environment for performances sake.
As a follow up to this for any one interested greetd is lightweight and works great with sway, weston, wayfire. The wayfire archlinux image includes it as default login/display manager.

Also I updated first post to include necessary changes for the Odroid N2+
These users thanked the author jgmdev for the post (total 2):
squidd (Thu Aug 06, 2020 6:07 am) • Sav (Thu Aug 06, 2020 3:49 pm)

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 2 guests