2021–06–14:
Hints on debugging HDMI output on Pinephone
Some people have issues using external monitor with pinephone.
There are some ways to debug it. The most reliable one is to check the state
of DRI in debugfs.
If you expect output on the monitor and there's none, you can check contents
of file /sys/kernel/debug/dri/0/state
or
/sys/kernel/debug/dri/1/state
to see what it says about the current
state of the display pipeline as configured by your compositor. With only
internal display turned on it will contain:
...
crtc[45]: crtc-0
enable=1
active=1
self_refresh_active=0
planes_changed=1
mode_changed=0
active_changed=0
connectors_changed=0
color_mgmt_changed=0
plane_mask=2
connector_mask=1
encoder_mask=1
mode: "720x1440": 60 72000 720 750 778 808 1440 1458 1468 1485 0x48 0xa
crtc[54]: crtc-1
enable=0
active=0
self_refresh_active=0
planes_changed=0
mode_changed=0
active_changed=0
connectors_changed=0
color_mgmt_changed=0
plane_mask=0
connector_mask=0
encoder_mask=0
mode: "": 0 0 0 0 0 0 0 0 0 0 0x0 0x0
connector[56]: DSI-1
crtc=crtc-0
self_refresh_aware=0
connector[58]: HDMI-A-1
crtc=(null)
self_refresh_aware=0
If you have in your dmesg:
...
DP state changed to 0x03
...
as the last DP state changed
message, you should be able to just
see your monitor's modes and enable the HDMI output via xrandr
if
you're using Xorg
, or equivalent tool if you use
something else.
It's the role of the compositor to enable the output to HDMI, so if you see
connector[58]: HDMI-A-1 crtc=(null)
and not
connector[58]: HDMI-A-1 crtc=crtc-1
and some reasonable mode
configured on crtc-1
it means that your compositor simply did not
enable the HDMI output, so your monitor stays off.
If this happens on Xorg
, xrandr --auto
is the
quickest way to at least get some output.
You need to consult documentation for your distribution's compositor to see
how you can configure display output.
If /sys/kernel/debug/dri/*/state
configuration looks correct,
but your monitor is still not on, it's either a kernel or perhaps a
HW issue.
If you sometime get to DP state changed to 0x03
after plugging
in the dock, and sometimes not, you should check if you see some
received SRC_CAP
messages or received SVID
or
DP_ALT_ENTER
messages in your dmesg after the last cable plugin
event. If not, it means communication with the dock over the CC pins doesn't
work or didn't happen for whatever reason, and the phone was not thus able to
configure DP-Alt mode in the dock.
It may be due to some connector issue. Pinephone Type-C connector is a bit
too much recessed into the body of the phone, and some Type-C cables don't plug
in completely.