Jovian-Experiments / Jovian-NixOS

Discussions: https://matrix.to/#/#Jovian-Experiments:matrix.org
https://jovian-experiments.github.io/Jovian-NixOS/
MIT License
462 stars 49 forks source link

drm: failed to add display topology, DTM TA is not initialized #244

Open ParetoOptimalDev opened 7 months ago

ParetoOptimalDev commented 7 months ago

I tried connecting my steam deck for the first time to my television, but got a blank screen. Looking at the system journal I see:

Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [josh edid] BASE Checksum valid? Y
Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [josh edid] Wrote new edid to: /home/pod/.config/gamescope/edid.bin
Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [edid] Patching HDR static metadata. max peak luminance/max frame avg luminance = 1000.000000 nits
Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [josh edid] Hmmmm.... non-zero CTA flags. Interesting... Not going further! :-(
Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [josh edid] BASE Checksum valid? Y
Dec 06 07:07:39 steam-deck gamescope-session[1512]: drm: [josh edid] Wrote new edid to: /home/pod/.config/gamescope/edid.bin
Dec 06 07:07:39 steam-deck gamescope-session[1512]: wlserver: Updating mode for xwayland server #0: 3840x2160@60
Dec 06 07:07:39 steam-deck gamescope-session[1512]: pipewire: renegotiating stream params (size: 3840x2160)
Dec 06 07:07:39 steam-deck gamescope-session[1512]: xwm: waylandres but no win
Dec 06 07:07:39 steam-deck dbus-daemon[1475]: [session uid=1000 pid=1475] Activating service name='org.gnome.ScreenSaver' requested by ':1.23' (uid=1000 pid=2015 comm="/home/pod/.local/share/Steam/ubuntu12_32/../ubunt" label="kernel")
Dec 06 07:07:39 steam-deck dbus-daemon[1475]: [session uid=1000 pid=1475] Successfully activated service 'org.gnome.ScreenSaver'
Dec 06 07:07:40 steam-deck kernel: [drm] Failed to add display topology, DTM TA is not initialized.
ParetoOptimalDev commented 7 months ago

Trying an update:

• Updated input 'jovian-nixos':
    'github:Jovian-Experiments/Jovian-NixOS/02a0e03c78d6c21384c8fb3deb09604bf408e245' (2023-12-03)
  → 'github:Jovian-Experiments/Jovian-NixOS/c2781460c89cbbc9baa7cc84aa617a9b7d17889e' (2023-12-06)

It's just bumps but maybe I'll get lucky.

ParetoOptimalDev commented 7 months ago

Funnily enough it works with another usbc -> hdmi dongle just fine, but not the official steam deck :sweat_smile:

DylanRJohnston-FZ commented 6 months ago

Hey @ParetoOptimalDev I also had this issue and at least for me the problem was the TV had some kind of “auto-negotiate HDMI version” feature enabled. Setting the port to a fixed version in the TV settings solved the issue. It appears something to do with the handshake doesn’t work with the Steamdeck.

wvffle commented 6 months ago

This started happening after upgrade from ~8951673c6c216ddd6bac3db3e88e3f2281b3511a~ to somewhat recent commit.

I have a 3440x1440@160 monitor.

After the upgrade, the gamescope fails to start when my monitor is plugged in. I have to start my Steam Deck unplugged, then in the settings enable monitor safe mode, plug in the dock and IF the monitor is recognized, then I need to change to at most 3440x1440@100 but 3440x1440@60 is safer.

If I plug the dock after booting and before enabling external display safe mode, my Steam Deck freezes. It unfreezes some time after I unplug it.

If the monitor is not recognized, I have to restart the device.

The described behavior happens with official dock, when connected over DP. I had similar problems with stock OS with the same display over DP and USB-C but not over HDMI.

Commit ~8951673c6c216ddd6bac3db3e88e3f2281b3511a~ and prior commits have been working great over DP without any errors, even if I set 3440x1440@160 as my resolution (gamescope had automatic resolution but I did set that resolution in Hyprland session. Now, I need to set @60 refresh rate to be able to run Hyprland session.)

Edit: Copied wrong commit hash

Edit 2: I've tried to be helpful, though I cannot find the correct hash. Even if I switch to the working generation, I get the same revision in the /etc/nixos/steam-deck.nix imported by my configuration.nix. However, the working kernel version is 6.1.52-valve5, so the commit that breaks this has to be after 9075150b85591899e546bda48b5920ede97770fc. I've then upgraded to 6.1.52-valve10 and I started having such problems but I can't pinpoint any specific commit.

ParetoOptimalDev commented 6 months ago

Recently my TV started displaying a "mode not supported" error. However, if I remove the power cable from the back of the steam deck and reboot, it almost always works.

wvffle commented 6 months ago

Seems like a00331e522b9a732f876cf707174ce37ae702762 isn't crashing anymore, but maybe it was just a lucky boot. I will investigate further when I reboot in few days :D

ParetoOptimalDev commented 6 months ago

My device currently only shows up if plugged into dock without power cable and powered on from being off. If I suspend, it no longer works and I have to reboot to get it to show up.

I'll have to try:

wvffle commented 5 months ago

It turned out that my last comment wasn't really true. I had the problems from reboot to reboot. To mitigate it, I had to do a quite complicated ritual when I first enable external display safe mode, reboot, enable it again, connect the display, change the resolution to a higher one.

For now I'm testing the following option, and first reboot worked out of the box:

  boot.loader.systemd-boot.consoleMode = "auto";

It seems to work well mostly when I reboot the deck while it's connected. If I reboot disconnected from the monitor and then connect, it still does not work. Thankfully I use my Steam Deck mostly stationary! :)

deftdawg commented 4 months ago

My Steam Deck hits this error in dmesg ([drm] Failed to add display topology, DTM TA is not initialized.) whenever I attempt to connect 2-external displays (1-DP + 1-HDMI) via a dock... Oddly, the behavior doesn't happen on the Linux 5.15 kernels. boot.kernelPackages = pkgs.linuxKernel.kernels.linux_5_15;

5.15 works perfectly except for the lack of on-device speakers (which wasn't merged until 6.1)...

I've got a bug opened on SteamOS about this https://github.com/ValveSoftware/SteamOS/issues/1399 where I list all the distros/kernel combos I've tried... They all fail except 5.15 with my dock.

deftdawg commented 4 months ago

Opened an issue upstream w/ AMD

I believe the issue with multiple displays being broken started with 5.17.14 or 5.17.15... (there were 5 and 3 amdgpu commits across those two kernels)

Testing KaOS 2022.06 ISO w/ 5.17.15 Fails (https://master.dl.sourceforge.net/project/kaosx/Archive/KaOS-2022.06-x86_64.iso?viasf=1) for me

While testing Nitrux 2.2.0 ISO w/ 5.17.12 Passes (https://osdn.ip-connect.vn.ua/nitrux/77377/nitrux-nx-desktop-20220602-amd64.iso)

I had a go at trying to build >5.17 kernel + ISOs in Nix but was unsuccessful because of BTF (FAILED: load BTF from vmlinux: Invalid argument) ... as seen in that link my nix flake skills aren't awesome enough to figure out how to override kernel buildInputs yet. :sweat_smile:

deftdawg commented 3 months ago

Hi all, I've bisected my particular problem w/ my 3rd party steamdeck dock to a commit in 5.18-rc1 (https://github.com/torvalds/linux/commit/c5365554514) ... Reverse patch is attached to this post. https://github.com/ValveSoftware/SteamOS/issues/1399#issuecomment-2016698201

Might be worth a shot in your cases to see if it helps with this issue.

deftdawg commented 2 months ago

Official fixes from AMD landed in Linux 6.9.x on May 10th: https://github.com/torvalds/linux/commit/cf87f46fd34d6c19283d9625a7822f20d90b64a4

You'll get it if you're running linuxKernel.packages.linux_6_9 or testing.