[nvidia+amdgpu] System sometimes starts with a black screen with Nvidia PRIME setup on Ryzen+Nvidia system (but kernel 5.6.14 works perfectly)

Bug #1879287 reported by JORGETECH
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Incomplete
Undecided
Unassigned
nvidia-prime (Ubuntu)
Confirmed
Undecided
Unassigned
ubuntu-drivers-common (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I've recently installed Ubuntu on a laptop that has a Ryzen APU (with Vega 8 integrated graphics) and a Nvidia dedicated GPU. The first issue that this kind of setup gives on a fresh install is that that PRIME render offloading doesn't work, I presume that Ubuntu currently sets up hybrid graphics for laptop with Intel+Nvidia, not AMD+Nvidia but that's another separate issue. As a workaround I created an Xorg configuration (attached in this report) that sets up both GPUs (with the appropiate BusIDs), after such configuration is applied the system boots fine with AMD integrated graphics being used and the ability to switch to Nvidia with PRIME render off-loading.

The problem comes when I try to use the computer the next day, then it gives me a black screen without having the ability to switch to a tty, the boot log doesn't throw any errors I just see a black screen after Xorg tries to start. I can make it work again by entering in recovery mode, logging into a root console and switching between "nvidia" and "on-demand" modes using prime-select (I set it up to "on-demand" profile after installing Ubuntu).

For the moment I cannot provide any relevant logs since it's now working fine (and I don't remember seeing any errors on Xorg logs), also I don't really know where to look for this kind of issues.

My system information:
-CPU: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
-GPU: Nvidia GTX 1650 Mobile (TU117M) (Using Nvidia binary driver version 440.64 from https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa)
-RAM: 8 GB
-Kubuntu 20.04 LTS (Using KDE Plasma 5.18.4)
-Xorg 1.20.8-2ubuntu2

Revision history for this message
JORGETECH (jorgetech) wrote :
JORGETECH (jorgetech)
summary: - Systems sometimes starts with a black screen with Nvidia PRIME setup on
+ System sometimes starts with a black screen with Nvidia PRIME setup on
Ryzen+Nvidia system
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: System sometimes starts with a black screen with Nvidia PRIME setup on Ryzen+Nvidia system

Please run:

  lspci -k > lspcik.txt
  journalctl -b0 > journal.txt
  xrandr --verbose > xrandr.txt

and then attach the resulting text files.

tags: added: focal
Changed in nvidia-prime (Ubuntu):
status: New → Incomplete
tags: added: black-screen
Revision history for this message
JORGETECH (jorgetech) wrote :

That's some perfect timing since now it stopped working again

Some additional observations:

- The recovery mode workaround does not always work,I have no idea why sometimes it doesn't work

- I can get it fixed by removing my Xorg configuration file, of course doing that makes the PRIME offloading not work. But even after removing the configuration the framebuffer (not sure if it's framebuffer related) would do weird things (like Plasma showing mostly black elements) like not showing the cursor in SDDM. After removing Xorg configuration and applying the recovery mode workaround it seems to be working again (without PRIME, of course).

- Windows has no issues with the framebuffer after the issues in Ubuntu appear

I'll attach the logs you requested and an additional Xorg log (made after I got the black elements in Plasma) since I could at least get it to a point where I could use a terminal.

Revision history for this message
JORGETECH (jorgetech) wrote :
Revision history for this message
JORGETECH (jorgetech) wrote :
Revision history for this message
JORGETECH (jorgetech) wrote :
description: updated
JORGETECH (jorgetech)
description: updated
Revision history for this message
JORGETECH (jorgetech) wrote :

Another very interesting observation: I added back my Xorg configuration and SDDM starts without a cursor (even if I move the trackpad), the cursor is there it's just not being rendered, when I log in then I get the black elements in Plasma. However, if restart,change to a tty before logging in and restart the sddm service, the problem is fixed, I get my desktop and I can use PRIME Render Offload as intended.

Note that this is not always the case. Sometimes I just get a black or garbled rainbow mess on the screen, in that case I c¡have to power off the computer let it rest for a moment and then I can continue with the same procedure.

Revision history for this message
JORGETECH (jorgetech) wrote :
Revision history for this message
JORGETECH (jorgetech) wrote :

I installed mainline kernel 5.6.14-050614-generic from the Ubuntu Mainline Kernel repository and now it works perfectly, I haven't encountered any black screen on boot on two days.

Whatever it was it seems to be fixed in 5.6 kernel series (no idea about 5.5), but I don't know what was fixed exactly, I heard 5.6 fixed some CPU freezes and overheating issues with Asus TUF Gaming Ryzen laptops.

affects: nvidia-prime (Ubuntu) → linux (Ubuntu)
summary: - System sometimes starts with a black screen with Nvidia PRIME setup on
- Ryzen+Nvidia system
+ [nvidia+amdgpu] System sometimes starts with a black screen with Nvidia
+ PRIME setup on Ryzen+Nvidia system
tags: added: amdgpu
summary: [nvidia+amdgpu] System sometimes starts with a black screen with Nvidia
- PRIME setup on Ryzen+Nvidia system
+ PRIME setup on Ryzen+Nvidia system (but kernel 5.6.14 works perfectly)
Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1879287

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Juan Pablo (jopojuan) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-prime (Ubuntu):
status: New → Confirmed
Changed in ubuntu-drivers-common (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.