Fix is merged. Binary packages for v20.05 branch and master are building now. I'll close this issue as soon as people can just hit "update" on their phones and install the fix.
@MartijnBraam reported that it's working on the HDMI port of his DELL monitor, but not on another 10" monitor.
It does not work on my Philips monitor.
More feedback whether it works for you or not is appreciated (just reply to this specific message).
Newer versions of the kernel with megi's patches should have better HDMI support, but we will need to adjust some things to keep the modem working. This is the path forward, but it will take some time to be done properly, and to have everything tested before we ship it as update.
(Before anybody complains... we wrote "for Linux enthusiasts" all over, for a reason. This is a community project, we are doing our best with the few resources we have and help is appreciated.)
Vizio TV via USB-C dock that shipped with the convergence edition PinePhone
NexDock 2 via USB-C cable (tried two different cables to be sure)
...after an apk update && apk upgrade on my PinePhone. Neither seemed to work; the phone display appeared to switch to a console after plugging into the NexDock, but I didn't get output on the NexDock's display.
I have tested it on a BenQ GW2480, it showed the wallpaper for 3 seconds then stopped working.
I also tested it on ASUS and Dell monitors with non of them working at all.
It worked perfectly on an ACER SB220Q with no issues.
After updating to the latest software as of 2020-09-05 in the Software GUI, I get zero output on a Samsung LN46D630. It also causes a total and complete display crash on the main touchscreen (down to '^@' and high-pitch mono speaker scream -- oof)
Not much log output on the dmesg before that. Something gets set to 0x00.
I updated my recently purchased convergence Pinephone and tried a number of monitors with no success: Dell U2212 xwide and Compaq 5017m.
When plugging in the usb-c with the hdmi monitor attached, the monitor will flicker and the phone's screen goes blank, looking hopeful for a few seconds, sometimes there's two or three odd at-sigh/@ characters in the upper left of the phone's screen. Then the monitor goes blank and the phone's screen returns with the Postmarketos x/gui interface. So tantalizingly close!!
ALSO: When re-starting the phone with the usb-c-via-hdmi monitor attached the external monitor actual works in the initial text mode! See attached screen shot from the Compaq 5017m monitor, with the Pinephones' encrypted pw prompt. But as soon as the Postmarketos x/gui comes up the monitor goes blank and only the phone's screen displays.
Hope that helps, best of luck in finding a solution!!
For what it's worth below is the dmesg output that's logged when I plug the usb-c/hdmi monitor in:
Dmesg output that's logged when I plug the usb-c/hdmi monitor in:
`
[ 169.594859] anx7688 1-0028: plug irq (cd=1)
[ 169.607491] anx7688 1-0028: cable inserted
[ 169.647505] anx7688 1-0028: power enabled
[ 169.711915] anx7688 1-0028: eeprom0 = 0x03
[ 169.711934] anx7688 1-0028: fw loaded after 40 ms
Hello, thanks for your work on this! Another report:
Recently upgraded to Linux pinephone 5.8.0 #4 (closed)-postmarketos-allwinner via the apk upgrade.
Still no luck with the external monitor, when plugged in the phone goes blank for a few seconds, but then returns, no display on the Dell U2212 (native: 1920x1080) monitor.
On Discord there's mention of 'megi's kernel having fixed this for PMos:
( Install megi's kernel... or use pboot to test out postmarketOS with a 5.9 kernel
https://megous.com/git/p-boot/tree/README )
Will these 5.9 changes be coming to the official PM apk repo?
Thanks again! FWIW below is the dmesg output when plugging in the external monitor under 5.8:
[126635.233364] anx7688 1-0028: plug irq (cd=1)
[126635.248345] anx7688 1-0028: cable inserted
[126635.288352] anx7688 1-0028: power enabled
[126635.352798] anx7688 1-0028: eeprom0 = 0x03
[126635.352810] anx7688 1-0028: fw loaded after 40 ms
[126640.243533] elogind-daemon[2641]: Failed to create inotify watch on /dev/null/utmp,
ignoring: Not a directory
[126640.244911] elogind-daemon[2641]: New session c11 of user user.
[126640.925640] anx7688 1-0028: dp state changed to 0x05
[126642.973579] anx7688 1-0028: dp state changed to 0x04
[126643.997586] anx7688 1-0028: dp state changed to 0x05
Ive tested on my Philips 4K TV and also on a Fujitsu monitor which sway lists as "Fujitsu Siemens Computers GmbH B22W-6 LED pG YV4G149090".
None of them manage to get output working on my PinePhone pmOS CE 3GB edition and supplied USB-C dock.
Before anybody complains... we wrote "for Linux enthusiasts" all over, for a reason
Just to be clear: Not complaining. This is clearly an enthusiast project, and I'm just trying to help as I can, by reporting in what I can reproduce with the equipment I have
I now tested on another monitor (Samsung S24C450) and I'm still getting the same behaviour: no output.
This is what I'm seeing in dmesg when connecting and disconnecting the hub with the HDMI-cable already connected:
On connect:
[ 1705.104806] anx7688 1-0028: plug irq (cd=1)[ 1705.120387] anx7688 1-0028: cable inserted[ 1705.160413] anx7688 1-0028: power enabled[ 1705.224882] anx7688 1-0028: eeprom0 = 0x03[ 1705.224902] anx7688 1-0028: fw loaded after 40 ms[ 1705.225444] anx7688 1-0028: OCM firmware loaded (version 0x2312)[ 1705.228645] anx7688 1-0028: send pd packet cmd=0 05 00 32 90 01 26 12[ 1705.273716] anx7688 1-0028: send pd packet cmd=1 05 01 2c 91 01 26 16[ 1705.275473] anx7688 1-0028: send pd packet cmd=2 11 02 00 00 00 ec 00 00 00 00 00 00 00 00 39 00 00 51 77[ 1705.278370] anx7688 1-0028: send pd packet cmd=3 05 03 00 00 01 ff f8[ 1705.280117] anx7688 1-0028: OCM configuration completed[ 1705.281715] anx7688 1-0028: status changed to 0x00[ 1705.281732] anx7688 1-0028: cc_status changed to CC1 = SRC.Open CC2 = SRC.Open[ 1705.281741] anx7688 1-0028: dp state changed to 0x00[ 1705.376672] anx7688 1-0028: status irq[ 1705.378320] anx7688 1-0028: soft = 0x0c[ 1705.379622] anx7688 1-0028: status changed to 0x0c[ 1705.716269] anx7688 1-0028: status irq[ 1705.717964] anx7688 1-0028: soft = 0x30[ 1705.719228] anx7688 1-0028: status changed to 0x2c[ 1705.719234] anx7688 1-0028: cc_status changed to CC1 = SRC.Ra CC2 = SRC.Rd[ 1705.719347] anx7688 1-0028: data role change requested to dfp[ 1705.719378] phy id_det change to host[ 1705.952390] usb 1-1: new high-speed USB device number 2 using ehci-platform[ 1706.110982] hub 1-1:1.0: USB hub found[ 1706.111173] hub 1-1:1.0: 4 ports detected[ 1706.229040] anx7688 1-0028: status irq[ 1706.230766] anx7688 1-0028: soft = 0x01[ 1706.234443] anx7688 1-0028: recv ocm message cmd=22 05 16 32 c8 00 12 d9[ 1706.359877] anx7688 1-0028: status irq[ 1706.361566] anx7688 1-0028: soft = 0x01[ 1706.365225] anx7688 1-0028: recv ocm message cmd=1 05 01 2c 91 01 05 37[ 1706.382478] anx7688 1-0028: status irq[ 1706.384081] anx7688 1-0028: soft = 0x01[ 1706.387803] anx7688 1-0028: recv ocm message cmd=2 11 02 39 06 00 6c 00 00 00 00 12 02 20 a0 db 00 00 00 93[ 1706.388382] anx7688 1-0028: status irq[ 1706.390012] anx7688 1-0028: soft = 0x01[ 1706.393671] anx7688 1-0028: recv ocm message cmd=3 09 03 39 06 01 ff 00 00 00 00 b5[ 1706.395111] anx7688 1-0028: status irq[ 1706.396744] anx7688 1-0028: soft = 0x01[ 1706.400402] anx7688 1-0028: recv ocm message cmd=39 09 27 03 80 01 ff 05 0c 00 00 3c[ 1706.401425] anx7688 1-0028: status irq[ 1706.403042] anx7688 1-0028: soft = 0x01[ 1706.406697] anx7688 1-0028: recv ocm message cmd=25 01 19 e6[ 1706.500415] usb 1-1.1: new full-speed USB device number 3 using ehci-platform[ 1707.040436] usb 1-1.2: new high-speed USB device number 4 using ehci-platform[ 1707.312554] usbcore: registered new interface driver r8152[ 1707.322729] usbcore: registered new interface driver cdc_ether[ 1707.504488] usb 1-1.2: reset high-speed USB device number 4 using ehci-platform[ 1707.747668] r8152 1-1.2:1.0: skip request firmware[ 1707.778474] r8152 1-1.2:1.0 eth0: v1.11.11[ 1708.725781] anx7688 1-0028: dp state changed to 0x04[ 1709.749768] anx7688 1-0028: dp state changed to 0x05
On disconnect:
[ 1754.411401] usb 1-1: USB disconnect, device number 2[ 1754.411420] usb 1-1.1: USB disconnect, device number 3[ 1754.412289] usb 1-1.2: USB disconnect, device number 4[ 1754.414842] r8152 1-1.2:1.0 eth0: Stop submitting intr, status -108[ 1754.425217] anx7688 1-0028: status irq[ 1754.431055] anx7688 1-0028: soft = 0x0c[ 1754.432505] anx7688 1-0028: status changed to 0x20[ 1755.094527] anx7688 1-0028: plug irq (cd=0)[ 1755.095160] anx7688 1-0028: status irq[ 1755.096867] anx7688 1-0028: soft = 0x20[ 1755.098164] anx7688 1-0028: status changed to 0x00[ 1755.098320] anx7688 1-0028: data role change requested to ufp[ 1755.098365] phy id_det change to device[ 1755.108006] anx7688 1-0028: cable removed[ 1755.124078] anx7688 1-0028: power disabled
When plugging in HDMI, I get the following from dmesg
[ 206.207721] anx7688 1-0028: dp state changed to 0x00[ 211.327774] anx7688 1-0028: dp state changed to 0x03[ 211.796689] rfkill: input handler enabled[ 213.150112] elogind-daemon[2754]: Removed session c4.[ 213.363936] elogind-daemon[2754]: Failed to create inotify watch on /dev/null/utmp, ignoring: Not a directory[ 213.365214] elogind-daemon[2754]: New session c5 of user user.[ 213.375797] anx7688 1-0028: dp state changed to 0x04[ 214.399760] anx7688 1-0028: dp state changed to 0x05[ 217.893116] rfkill: input handler disabled
I have the PostmarketOS CE Pinephone 3gb. I have tried 4 different HDMI cables(Amazon Basic, Monster, RocketFish, Generic) with the provided adapter(powered) and also a 3rd party adapter(Anker). It was tried on 2 tvs(Samsung, Toshiba), 2 moniters(Asus, Assure) and 1 projector(Samsung). No display out though HDMI still. Thank you for the effort you have been putting into this project.
Although it's also broken for me, i'm experimenting with xrandr, and the hdmi monitor is listed as XWAYLAND1 and seems correct. Any tips on if this is a fruitful path? If you can fill us in on the best way to work with the hdmi out in future that would be helpful. Thanks.
@MakeSaltLake Along those same lines, I installed wlr-randr as the Wayland equivalent and it seems to detect that the HDMI output is plugged in and even thinks it's enabled (in my case, it's a Vizio TV). But there's no actual output.
At the end of his post he has the following observation:
Another issue is a heavy power consumption (4W) from the dock when HDMI output is enabled. Also dock's display output doesn't seem to work when powering the dock from the USB-C power supply.
I must admit I've always powered the dock when doing these tests (and couldn't get anything to work). Can anyone who has made this work (or nor work) verify their findings against if they've powered the HUB or not?
Maybe that's why we're all seeing different, seemingly random observations here?
[ 738.843461] anx7688 1-0028: dp state changed to 0x00[ 754.203239] anx7688 1-0028: dp state changed to 0x03[ 754.517595] rfkill: input handler enabled[ 755.227285] anx7688 1-0028: dp state changed to 0x04[ 756.030390] elogind-daemon[2774]: Removed session c4.[ 756.252978] elogind-daemon[2774]: Failed to create inotify watch on /dev/null/utmp, ignoring: Not a directory[ 756.254322] elogind-daemon[2774]: New session c5 of user user.[ 757.275294] anx7688 1-0028: dp state changed to 0x05[ 760.347132] anx7688 1-0028: dp state changed to 0x04[ 761.371347] anx7688 1-0028: dp state changed to 0x05[ 762.159746] rfkill: input handler disabled
Without power is looks almost the same.
Two thing I eye spy -- why is /dev/null being treated like a directory here? Only seems to happen on HDMI plug-in. Maybe something wrong there. I'm guessing that "null" there is from a variable and that nobody hand-typed /dev/null/something
Next thing I notice is the dp state changes to 3, 4, or 5 on plug in (kind just rolls across them) and then back to 0x00 when disconnecting. So... the hardware is working, it looks like.
Absolutely nothing on the display btw no matter what I tried.
Most strangely is that when I do plug in the display I can leave out the right side of the pine display and if I come back quickly enough I can even spot the small size mouse. I think the display is connected in software somehow, despite nothing being sent to it.
HDMI output works on pmOS Gnome on megi's 13 distribution image [0] which is using megi's kernel. So, maybe packaging it alongside the normal kernel and letting users optionally install it would be ideal? I can see that it will not be the default !1533 (closed)
Yes, megi's 13-pBoot works for me too with the dock and external monitor!
(Just have to figure out how to expand the friggin BTRFS partition, getting unsupported optional features (10), but that's another story).
It's great to see the display working, but any idea how to get apps to display on it? Title-bar dragging doesn't work, or is not available.
On standard Debian I can disable my laptop's built-in display when working with a monitor via setup. I did not see that functionality with megi's 13 on either Mobian or PMos.
Chess and the flashlight app work on Mobian, how cool is that?
Kind of amazed I got this far with PinePhone and the convergence package.
I'm happy to read that it works with megi's current branch!
There are still different opinions on what's the right kernel to ship in the core team (who are the people who will essentially maintain this kernel in postmarketOS), so I'll bring this up in the next team meeting and try to make it so that we can ship an updated kernel next week where this works by default. And also have a clear path forward to which kernel versions to update to.
Thank you all in this thread very much for all the invaluable feedback!
@ollieparanoid About the choice between megi's kernel and the one found on pine64's gitlab,
I think megi's kernel may also fix manual suspend on 1.0 and Braveheart (#774 (closed)) because it's working on megi's p-boot (13 distro) demo image (pmos+phosh).
I've reproduced that HDMI works with megi's multiboot image on three monitors.
So after lots of discussion, we will likely just ship megi's kernel tree. As you all know, he drives PinePhone kernel related development forward like no other, his tree and changes are well documented on his homepage and he frequently publishes tested "build this one" commits with the latest improvements. So it should make a faster and less time consuming workflow to simply package these versions (after a smoke test) into pmOS edge and after some time (to catch regressions) ship the same version in pmOS stable.
With that being said, I'm working on an update since yesterday and unfortunately HDMI does not simply work when building the kernel from source as our linux-postmarketos-allwinner package. It seems to be related to our kernel config, so I've tried to build with pinephone_defconfig from megi's branch (+pmOS changes to make pmbootstrap kconfig check happy), but same result. It might get fixed when changing a bunch of kernel modules from =m (build as module) to =y (build into the kernel), as it was done in pinephone_multidist_defconfig (the one used in the multiboot image). Other things are also broken, we'll need to adjust some alsa related things etc. So it will take some more time until it's actually shipped, but I'm on it.
Megi's image does have a lot of key functionality. Kudos for looking at merging those changes, perhaps switch back when appropriate and all is working in your branch? Until then Megi's image looks good to go.
Thanks again to you and your team (and Megi!!) for your hard work and keeping PMos w/PPhone on track.
With help from ollieparanoid, I noticed that whether external display works in my kernel or not depends on whether the user uses p-boot display mode or not (p-boot without display support, or without splash screen, or u-boot).
I fixed this issue. It related to what parent the MIPI-DSI clock had on boot.
There's still one issue where external display only works if the phone is booted with dock connected but not when the dock is first connected after boot. That one still remains to be investigated.
The symptoms are that TCON1 clock is not enabled when the dock is connected only after boot, for some reason.
After this is fixed, the use of external display should become much more reliable.
Hopefully, I'll manage to figure out the fix prior to 5.9 release next week.
So once the complete fix is out, we should be able to ship it in postmarketOS :)
I connected the dock to the running phone and then a BENQ GL 2450. Previously this didn't work at all, now it shows a portion of the background image. I have yet to see whether it's working correctly when I have some more time but it's definitely progress.
Try connecting a keyboard, open an application, and then press Super ("Windows key") + Shift + Right arrow key. If this doesn't work, try a different arrow key.