# A04 potential X performance problems + potential solution

**URL:** https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813
**Category:** DevTerm
**Tags:** feedback, tinkering, video
**Created:** [January 5, 2022, 9:48pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813 "2022-01-05T21:48:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 5, 2022, 9:48pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/1 "2022-01-05T21:48:44Z")

</div>

While setting up my DevTerm A04, I noticed this error in ~/.local/share/xorg/Xorg.0.log:

```auto
[36.649] (II) Initializing extension GLX
[36.652] (EE) AIGLX error: sun4i-drm does not export required DRI extension
[36.758] (II) IGLX: Loaded and initialized swrast
[36.762] (II) GLX: Initialized DRISWRAST GL provider for screen 0

```

Coupled with what seemed to me to be sluggish UI, it made me suspect that the system was in fact using software rendering. I did a little research and found that this is caused by the sun4i DRI driver having a hyphen in its name, which messes up the Xorg module loader code. This is fixed upstream ([glx: fixup symbol name for get\_extensions function (!412) · Merge requests · xorg / xserver](https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/412)), but the version of the Xorg server in Armbian 21.11 (Ubuntu 21.04) is 1.20.11, which is too old to have the fix, which is in 1.21.

I pulled the source for Xorg, dropped the patch from fd.o into it, rebuilt it, installed it, and now I see:

```auto
[36.517] (II) Initializing extension GLX
[36.817] (II) AIGLX: Loaded and initialized sun4i-drm
[36.818] (II) GLX: Initialized DRI2 GL provider for screen 0

```

and, subjectively at least, graphics performance does seem to be better.

I’ve created a PPA ([Xorg packages for the Clockworkpi DevTerm A04 : Anna Glasgall](https://launchpad.net/~aglasgall/+archive/ubuntu/devterm-a04-xorg/)) and uploaded my patched package to it. In a couple hours once the builds finish, if you want to try it out for yourself, do

```auto
sudo apt-add-repository ppa:aglasgall/devterm-a04-xorg && sudo apt update && sudo apt upgrade

```

to install the patched packages.

ClockworkPi folks, would you consider including this in your next OS image/apt repository update?

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 5, 2022, 10:15pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/2 "2022-01-05T22:15:57Z")

</div>

Packages are built and the PPA should be usable now.

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 7, 2022, 9:45pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/3 "2022-01-07T21:45:16Z")

</div>

I don’t want this to get lost in the shuffle entirely - ClockworkPi folks (@guu ?), any thoughts on including this?

---

<div class="post-metadata">

### Author: ![adcockm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/adcockm/32/1664_2.png) [@adcockm](https://forum.clockworkpi.com/u/adcockm)
#### Post date: [January 8, 2022, 11:05am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/4 "2022-01-08T11:05:08Z")

</div>

For what it’s worth, I checked my A06 and this appears to only be a problem with AIGLX on the A04.

This was in my log:

```auto
[32.324] (II) Initializing extension GLX
[32.641] (II) AIGLX: Loaded and initialized rockchip
[32.642] (II) GLX: Initialized DRI2 GL provider for screen 0

```

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 8, 2022, 4:03pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/5 "2022-01-08T16:03:42Z")

</div>

Yes, the A04 and A06 are wildly different SoCs (Allwinner H6 and Rockchip RK339, respectively).

---

<div class="post-metadata">

### Author: ![poulsbo](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/poulsbo/32/5845_2.png) [@poulsbo](https://forum.clockworkpi.com/u/poulsbo)
#### Post date: [January 8, 2022, 7:33pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/6 "2022-01-08T19:33:50Z")

</div>

> [@annathyst](#):
>
> ```auto
> sudo apt-add-repository ppa:aglasgall/devterm-a04-xorg
> 
> ```

I had to follow these instructions to get this to work: [18.04 - sudo add-apt-repository hangs - Ask Ubuntu](https://askubuntu.com/a/1265444/531079)

After adding the repository and running `sudo apt update && sudo apt upgrade`, my log no longer shows the GLX error.

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 8, 2022, 8:44pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/7 "2022-01-08T20:44:37Z")

</div>

Note that this isn’t a function of the PPA, it’s a function of your home network’s or ISP’s IPv6 setup. I can’t work around that at the PPA end, sorry.

---

<div class="post-metadata">

### Author: ![ehm.education](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ehm.education/32/4494_2.png) [@ehm.education](https://forum.clockworkpi.com/u/ehm.education)
#### Post date: [January 8, 2022, 10:17pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/8 "2022-01-08T22:17:24Z")

</div>

Thanks @annathyst your solution works perfectly. It would have taken me way too long to find that error and I wouldn’t have been able to do anything about it myself.

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [January 28, 2022, 2:58pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/9 "2022-01-28T14:58:51Z")

</div>

Strange that if I compile the image by myself using the DevTerm github Armbian source, I don’t see this error in dmesg.

This is what I get for xorg server version:  
`ii xserver-xorg-core 2:1.20.13-1ubuntu1~20.04.2 arm64 Xorg X server - core server`

not 1.21 but no errors. Any thoughts on this?

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 28, 2022, 9:18pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/10 "2022-01-28T21:18:51Z")

</div>

Do you have an A04? This only applies to DevTerms with the A04 “core module”. The CM3, A04, and A06 modules have wildly different SoC (System-on-Chip)s.

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [January 29, 2022, 7:20am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/11 "2022-01-29T07:20:52Z")

</div>

Yes, a04. I can observe it before, using stock image and fixed it using your PPA, but it doesn’t show on freshly compiled image.

Actually if i grep GLX in dmesg output, there’s nothing, not even successful msg.

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [January 30, 2022, 5:11am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/12 "2022-01-30T05:11:09Z")

</div>

The log entries are from ~/.local/share/xorg/Xorg.0.log, not the kernel dmesg buffer (as they’re from the X server, not the kernel).

---

<div class="post-metadata">

### Author: ![Alan\_Ball](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/alan_ball/32/5312_2.png) [@Alan\_Ball](https://forum.clockworkpi.com/u/Alan_Ball)
#### Post date: [January 31, 2022, 4:13am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/13 "2022-01-31T04:13:31Z")

</div>

worked great! thank you!

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [February 1, 2022, 10:31am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/14 "2022-02-01T10:31:59Z")

</div>

Ok thanks! I remembered seeing that log on stock image now!

However, my newly compiled image doesn’t even have `~/.local/share/xorg/ ` path.

A search found it in /var/log and shows no error.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/8/87c061489c14ec247f18583425dd4cae50aa6cfc.jpeg)

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [February 1, 2022, 10:37am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/15 "2022-02-01T10:37:35Z")

</div>

Also got an impression that newly compiled image generates much less heat even I put cpu to 4 cores on with on-demand policy. Haven’t looked into it yet.

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [February 1, 2022, 10:58pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/16 "2022-02-01T22:58:35Z")

</div>

Did you build the new image from tip of tree for armbian or from the commit specified in the README?

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [February 2, 2022, 12:10am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/17 "2022-02-02T00:10:52Z")

</div>

Also, when you built the new image, which distribution did you pick to take non-kernel/bootloader packages from?

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [February 2, 2022, 9:13am UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/18 "2022-02-02T09:13:23Z")

</div>

Used some guides from:

> **[DevTerm/Code/patch/armbian\_build\_a04 at main · clockworkpi/DevTerm](https://github.com/clockworkpi/DevTerm/tree/main/Code/patch/armbian_build_a04)**
>
> main/Code/patch/armbian\_build\_a04

(patch section has wrong paths, you can figure out by yourself)

Armbian source has to be commit 5fa022603c0948cc59688ba782b3711f980a0be3 as stated above, otherwise patches won’t apply.

Distribution is 20.04 LTS (focal) to match stock image. (just want to first reproduce stock image before beginning to customize my own ones)

---

<div class="post-metadata">

### Author: ![annathyst](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@annathyst](https://forum.clockworkpi.com/u/annathyst)
#### Post date: [February 2, 2022, 6:35pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/19 "2022-02-02T18:35:41Z")

</div>

So that actually explains it - the stock image is actually based on Ubuntu 21.04 (hirsute), not 20.04 (focal). hirsute is out of support now and won’t have gotten hardware enablement backports from impish (21.10) like focal will have (since focal is an LTS).

Interesting that the patches didn’t apply for you with armbian tip - I built an image last night and they seemed to.

---

<div class="post-metadata">

### Author: ![intelliarm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/intelliarm/32/411_2.png) [@intelliarm](https://forum.clockworkpi.com/u/intelliarm)
#### Post date: [February 2, 2022, 9:32pm UTC](https://forum.clockworkpi.com/t/a04-potential-x-performance-problems-potential-solution/7813/20 "2022-02-02T21:32:37Z")

</div>

Thanks! I thought the stock is 20.04, but just double checked, it’s indeed 21.04 as you said. I think I will go with the LTS for now.
