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

@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:

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.