I initially assumed this was due to hardware failure (as I dropped my phone and messed up the screen), but yesterday someone claimed to have the same issue with "original sxmo" (i.e. postmarketOS version as opposed to the Arch Linux port) only 2 days ago, so I decided to file this bug report. I have the postmarketOS CE PinePhone and he has the KDE CE PinePhone. Mine is from the convergence package, not sure about his.
I tried convergence a couple of days ago for debugging an issue and I noticed that my keyboard & mouse over USB worked, but that HDMI didn't come up (552 Mhz RAM).
@ollieparanoid OK/FAIL is that completely or partially like I had?
Unfortunately 528 MHz + 5.11.10 kernel does not fix it. I've just tested that setup and it doesn't work for me. It seems to only work sporadically :\ I can confirm that when it does not work, mouse + keyboard don't work either.
@MartijnBraam, as discussed, assigning you to this in order to do a bisect. Here's how I'd approach it:
Before bisect
reproduce the problem with current kernel on edge or v21.03 (we have the same kernel right now)
if it can't be reproduced, try multiple times until it can be reproduced
(since this time not just hdmi is broken, but also keyboard and mouse, the whole dock basically, I doubt it relates to the monitor used. but maybe also check that if it can't be reproduced otherwise)
check with other distros that run megi's kernel, is it also broken there? if not, what are the differences? if we can be sure that it works with another distro, then this is a big shortcut.
report where you can reproduce it and where you can't in this issue
Find known good kernel
find a known working kernel
be 100% certain that it works there, try multiple times, try with reboots. if we mess this up, the whole bisect is for nothing.
maybe the last 5.10.x kernel we had in pmOS? 3ce53843
or one from before, if that one does not work reliably (git log main/linux-postmarketos-allwinner)
or maybe the one from v20.05
report known good kernel here
Reproduce with kernels built from git repo
Clone megi's kernel tree somewhere, check out the known working commit. Build it with either pmbootstrap build --src=path/to/kernel linux-postmarketos-allwinner (or maybe envkernel). Note that patches from pmaports are not applied, but they are probably not relevant.
Make sure the kernel built from here does work (and be absolute certain, same care should be applied for future tests).
Then check out the known bad kernel commit. Build it, and verify that it does not work.
After these tests, we know that the patches from pmaports are not relevant to the failure and we can do the bisect.
Run bisect
Use git bisect with the good and bad commits. On each commit it wants you to try out:
note down in a separate document which commit this is (the process will take forever, that's why)
build it
install it on the pinephone
carefully verify whether the bug is present or not
note result in separate document
tell git the result, it will give the next commit, repeat.
When done properly, we will know which commit introduced this regression.
I tried to debug this today, I tried it with multiple pinephones (3GB pmos CE, 2GB ubports CE, a random prototype) and it just keeps working flawlessly for me. I used the official dock and a mouse/keyboard attached to verify everything works. I tried but an image from current edge with phosh and an SD with a build from 2 weeks ago.
@Newbyte can you get the full dmesg output from a failure case?
I can reproduce this on the most recent Beta 3GB convergence device. I'm running edge from May 5, installed to eMMC via the installer, and I can verify video-out does indeed work using the factory Manjaro image.
Attached is dmesg.log with this sequence of events:
The device was already powered up.
Then I attached the official USB-C dock.
Last I connected the HDMI cable which produced the final DP state changed to 0x03 entry.
I've tried other combinations as well (booting with the dock already plugged in, powered, unpowered, another dock, different HDMI devices) but all produce the same results. I have a dock for my desktop with quite a few peripherals connected and all of them work as expected (keyboard, mouse, ethernet, USB audio); only video-out is missing.
The behavior I'm seeing isn't specific to Postmarket. I've tried Postmarket's Phosh, Plasma, and Sxmo installers but I also see the same results with nightlies for Fedora, Manjaro Phosh, and Manjaro Plasma. Video-out only works on that older factory image for my device.
I can confirm that video out works with that old factory image on my device too. Although when I got my Pinephone yesterday, it worked with the preinstalled Plasma Mobile, which may mean it may work with other images. Sadly testing Arch/Phosh, Mobian/Phosh made no changes.
Same issue here. I got my pinephone three days ago and went from preinstalled plasma to arch/phosh, then to mobian/phosh and now I'm on postmarketOS/phosh. I've tried hdmi connection in three different screens and many plugging combinations, but no signal except the original installation. All other ports work just fine.
I'm not sure what firmware version shipped with my phone but I flashed the new version just in case. I haven't been able to recreate the plug/unplug/reboot behavior that you and Ozan described yet but I'll keep poking at it.
According to mfor in the "Pine64 Global" group on Telegram, convergence is more reliable if you have the modem disabled? It sounds very strange. He also claims that this is an issue of power, and as such it helps to turn off the internal display.
When I use the dock it is always connected to a power source for the following reason:
Now, Pine64 sells convergence edition Pinephone meant for use with a dock and a monitor.When you connect the phone to the dock with monitor connected over HDMI, power consumptionjumps by 4W. That alone is close to this specified limit of the battery. Baseline power consumptionis 2.8W (with phone display on). Now if you actually use the phone the CPU alone can add further 2.5Wduring full load (likely, when trying to use the pinephone as a desktop machine). That is >9W total.That is well over the specified safe limit. Of course, the rest of the phone heating up a lot from this huge power draw don't help the at all, either.
@dylanvanassche wrote the following in duplicate issue #921 (comment 582601966), moving to this thread:
Hmmm this problem is back and it affects more kernels (5.11.10 in this case)!
I noticed that I could have the USB devices working from the dock, the display gets recognized in Settings, but nothing on the display.
dmesg is spammed with:
[ 1250.768430] musb_bus_suspend 2527: trying to suspend as a_wait_bcon while active
This goes away when the dock gets unplugged.
I pinged megi on Matrix/IRC, let's see what happens.
Maybe it relates to how much the pinephone is charged. I was able to use the dock without problems several times in a row as it was charged >= 75%, and now that it is around 50 %, it did not work.
Can people affected by this try to confirm it?
Note that you can increase the max. charge to 100 % in postmarketos-tweaks.
@MartijnBraam: it's basically always working for you - do you remember how much the battery is typically charged when you use it, and can you try to reproduce the error with a less full battery?
Hmmm even with a full battery I have this problem. Also depends on the HDMI clocks or something I read in the dev channel. I haven't looked much further into it yet.