The all new OutputSink feature aka reverse PRIME

Is wayland able to offer something better in this situation?

As a protocol, Wayland’s compositor-centric approach should be theoretically more capable of a more efficient implementation (do composition separately on each GPU, resulting in a unified desktop and no redundant copies), but it’s up to the compositor to implement something sophisticated.

2 Likes

Wow, you’re fast :)
I connected the monitor, switched on with native resolution, then generated the log report. Hey – I saw there was some progress - less of those weird rotated lines than before, lol
In all seriousness, thanks for the reply and here ya go :)

nvidia-bug-report.log.gz (375.7 KB)

Thanks, I was able to get a local reproduction. The issue is that in X / modesetting driver, the buffer being shared is getting implicitly padded for some resolutions, but the pixmap pitch (the byte-width of the buffer) is not being updated to reflect the padding. The NVIDIA driver then uses the wrong pitch when copying the buffer, and the mismatch results in the pixels getting “smeared” across the screen. The cause is similar to the corruption issues that were seen before r455, but this time it’s going to require an upstream fix, meaning both X and the driver will need to be updated.

Sorry for the inconvenience!

1 Like

Whoa. That’s somewhat of a bummer.
Again, you’re crazy fast. Can’t help but just feel happy here m8 :D Sucks that upstream changes are required, I guess.
Thanks for the update and explanation of technical side of things (it really does feel reassuring and satisfacts the initial curiosity of just asking “why”). Thanks again and good luck :)

I appreciate it. See Massive screen corruption with the modesetting driver (works with amdgpu) (#1018) · Issues · xorg / xserver · GitLab for tracking of the upstream issue. Apparently it’s been seen before with Intel<=>AMD PRIME, so I updated with my findings.

2 Likes

Given the nature of OSS, and many people having time/money constraints, is it at all possible that helping the two major DE (Gnome, KDE) might be on the cards? Collaboration with upstream, Dell, Lenovo, and the two distros?

I love that we’re getting close to feature parity of Windows, but it’s happening by dragging X11 33 years in to the future…

The 455.22.04 driver is much, much smoother for gaming on external via reverse-PRIME than the recently released 455.28 driver.

Would this fix the issue with the external screen being black when using AMDGPU as the offload sink?

It seems like the xorg issue responsible for fixing the display lag has ended up stalling. (Sync present to slave outputs (!460) · Merge requests · xorg / xserver · GitLab)

Since this is the most pressing issue for Reverse Prime support on Nvidia, does anyone have any idea (or can poke them) on a status for this? It looks like it’s been on track for the last two months, then completely stalled out.

1 Like

xorg is pretty much now unmaintained and that issue is highly unlikely to be solved now. Nvidia is deep in work to make their driver and Optimus based laptops work with Wayland + XWayland correctly (to the benefit of everyone).

@agoins What is the status on internal bug number 2759189 for Reverse PRIME to work with amdgpu?

Also, @SenojEkul can you share the discord link that you have mentioned earlier in the thread.

1 Like

I’m curious how the D3 power management on AMD platforms is coming?

I have a 2020 Asus G14 with 4800hs and 1660ti gpu.

Using Fedora 33, the dgpu will not enter d3cold, and remains on at all times unless explicitly not loaded (using igpu only).

I’ve noticed people with 2021 models reporting that this works on the newer cards. I hope the 1600 series isn’t going to be forgotten in the rush to support the 3000 series.

@Syzygianinfern0 check out:

Or:

1 Like

@Syzygianinfern0
470.42.01 Beta just launched with support for Reverse PRIME with AMDGPU. It also supports Reverse PRIME/PRIME Display Offload where both GPUs are NVIDIA. For the new support to work, the nvidia-drm kernel module has to be loaded with modeset=1.

2 Likes

So @agoins does this driver support optimus laptop setups with intel integrated GPU and nvidia discrete GPU in wayland?

1 Like

@jcstryker I’m using Dell G5 5590 with RTX 2060 + Ubuntu 21.04 (Wayland) and I wonder the same question.

From my testing, attempting to connect an external display while Wayland is the primary display manager will completely hang the computer. I’m not entirely sure how to get logs or information for this.

I have the same issue on a dGPU routed DisplayPort monitor.

I have run the bug report, which would probably be similar to yours.

When using Xorg, I get errors trying to set the resolution.

Hopefully they can fix this.

data (931.7 KB)

For anyone who still trying to make it Ubuntu + Wayland. I did the hard work of trying to figure out how to get this done over Wayland + NVIDIA 470.42.01:

  • after you made all the necessary steps to meet the NVIDIA requirements and updated everything then you need to recompile your kernel.

  • after the reboot process, you will probably auto logged in a X11 session. Just restart your gdm3 (sudo systemctl restart gdm3) and you can choose Wayland on the cogwheel option (it’s either just Ubuntu or GNOME without an explicit Wayland name).

Check with the tool of your liking. I myself tested over Edge Chromium browser and looked it up on about://gpu then made a fast 3D test over Doom3 wasm project. Works perfectly with 1080p +16x antialiasing (just for testing GPU was really the NVIDIA one because iGPU couldn’t handle this).

1 Like

I’m able to connect a second monitor using Reverse PRIME with AMDGPU, but still high CPU usage.