Ubuntu 18.04 on Beelink Gemini J45 Mini PC (Fix and Review)

When I recently reviewed the Beelink J45 (aka Beelink Gemini J), a mini PC that uses the slightly older Intel Apollo Lake Pentium J4205 processor, whilst Windows 10 Pro ran fine it was unsuitable for Ubuntu because after installation the system became unstable and problems were encountered when running anything that loaded the system. The main issue was that when connected via wired-ethernet performing a command like ‘sudo apt upgrade’ would cause the ethernet to drop after which only a reboot would restore the connection. At the time it, was unclear what the cause was however a solution to the issue was posted by ‘gambetta’ on the Beelink forum. Basically it consists of installing the r8168 module which is the Linux device driver released for RealTek RTL8168B/8111B, RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, RTL8168DP/8111DP and RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface. To paraphrase the ‘README.Debian’ file, you use ‘r8168-dkms because the in-kernel r8169 does not support your NIC or is not working properly’. So the commands to install this driver are:


You will notice that this includes an ‘apt update’ command that may cause the ethernet to drop so you might need to reboot and re-enter the commands until successful. Alternatively, you can use my “isorespin.sh” script to respin an Ubuntu ISO (e.g. Ubuntu 18.04.3) with the options --boot GRUB-64 --package r8168-dkms and use the resulting ISO to install Ubuntu.

As a reminder here is the performance of the mini PC under Windows when compared with other Intel mini PCs:

Windows Mini PC Benchmarks Comparison
Click to Enlarge

As usual, I shrunk the Windows partition and created a new partition so I could then install and dual boot Ubuntu using my respun Ubuntu 18.04.3 ISO.

After installation, a brief check showed everything was now working including Ethernet together with WiFi, Bluetooth, and audio. I then ran some basic commands to look at the hardware in more detail:


I next ran my standard Phoronix Test Suite benchmarks and the results can be compared with those from the previous testing on other mini PCs:

minipc-j45-systems
Click to Enlarge
Beelink J45 phoronix benchmarks
Click to Enlarge

As the full results might be a little confusing because for some tests, higher is better, whereas for others, lower is better, the following bar chart may be easier to understand:

beelink J45 benchmark charts
Click to Enlarge

I’ve then run ‘sbc-bench’ which is a small set of different CPU performance tests focusing on server performance, ‘glmark2’ from the standard repositories which is a benchmark for OpenGL (ES) 2.0, some real-world timing tests for the compilation, zipping and unzipping of the Linux mainline v5.2 kernel, ‘iozone’ also from the standard repositories which is a filesystem benchmark tool and finally ‘Octane 2’ which is a JavaScript benchmark and was run in Chrome.

Beelink J45 Octane 2.0 Ubuntu
Click to Enlarge

A summary of the results from each of the above benchmark tests was compared with previously tested mini PCs as follows:

Ubuntu Linux Mini PCs Comparison Table
Click to Enlarge

The performance is as expected compared to the slightly more powerful Gemini Lake mini PCs.

I also tested Geekbench 4:

AZW Gemini J45 GeekBench 4and ran the UNIGINE Heaven benchmark:

Beelink Gemini J45 Unigine-Heaven Benchmark Ubuntu

For real-world testing, I played videos in Firefox, Chrome and Kodi in Ubuntu. The results were very similar with other mini PCs and the following tables summarise the tests and results for each of web browsing, Kodi in general and Kodi playing specific videos:

Beelink J45 ubuntu web browser Beelink J45 kodi ubuntu Beelink J45 kodi specific

Overall the device performance is as expected in Ubuntu once the RealTek Linux device driver is loaded. Again I’d like to thank Beelink for providing the Gemini J45 for review. It currently retails at around $250 for the tested configuration (8GB RAM, 512GB SSD) on Aliexpress.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
9 Comments
oldest
newest
tkaiser
tkaiser
4 years ago

Thank you for providing the fix (and also benchmarks and isorespin.sh in general)!

Can you please also provide output from ethtool -i enp1s0 to maybe get a clue why this NIC doesn’t work with Ubuntu’s default drivers?

linuxium
4 years ago

Thanks. Here’s the output you requested. Booting a ‘dist-upgrade’ Ubuntu 18.04.3 ISO with only ‘ethtool’ installed means that the default r8169 ethernet driver was used: ubuntu@ubuntu:~$ lsmod | grep r81 r8169 86016 0 ubuntu@ubuntu:~$ ethtool -i enp1s0 driver: r8169 version: firmware-version: rtl8168h-2_0.0.2 02/26/15 expansion-rom-version: bus-info: 0000:01:00.0 supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no ubuntu@ubuntu:~$ whereas booting a ‘dist-upgrade’ Ubuntu 18.04.3 ISO with ‘r8168-dkms’ and ‘ethtool’ installed uses the RealTek r8168 ethernet driver: ubuntu@ubuntu:~$ lsmod | grep r81 r8168 524288 0 ubuntu@ubuntu:~$ ethtool -i enp1s0 driver: r8168 version: 8.045.08-NAPI firmware-version: expansion-rom-version: bus-info: 0000:01:00.0 supports-statistics: yes supports-test: no supports-eeprom-access:… Read more »

Willy
4 years ago

So basically it’s mainline with firmware vs firmware-less out-of-tree. I’ve had a look at changes to the r8169 driver between 5.0 and 5.4, and there are indeed a number of fixes for the 8168 (failures after resume, EEE registers, MSI, issues with HW csum, power saving etc). It would be interesting to know if 5.4-stable fixes the issue or not.

Also, Ian, please do not forget to pass “-nn” to lspci so that it displays the PCI IDs in addition to the description. That allows to spot relevant changes in drivers.

linuxium
4 years ago

I respun the Ubuntu 18.03.4 ISO with the v5.4.3 kernel (from https://kernel.ubuntu.com/~kernel-ppa/mainline) and this did seem to fix the problem as booting the standard Ubuntu 18.03.4 ISO with its default kernel (5.0.0-23-generic) still replicated the problem. My testing wasn’t extensive though as it merely consisted of booting the v5.4.3 ISO and successfully performing an ‘apt update && apt upgrade’ then booting the standard ISO and watching the ‘apt upgrade’ fail and then repeating both boots to confirm the results. The ‘ethtool’ output using the v5.4.3 kernel doesn’t change: ubuntu@ubuntu:~$ uname -a Linux ubuntu 5.4.3-050403-generic #201912130841 SMP Fri Dec 13 08:43:59… Read more »

tkaiser
tkaiser
4 years ago

> driver: r8169
> version:
> firmware-version: rtl8168h-2_0.0.2 02/26/15

I was comparing with ODROID H2 where it looked like this:

Still wondering why some modern RTL8111 variants work out of the box and some need RealTek’s r8168 driver…

Willy
4 years ago

Yours uses a different MAC. According to the driver, Ian’s is RTL_GIGA_MAC_VER_46 while yours seems to be RTL_GIGA_MAC_VER_40. There’s a significant list of different code paths in the driver for them in 5.4 so this indeed explains the problems with earlier versions and why 5.4 fixes them.

linuxium
4 years ago

It is commit a7a92cf81589 (r8169: sync PCIe PHY init with vendor driver 8.047.01) that fixes the problem for the Beelink J45 and in particular the following change: - { 0x04, 0xffff, 0x154a }, + { 0x04, 0xffff, 0x854a }, In fact this is all that is needed as I recompiled the Ubuntu HWE kernel 5.0.0-23-generic (Ubuntu-hwe-5.0.0-23.24_18.04.1) which is the kernel used in the Ubuntu 18.04.3 ISO and only changed ‘0x154a’ to ‘0x854a’ and then respun the ISO with the new kernel and was able to boot and successfully perform an ‘apt update && apt upgrade’ which I couldn’t do when… Read more »

Willy
4 years ago

Great, now you just have to file a report to ubuntu so that they include this in their kernel 🙂

linuxium
4 years ago

Just for completeness I had a look at the source for ‘r8168-dkms’ and the Beelink J45 uses CFG_METHOD_30 which has the same updated value:

rtl8168_ephy_write(ioaddr, 0x04, 0x854A);

So using this r8168 module and then upgrading to Ubuntu 20.04 (Focal Fossa) which is slated to use the v5.5 kernel will probably be quicker than me raising any bug in Launchpad!

Boardcon Rockchip and Allwinner SoM and SBC products