DP Alt Mode: no picture in Desktop profile after USB-C replug while the DP output stays enabled

Open
#206 5 comments 0 reactions 2 assignees View on GitHub

Maintainers usually reply within 1 day

@Yury-MonZon is already working on this.

Since Nov 10, 2026.

  • #29 by @Yury-MonZon — open

Assessment

This issue has not been assessed yet.

Description

bug

Setup

Flipper One rev F0B1C2, build 1317 (dev9e4efbe), kernel 7.4.0-rc1-g200bfc1cd911, direct USB-C cable. Dell S2725QC: PD 3.0 source, 5/9/15 V @ 3 A and 20 V @ 3.25 A (Flipper takes 20 V 3.25 A); SVID 0xFF01 only (DP, pin C/D/E, we pick D = 2 DP lanes + USB3). Sink DPCD 1.4, HBR3. The display requests DR_SWAP, so Flipper becomes DFP.

Problem

Cold plug works. In the TV Media Box profile, hot replug works in both orientations. In the Desktop profile, every replug ends in "No signal".

Details

Both profiles run the same kernel and DT. In both profiles PD and DP alt mode end the same way: Configure ACK, then Attention with HPD=1, pin D. The difference is the output on unplug: cage disables VOP2 VP0 within ~0.25 s, while KWin keeps VP0, and
with it dw-dp and the DP PHY, enabled. Two bugs show up only in that state:

  1. No link training on replug. DP-1 goes back to connected and DPCD/EDID read fine, but DPCD 0x100/0x101 stay 00 00
    and there is no "full-training link" (file 1). dw-dp logs only "Get hpd irq - long". It appears to rely on a userspace
    modeset, and KWin does none because the mode is unchanged.
  2. AUX dead after a runtime orientation change. The PHY logs "cable orientation changed, PHY re-init required" and
    reinits with the new flip, and sbu1-dc/sbu2-dc flip correctly. Then every AUX read fails (0x00102 AUX -> (ret=-110)) and
    DP-1 stays disconnected even with HPD=1. This happens in both directions (files 3, 5). AUX works again once the plug is
    back in the orientation the DP PHY was powered up in (file 6). It also works if the output is off during the replug (file
    7). It looks like the AUX polarity / lane setup is only applied at DP PHY power-up.

Workaround

After a replug (bug 1):
export XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-0; kscreen-doctor --dpms off; sleep 2; kscreen-doctor --dpms on.
This forces full training and the picture comes back (file 2).
Avoid both bugs: run kscreen-doctor --dpms off before unplugging.

1_boot-rev_out-on_rev-to-rev_no-link-train.txt
2_boot-rev_out-on_dpms-toggle_link-trained.txt
3_boot-rev_out-on_rev-to-norm_aux-timeout.txt
4_boot-rev_out-on_rev-to-norm_tcpm-ok.log
5_boot-norm_out-on_norm-to-rev_aux-timeout.txt
6_boot-rev_out-on_norm-to-rev_aux-ok_no-link-train.txt
7_boot-rev_out-off_rev-to-norm_aux-ok_link-trained.txt
8_duplicate-hpd-bridge.txt

Dominant language
Shell
Stars
84
Forks
38
Avg merge
1d 15m
Merged PRs (30d)
7

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flipperdevices/flipperone-linux-build-scripts

All issues in flipperdevices/flipperone-linux-build-scripts

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.