Manjaro ARM Beta 14 with Plasma Mobile (PinePhone / PinePhone Pro)

Beta 16 for Plasma Mobile is the best performing release for Pinephone so far in my experience. I tested on SD and worked so well, I subsequently flashed to eMMC and it’s even better. This is totally subjective but it seems even more stable on eMMC.

The only drawback I have seen is suspension. When the phone goes into suspend, there seem to be various problems, however this has been less of a problem while flashed to eMMC. Remediation of the issue can be done by activating ‘caffeine’. I have left the phone on all day, screen went blank, hit power button, and it came back with no problem.

On doing hdmi display testing I noticed that there was no sound. After some command line probing, I saw that there was a very good reason for this. “Note Device 4” below in output of “inxi -b --usb”:

System:
  Host: manjaro-arm Kernel: 6.4.16-1-MANJARO-ARM arch: aarch64 bits: 64 Console: pty pts/1
    Distro: Manjaro ARM
Machine:
  Type: ARM System: Pine64 PinePhone (1.2) details: N/A serial: 8a8e18f54402f7fe
Battery:
  ID-1: axp20x-battery charge: 49% condition: N/A/8.2 Wh
CPU:
  Info: quad core Model N/A [MCP] speed (MHz): avg: 648 min/max: 648/1152
Graphics:
  Device-1: sun50i-a64-mali driver: lima v: kernel
  Device-2: sun50i-a64-dw-hdmi driver: sun8i_dw_hdmi v: N/A
  Device-3: sun50i-a64-display-engine driver: sun4i_drm v: N/A
  Device-4: sun9i-a80-hdmi-audio driver: N/A
  Display: server: Xorg v: 1.21.1.10 with: Xwayland v: 23.2.3 driver: X: loaded: modesetting
    dri: sun4i-drm gpu: lima,sun8i_dw_hdmi,sun4i_drm tty: 126x71
  API: OpenGL Message: GL data unavailable in console, glxinfo missing.
Network:
  Device-1: mmc-pwrseq-simple driver: pwrseq_simple
  Device-2: sun50i-a64-emac driver: N/A
Drives:
  Local Storage: total: 28.91 GiB used: 4.76 GiB (16.5%)
USB:
  Hub-1: 1-0:1 info: full speed or root hub ports: 1 rev: 2.0
  Hub-2: 2-0:1 info: full speed or root hub ports: 1 rev: 2.0
  Device-1: 2-1:2 info: Quectel Wireless Solutions EC25 LTE modem type: vendor specific
    rev: 2.0
  Hub-3: 3-0:1 info: full speed or root hub ports: 1 rev: 1.1
  Hub-4: 4-0:1 info: full speed or root hub ports: 1 rev: 1.1
Info:
  Processes: 174 Uptime: 48m Memory: total: 3 GiB available: 2.92 GiB used: 1.01 GiB (34.4%)
  Init: systemd Shell: Bash inxi: 3.3.31

So basically, we have visual function to hdmi but no hdmi audio driver to push sound. Some suggestions to remediate this would be welcome; such as, do we have a “sun9i-a80-hdmi-audio” hardware driver?


Moderator edit: In the future, please use proper formatting: [HowTo] Post command output and file content as formatted text

There is this driver: 1016-ASOC-sun9i-hdmi-audio-Initial-implementation.patch · main · manjaro-arm / packages / core / linux-opi · GitLab – if this still has not made it into megi’s tree, I guess this patch should also be added to linux-pinephone.

Try Beta 16.

Bear in mind that Strit has not created a plasma mobile forum entry for Beta 16 yet, so as of right now (1/14/24) we cannot report to a Beta 16 forum except for individual entries.

Kevin, I want to thank you because although you don’t know it you have already helped me out two times before in the last 2 days. One was on kwallet deactivation, another was on powerdevilprofilesconfig to avoid suspension, and now an hdmi driver for pinephone. Thank you three times and I owe you.

Sorry, I forgot to mention help with wifi; “kcmshell5 networkmanagement” to fix getting around Pam integration and keep wifi password stored. That’s four; so thanks four times and I owe you.

@gilius I’ve merged your new thread about Beta 16 here in lieu of a new official thread.

FYI, @Strit left the team over a year ago just after FOSDEM 2023. However, @boredland and I saw him briefly while attending FOSDEM 2024.

1 Like

Well, this time, I have just done some hunting with a search engine and ended up back in Manjaro’s own repository (but in the linux-opi kernel). Then I checked linux-pinephone and it does not carry that patch. So, I concluded that, unless it was upstreamed at least to the megi tree (which does not seem the case, given that your PinePhone reports no driver), the patch should probably be applied also to linux-pinephone. I have not written the driver though. :wink:

Strit is not going to create the entry, he left Manjaro. Maybe someone from the remaining ARM team will, if more people test Beta 16 and confirm that it is viable. (It would not make much sense to announce something that turns out not working.)

The guy that posted the github Beta 16 update was philmmanjaro. I am sad that Strit left Manjaro.

Maybe it’s possible to enlist philmmanjaro’s help in getting hdmi driver in the manjaro plasma-mobile distro. I am not sure how to contact him in these forums tho, I am new here.

Well if @spikerguy already added it to another kernel, we might have missed that for another device it might be also useful. I can adopt this patch for sure to one of the newer kernels. However I didn’t had time to test the pinephone at all recently. Beta 16 was tagged a while ago. So if the community does an overall test, like:

  • device boots up
  • all applications pre-installed open up
  • overall UI is more or less working
  • basic features are working
    • audio & mic
    • phone calls
    • power management (like suspend)
    • I/O like audio jack, HDMI

… then we can write the release changelog and announcement for others to adopt to this version. For Beta 16 it is overdue.


Please check if this kernel has HDMI audio as wanted: https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/pipelines/12622

device boots up - Check
all applications pre-installed open up - Check
overall UI is more or less working - Check
basic features are working
    audio & mic - Check
    phone calls - Untested
    power management (like suspend)  - Suspend causes phone lockup problems
    I/O like audio jack, HDMI - HDMI works but has no sound

With stock Beta 16 (where it is expected that HDMI audio does not work yet) or with the kernel where that is supposed to work (see the link above, under the test checklist)?

Stock Beta 16

So can you please test the kernel that @philm asked you to test?

(I would, but I would have to get an HDMI cable first. I have the convergence dock, but not the standard HDMI cable to connect that to the TV.)

Update: I just realized I could “borrow” the HDMI cable from the cable TV box. External display support in Plasma Mobile is quite broken, making it quite painful to test this, but so far I can confirm that the current stable kernel does indeed not support HDMI audio. Now I need to test the one @philm built.

Update 2: I tested the kernel 6.7.5-2, but unfortunately there is no difference:

[kevin@plasma-mobile ~]$ uname -a
Linux plasma-mobile 6.7.5-2-MANJARO-ARM #1 SMP PREEMPT Sun Feb 18 01:54:01 UTC 2024 aarch64 GNU/Linux
[kevin@plasma-mobile ~]$ inxi -b --usb | grep hdmi-audio
  Device-4: sun9i-a80-hdmi-audio driver: N/A

and I see no HDMI output in the sound settings. sun9i_hdmi_audio shows up in lsmod, but does not seem to actually claim the hardware.

The change was adding CONFIG_SND_SUN9I_HDMI_AUDIO=m to be added. I checked the headers package and it is now active. Was it modprobed? You should find some like this: /usr/lib/modules/6.7.5-2-MANJARO-ARM/kernel/sound/soc/sunxi/sun9i-hdmi-audio.ko.xz

The file is there. I tried to manually sudo modprobe sun9i-hdmi-audio and that did not do anything. (It did not complain, but it also did not change the driver: N/A situation or the lack of HDMI output in the sound settings. )

So I am quite confused: the driver is obviously there, it loads, but it does not do anything.

Does it need some sort of firmware installed?

How would I know? I see no complaint in dmesg nor journalctl -b in any case.

The driver loads, but does absolutely nothing. If I test with HDMI plugged in (which is what I have also been doing before), the picture works, but I do not see any HDMI sound device anywhere, neither in alsamixer, nor in amixer, nor in pactl, nor in the Plasma Mobile UI.

do we know if any other Linux distro supporting the pinephone have HDMI-Audio available?

I have no idea. I am not even sure that the hardware actually supports it. (The SoC seems to support it, but is it correctly wired?) What I find bizarre is that the driver loads, does not complain, but then does not actually create an ALSA device, and inxi still sees a HDMI audio device with no driver.

I guess another good question would be, does that driver actually work on any other hardware, such as the Orange Pi for which Manjaro has been carrying the patch for a while? But that is a question I cannot answer, the PinePhone is the only Allwinner A64 device I have available.

The DTS files enable HDMI sound, which on one hand means somebody seems to claim it should work, but on the other hand means that it is also not an issue with the DTS files (which would have been my next guess).

What I see is that the HDMI wiring is actually quite complicated, in that the A64 SoC outputs HDMI, which is then translated to USB C DisplayPort by the ANX7688 chip, which is then translated back to HDMI by some chip on the dock. The sound could be lost in translation somewhere. The ANX7688 chip supposedly supports HDMI audio (DisplayPort can also carry the audio), but I am not sure what chip the dock shipped with the PinePhone uses to convert the DisplayPort signal back to HDMI. (The Pinebook Pro dock uses an IT6564 chip, which also claims to support audio, but the small PinePhone dock might be using a completely different chip.) Though it might be that sound would actually work, if only it were detected to begin with, which is where the problem seems to lie.

In this Pipewire bug report from 2021, somebody got an HDMI audio ALSA device created (on Mobian) on the PinePhone (and then ran into an issue in Pipewire that the devices had the wrong priority order, which appears to have been already fixed). It does not say whether the device actually works, but it shows up, which it does not for me.

Hmmm, now that I think of it: Could it be that the kernel is getting an old device tree (from U-Boot or something) in which HDMI audio is missing or disabled? Can I somehow force using the device tree that ships with the kernel source?

I guess that is it: The .dtsi from U-Boot is much shorter and does not enable sound_hdmi as the one in the kernel does. The corresponding snippet from sun50-a64.dtsi is also missing in the U-Boot sun50-a64.dtsi. – Well, various sources of information say that the files in the U-Boot source tree should only be used by U-Boot itself and that what U-Boot passes to the kernel is actually a file that ships with the kernel and comes fom the kernel source tree. So I am still confused as to what is actually going on here.