In the latest versions of the binary Nvidia driver, support for PRIME render offloading was added, which solves the long-standing issue with missing Nvidia Optimus support. In laptops with both Intel integrated graphics and Nvidia dedicated graphics the Nvidia driver is correctly installed (as of 19.10 and 20.04) with working Nvidia PRIME.
The problem comes when you try to do the same thing with a laptop (and potentially desktop too) that has a Ryzen APU and an Nvidia dedicated graphics chip. The Nvidia binary driver appears to be correctly installed but PRIME is not correctly detected due to misconfigured Xorg (PRIME render offloading requires an specific Xorg configuration, if I’m not mistaken).
However, with the Xorg configuration in this Reddit post (modified with the correct PCI Bus IDs in my laptop and placed in “/usr/share/X11/xorg.conf.d/09-gpu.conf”), the same setup works and I can launch apps with Nvidia dedicated graphics, even the Nvidia settings app works after that!
The question I have is if there are any plans on fixing this, I don’t know much about Xorg stuff but it seems like something that could be fixed relatively easily since it already works with the correct configuration.
I also observed that Xorg sometimes gives me a black screen with the Nvidia driver installed (and it won’t let me change to tty). It’s also really weird because when that happens I can insert a Kubuntu bootable USB and Plasma will have graphical issues too (black background and the windows only shows the title bar). There is a workaround though, I can go into recovery mode, log into a root console, switch to nvidia using prime-select and switch to on-demand again, after I reboot I get a graphical session with the ability to use hybrid graphics.
I’ve only seen this happen two times so far. At first (after installing Ubuntu and configuring Xorg with the info on the first post) it would work fine, but after a day passes it gives me a random black screen. I can continue using the recovery method workaround of course, but this is a critical bug that should be fixed.
For the moment, I reported this here: https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1879287
I’ll try to put up some relevant logs when the issue shows up again.
i seem unable to post new posts… so I will reply here with one quirk I have discovered with 20.04
if I install Ubuntu 20.04 using my DVI port… it seems to put XServers upon my GPU… erroneously I would say… only when I install while plugging into my HDMI port… and only when choosing the proprietary drivers did everything seem to work… seems a LOT of improvements could be made here
The Ubuntu developers would generally prefer to keep bug reports and bug discussion on the bug tracker.
Thanks for filing.