Archlinux: GNOME Image for Odroid C4/HC4

Post Reply
jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Archlinux: GNOME Image for Odroid C4/HC4

Post by jgmdev »

Arch Linux is a lightweight and flexible Linux distribution that tries to Keep It Simple but installing it can be daunting for many. So, I worked on a shell script to generate disk images out of ArchLinux tar files (more details about the ArchLinux Disk Image Generator on Github). To Arch Linux's favor the system updates are rolling so your software will always be up to date.

What is Included?
  • GNOME Desktop Environment using Mali drivers or Panfrost drivers (depends on downloaded image).
  • Linux 5.8.x kernel maintained by @tobetter and other people with audio support or 5.10.x Kernel on the panfrost image with HC4 support.
  • U-Boot package with hooks to update boot.ini automatically if kernel is changed to non mainline.
  • Mali GPU Kernel Driver or newer mesa from git with panfrost support on the panfrost image.
  • Binary Mali Wayland driver for Hardware Acceleration on Mali image.
  • Bluetooth
  • Networking with NetworkManager
  • Pre-configured cpupower with known working settings.
  • Yay AUR helper.
  • Pamac software center.
  • Use of Arc desktop theme and Papirus icon theme by default.
  • SSH Enabled.
  • Bigger and more readable tty font.
  • Installed archlinuxdroid-repo for easier kernel and custom package upgrades.
  • Firefox with wayland support enabled. (see /etc/profile.d/)
  • Realtime privileges enabled for alarm user.
  • A nice space.jpg wallpaper!
Here are some basic screenshots:

Image

Image

Installation

The process of burning the image into a SD or EMMC card should be the same as with other images and is well documented in other places so I will not write about that.

Login Credentials:
username: alarm
password: alarm

Administration:
username: root
password: root

Don't forget to change the default password for added security.

Setup

After booting to the login manager wait some seconds because the system will grow the partition, setup locales, setup the boot partition on /etc/fstab and reboot.

Known Issues

The system automatically turns off

GNOME is set to sleep the device after a specified amount of inactivity, to prevent this disable the feature from the gnome control center / settings.

Panfrost Image: Graphical glitches

It seems that on the bifrost gpu (G31) shipped on the C4 panfrost isn't too stable yet (in comparison to the N2+). You could try increasing the minimum gpu clock speed as detailed here viewtopic.php?p=314939#p314939 or here viewtopic.php?p=315257#p315257.

What Works?

Mali drivers image
For my surprise the kodi-wayland package works on the mali image (you can install it from my repository by running sudo pacman -S kodi-wayland and don't forget to also install the shairplay package for it to work)! I tested the video playback by installing the Twitch addon and the stream rendered just fine :)

Image

Panfrost based image

OpenArena - sudo pacman -S openarena
Cendric - sudo pacman -S cendric-git
SuperTux - sudo pacman -S supertux
MineTest - sudo pacman -S minetest
teeworlds - sudo pacman -S teeworlds
supertuxkart - sudo pacman -S supertuxkart

Video

Kodi with video acceleration.
MPV with video acceleration.

For details on how the Mali drivers integration work check the Archlinux: Wayland GPU Acceleration Guide, which also includes a list of (maybe not up to date) tested wayland desktop environments and how to set it up.

Improving System Performance

If you want better performance try running sudo cpupower frequency-set -g performance from the terminal, and to permanently set the CPU governor to performance open /etc/default/cpupower and change the line that reads:

Code: Select all

governor='schedutil'
to

Code: Select all

governor='performance'
Then you can just run sudo systemctl restart cpupower to apply the changes immediately.

Other Images I have Worked on

Odroid N2 ArchLinux Headless
Odroid N2 ArchLinux Gnome
Odroid N2 ArchLinux XFCE
Odroid N2 ArchLinux Wayfire
Odroid C4 ArchLinux XFCE
Odroid C4 ArchLinux Wayfire

Changes Log

Date - 30/12/2020 (panfrost image)
* A more lite-weight gnome install by using just the minimal amount of packages required to get gnome running.
* Swapped nautilus with pcmanfm-gtk3 to reduce the amount of required dependencies.
* Disabled suspend on gnome by default to prevent issues for users without a physical power button.
* Disabled search services on gnome for better performance.
* Changed default color theme of gnome-terminal to more readable one.
* Added CTRL + ALT + T keyboard shortcut to launch the terminal.
* Improved initial setup script to not require a system reboot, so the system doesn't reboots anymore after reaching login manager.
* Recent build of mesa-arm-git which seems to have fixed some rendering issues on supertuxkart and have better performance.
* Updated pamac package which now includes hooks to fix appstream xml files.
* Default /boot/boot.ini now has the bootlabel set to "ArchLinux GNOME Lite" by the image generator.
* Enabled the dhcpcd systemd service.
* Latest software updates.

Date - 21/12/2020 (panfrost image)
* Use 5.10 kernel with panfrost patches from tobetter linux branch in order to also properly support the hc4.
* Includes recently build mesa from git with panfrost support and automated builds are automatically fetched from the pamac update manager.
* Added hc4 enabled uboot-odroid-c4 package.
* Use uuid on /boot/boot.ini and /etc/fstab instead of devices names to prevent possible boot issues.
* Latest software updates.

Date - 23/10/2020
* First release

Download

Panfrost image (supports both C4 and HC4):
Note: Panfrost Bifrost support is still under heavy development so bugs are expected.
https://mega.nz/file/WFlAFRYZ#qznp4Kjn7 ... Ikm1QAbA2o

Mali drivers image (Odroid C4 only for now):
https://mega.nz/file/mRt1iQwa#jUxh4yhRg ... UKNu5iWRnQ

Pre-built PKGBUILDs repository from my GitHub repo
http://archlinuxdroid.tk/

PKGBUILD sources
https://github.com/jgmdev/archlinux-odroid
Last edited by jgmdev on Thu Dec 31, 2020 10:19 am, edited 3 times in total.

lda4526
Posts: 19
Joined: Mon May 25, 2020 11:17 pm
languages_spoken: english
ODROIDs: 2 XU4s, 3 C2s, N2, C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by lda4526 »

Is this using bifrost or the closed source driver? This looks sweet!

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by jgmdev »

lda4526 wrote:
Mon Oct 26, 2020 12:29 am
Is this using bifrost or the closed source driver? This looks sweet!
It uses mali closed drivers, but you can try panfrost by swapping some packages:

Code: Select all

# Uninstall mali blobs and mali kernel driver
sudo pacman -R dkms-mali-bifrost odroid-c4-libgl-wl

# install panfrost enabled kernel and mesa
sudo pacman -S linux-amlogic-panfrost-59 linux-amlogic-panfrost-59-headers mesa-arm-git llvm

# Enable panfrost for the Odroid by using a mesa debugging environment variable
echo "PAN_MESA_DEBUG=bifrost" >> /etc/environment
Then reboot for changes to take effect. To revert back to mali drivers:

Code: Select all

# install previous kernel 
sudo pacman -S linux-amlogic-58 linux-amlogic-58-headers

# install mali kernel driver and mali blobs
sudo pacman -S dkms-mali-bifrost-next odroid-c4-libgl-wl
Reboot for changes to take effect. I'm not sure if I left something, but as I recall that should be all. (Maybe the installation of packages should be done from a tty instead of within gnome)
These users thanked the author jgmdev for the post:
odroid (Mon Oct 26, 2020 11:17 am)

User avatar
tobetter
Posts: 7360
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 411 times
Been thanked: 1120 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by tobetter »

@jgmdev, Since @superpowter77 had tried with no luck to boot the image from ODROID-HC4, I also tried the same and found a couple of places to fix.
viewtopic.php?p=309896#p309896

1. A couple of bugs in the Petitboot, there was a bug with an OS image that uses root=/dev/mmcblk* in the bootargs. This error happens on ODROID-HC4 and it's been fixed.
2. Suggestion to fix in boot.ini.
1) Use root=UUID=* instead of root=/dev
2) Use the symbol 'variant' in the line to load the device tree. For example, use meson64_odroid${variant}.dtb instead of meson64_odroidc4.dtb. The symbol 'variant' will set with the right device name by Hardkernel's stock U-boot (v2015.01) and the Petitboot.
3) Add setenv bootlabel "Arch Linux Gnome Desktop" to the boot.ini, this will let user see in the boot entry of the Petitboot.
3. I cannot see SATA storages boot from the image. The kernel version says it's 5.8.16 but not able to find the right version in yoru github repository. I assume that kernel config is not fully updated to have SATA storage support. If you share the branch what you are going to release soon, I will the the same.

The fixed Petitboot will be uploaded in 1-2 days.

Thank you for your efforts. :)
These users thanked the author tobetter for the post (total 2):
jgmdev (Sun Nov 01, 2020 9:37 am) • superpowter77 (Sun Nov 01, 2020 11:10 am)

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by jgmdev »

Maybe the issue is also related with disabling pci support from the kernel...

Kernel config 5.8 package:
https://github.com/jgmdev/archlinux-odr ... -58/config

Kernel commit from 5.8.y branch
https://github.com/jgmdev/archlinux-odr ... KGBUILD#L9

For 5.9 with panfrost:
https://github.com/jgmdev/linux/tree/odroid-5.9.chewitt

Config for 5.9 with panfrost
https://github.com/jgmdev/archlinux-odr ... -59/config

superpowter77
Posts: 359
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 126 times
Been thanked: 39 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by superpowter77 »

After newest updated Petiboot, HC4 is reaching Archlinux login screen. I tried 5 times and it worked 5 out of 5. However, once at login screen, mouse and keyboard remains unresponsive, meaning there's no way to control mouse cursor or keyboard. I tried also with different USB hub controllers without success, I even tried wired keyboards, mouse, trackballs, mini air mouse and different sets of Microsoft and Logitech Wireless keyboard/mouse combos without any luck. We're getting closer...

Wasn't possible to Ping or SSHish either
20201031_222450.jpg
20201031_222450.jpg (1.32 MiB) Viewed 833 times
These users thanked the author superpowter77 for the post:
jgmdev (Sun Nov 01, 2020 11:44 am)

User avatar
tobetter
Posts: 7360
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 411 times
Been thanked: 1120 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4

Post by tobetter »

@superpowter77, thanks new Petitboot works for you.

@jgmdev, For the USB issue, that happens to me as well...looks like it's because of the kernel configuration or missing part of the device tree. I will try to find out the time slot to help.
These users thanked the author tobetter for the post:
jgmdev (Sun Nov 01, 2020 2:28 pm)

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4/HC4

Post by jgmdev »

So here posting also an updated image based on panfrost and HC4 support as I earlier did on the ArchLinux XFCE Thread.

Changes

* Use 5.10 kernel with panfrost patches from tobetter linux branch in order to also properly support the hc4.
* Includes recently build mesa from git with panfrost support and automated builds are automatically fetched from the pamac update manager.
* Added hc4 enabled uboot-odroid-c4 package.
* Use uuid on /boot/boot.ini and /etc/fstab instead of devices names to prevent possible boot issues.
* Latest software updates.

Kodi Build
The archlinuxdroid repository now has a build of kodi for: X11, Wayland, and GBM, all of them work with panfrost. To install just issue a sudo pacman -S kodi or use the included graphical package manager.

GLMark
To test the panfrost rendering performance one can install glmark2-git from repo.

Graphical Glitches
It seems that on the bifrost gpu shipped on the C4 panfrost isn't too stable yet (in comparison to the N2+) when running on a wayland session or the kernel branch been used doesn't has enough patches. You could try swapping gdm with lightdm in order to run Gnome on the Xserver instead of Wayland and increase the minimum gpu clock speed as detailed here viewtopic.php?p=314939#p314939 or here viewtopic.php?p=315257#p315257 for more stable gnome animations. Running GNOME on Xserver may give you better results and would still be accelerated since panfrost already has X11 support.

Download Link on first post!

Updating existing installation to support HC4

1. Enable the archlinuxdroid repo if not yet by installing this package.
2. Install linux-odroid-panfrost, linux-odroid-panfrost-headers and mesa-arm-git for latest panfrost work.
3. Install rtl88xxau-aircrack-dkms-git for proper hardkernel wifi module support using yay.
4. Uninstall dkms-mali-bifrost-next, xf86-video-fbdev, odroid-c4-libgl-wl as any other related package to completely switch to a panfrost setup.
5. If any issues after boot you can always switch to a virtual terminal with CTRL + ALT + F2/F3 to fix your system.

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4/HC4

Post by jgmdev »

Upgraded the panfrost image again to a more lightweight gnome installation that should perform better.

Changes

* A more lite-weight gnome install by using just the minimal amount of packages required to get gnome running.
* Swapped nautilus with pcmanfm-gtk3 to reduce the amount of required dependencies.
* Disabled suspend on gnome by default to prevent issues for users without a physical power button.
* Disabled search services on gnome for better performance.
* Changed default color theme of gnome-terminal to more readable one.
* Added CTRL + ALT + T keyboard shortcut to launch the terminal.
* Improved initial setup script to not require a system reboot, so the system doesn't reboots anymore after reaching login manager.
* Recent build of mesa-arm-git which seems to have fixed some rendering issues on supertuxkart and have better performance.
* Updated pamac package which now includes hooks to fix appstream xml files.
* Default /boot/boot.ini now has the bootlabel set to "ArchLinux GNOME Lite" by the image generator.
* Enabled the dhcpcd systemd service.
* Latest software updates.

Graphical Glitches

Glitches are still present on the G31 Bifrost GPU when moving the mouse and opening some windows which somehow makes GNOME unusable on panfrost. Seems to be an issue on the G31+panfrost with mutter since the same glitches are also present when running GNOME on X11. Hopefully panfrost support will keep improving for the G31. Other environments like enlightenment+wayland seem to render perfectly in comparison when run on the C4/HC4.

Download on first post.

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4/HC4

Post by jgmdev »

jgmdev wrote:
Thu Dec 31, 2020 8:48 am
Graphical Glitches

Glitches are still present on the G31 Bifrost GPU when moving the mouse and opening some windows which somehow makes GNOME unusable on panfrost. Seems to be an issue on the G31+panfrost with mutter since the same glitches are also present when running GNOME on X11.
This glitches seem to have been fixed on latest mesa master git. Update to latest mesa-arm-git package for the fix.

chewitt
Posts: 83
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4/HC4

Post by chewitt »

Current mesa master is now passsing GLES 3.0 and 3.1 is within reach.
These users thanked the author chewitt for the post (total 2):
jgmdev (Wed Jan 06, 2021 4:33 pm) • odroid (Wed Jan 06, 2021 5:01 pm)

jgmdev
Posts: 322
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 130 times
Been thanked: 234 times
Contact:

Re: Archlinux: GNOME Image for Odroid C4/HC4

Post by jgmdev »

Nice! now glmark2 doesn't crash when ran with PAN_MESA_DEBUG=deqp

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 2 guests