AMD Ryzen 5 iGPU + Nvidia GTX 1050 Mobile. Black Screen Driver Problem


I recently bought an ASUS FX505DD Gaming laptop for the purpose of installing Linux as my daily driver but of course the system is set up in a Dual Boot Environment with Secure Boot Disabled for Compatibility Purposes with Win32 Applications. A noteworthy heads-up is that i am not keen or that experienced with Linux atm as i am actively using/replacing it for developmental purposes also as i am a freshman at my university.

Now my problem is, trying to go to various forums especially here in devtalk nvidia forums, i came across two forum posts with almost the same system setup as mine but trying various fixes or configurations would just lead to a black screen, blinking cursor or a login lock-up.

I tried this configuration from another nvidia forum post suggested by the user ‘generix’ but no luck as i am stuck in a black screen and had to open tty and revert it back to ‘Option “AllowEmptyInitialConfiguration”’

Nvidia DevTalk Forums for reference.

System:    Kernel: 5.3.0-19-generic x86_64 bits: 64 Desktop: KDE Plasma 5.16.5 
           Distro: Ubuntu 19.10 (Eoan Ermine) 
Machine:   Type: Laptop System: ASUSTeK product: TUF Gaming FX505DD_FX505DD v: 1.0 
           Mobo: ASUSTeK model: FX505DD v: 1.0  UEFI: American Megatrends 
           v: FX505DD.306 date: 07/12/2019  
CPU:       Topology: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx bits: 64 type: MT MCP 
           L2 cache: 2048 KiB 
           Speed: 1229 MHz min/max: 1400/2100 MHz Core speeds (MHz): 1: 1287 2: 1258 3: 1337 4: 1379 
           5: 1294 6: 1378 7: 1266 8: 1287 
Graphics:  Device-1: NVIDIA GP107M [GeForce GTX 1050 3 GB Max-Q] driver: nvidia v: 435.21 
           Device-2: AMD Picasso driver: amdgpu v: kernel 
           Display: x11 server: X.Org 1.20.5 driver: amdgpu FAILED: ati 
           unloaded: fbdev,modesetting,nouveau,nvidia,vesa resolution: 1920x1080~120Hz 
           OpenGL: renderer: AMD RAVEN (DRM 3.33.0 5.3.0-19-generic LLVM 9.0.0) v: 4.5 Mesa 19.2.1

Whoops i almost forgot to attach the nvidia bug report.

You were on the right track but you missed the threads about the systems with a bug:
for unknown reasons, if the amd gpu is configured by bios to use less than 2GB of vram, the internal monitor fails to be turned on. Some user had success with connecting and external monitor (which then works), log in and then enable the internal monitor in gnome control center.
You could also try this:

  • boot too black screen
  • switch to vt, log in
  • run: ps aux |grep X
  • this will show something like this:
gdm        561  0.0  0.8 396208 72168 tty7     Sl+  08:14   0:00 /usr/libexec/Xorg vt7 -displayfd 3 -auth /run/user/111/gdm/Xauthority -background none -noreset -keeptty -verbose 3
  • note down the path that comes after ‘-auth’, in my case ‘/run/user/111/gdm/Xauthority’
  • get a root shell: sudo -s
  • run: DISPLAY=:0 XAUTHORITY=<what comes after -auth> xrandr --auto
  • switch back to vt7, check if display shows login

Another possibility might be:

  • boot to black screen
  • log in blindly (like said, everything is working, just the monitor is off)
  • the desktop should appear
  • copy ~/.config/monitors.xml to /var/lib/gdm/.config/monitors.xml
  • change ownership of /var/lib/gdm/.config/monitors.xml to gdm:gdm
  • reboot and check if the monitor comes alive on login now.

Thanks! I haven’t tried the first option yet since i cannot get an output to an external display but the second option got me into the desktop environment with nvidia-settings working as it should. Though the 4th line/bullet didn’t work for me as i don’t use Gnome Desktop Environment/Gnome Display Manager as i use KDE Plasma on Ubuntu 19.10. Terminal didn’t find any directories being specified.

What should i do next? Re-generate a new nvidia bug report?

cp: cannot stat '/home/username/.config/monitors.xml': No such file or directory

Ok, the possible workarounds are all based on gnome-shell’s monitor manager but that doesn’t help when you’re running kubuntu. Which method did you exactly use to login now? Do you know which display manager kubuntu is using now instead of gdm, is it lightdm?
Please create a new nvidia-bug-report.log from desktop. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

This is the method i used to login to Kubuntu.

According to these sources:

KDE Plasma 5 or Kubuntu uses ssdm or Simple Desktop Display Manager bundled with its desktop environment.
nvidia-bug-report.log (2.18 MB)

Ok, sddm is like lightdm, also relying on external monitor setup (which doesn’t work in this case).
Please try this:
Edit the file /sbin/prime-offload and add at the end of it

xrandr --verbose >>/tmp/providers.txt 2>&1
xrandr --auto >>/tmp/providers.txt 2>&1
xrandr --output eDP-1-1 --auto >>/tmp/providers.txt 2>&1

reboot, check if the monitor turns on now, if not, please attach the created file /tmp/providers.txt

Hi ! I have similar problem.
but solution doesn’t work for me.

When I run :
DISPLAY=:0 XAUTHORITY=/run/user/1000/gdm/Xauthority xrandr --auto
I get this error:

xrandr: Configure crtc 4 failed
X Error of failed request: BadValue (integer parameter out of range for operation)
  Major opcode of failed request: 140 (RANDR)
  Minor opcode of failed request: 21 (RRSetCrtcConfig)
  Value in failed request: 0x0
  Serial number of failed request: 56
  Current serial number in output stream: 56

The same error if I run: xrandr --auto , but in the last 2 lines 55 is the code.

And also, I havent this path /var/lib/gdm/.config/monitors.xml
I only have until /var/lib/gdm3 , but without .config , and I search with 'find . -iname “monitors.xml” ’ into /var/lib and nothing found.

I have ubuntu 18.04 on laptop asus fx705dt (amd ryzen 7 + amd radeon rx vega 10 + nvidia gtx 1650)

best regards!

Hi, I added the 3 lines of code as instructed but the monitor still doesn’t turn on and ‘providers.txt’ seems nowhere to be found as the file isn’t being generated or present at the /tmp directory.

Odd. Please add

xrandr --setprovideroutputsource modesetting NVIDIA-0 >>/tmp/providers.txt 2>&1
xrandr --verbose >>/tmp/providers.txt 2>&1
xrandr --auto >>/tmp/providers.txt 2>&1
xrandr --output eDP-1-1 --auto >>/tmp/providers.txt 2>&1

at the end of /usr/share/sddm/scripts/Xsetup
and check if the file gets created after a reboot.

Yes! Thanks, the file indeed got generated after a reboot and the display is working as it should it be as it is able to display the login screen without blindly logging in everytime in a black screen.
providers.txt (3.61 KB)

Also, how do i limit the framerate according to the refresh rate of my monitor and/or power manage my nvidia graphics card as it uses quite a lot of battery power at standby. How do i resolve this? Create a new thread? or what sources should i go through to be able to resolve the excessive power consumption?

Running glxgears returns a value of

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
37265 frames in 5.0 seconds = 7452.871 FPS
35005 frames in 5.0 seconds = 7000.869 FPS
33474 frames in 5.0 seconds = 6694.800 FPS
34142 frames in 5.0 seconds = 6828.344 FPS
34602 frames in 5.0 seconds = 6920.322 FPS
33468 frames in 5.0 seconds = 6693.599 FPS
34114 frames in 5.0 seconds = 6822.366 FPS

When the integrated graphics for AMD is being used, the framerate is capped at 120Hz

Normally, this can be achieved by enabling prime sync using the kernel parameter
but I suspect this is so far only implemented in the intel driver. You would have to poke the amdgpu people for that.
Regarding overall power consumption, the linux driver takes a long time to throttle down (~40sec). What’s the output of nvidia-smi after idling for that time?

How do i add this line to my kernel parameter? Is it is the same as disabling nouveau open source drivers thru the boot menu in line with the ‘Linux’ line?


It doesn’t hurt to try and experiment atm as i haven’t tried communicating with the amdgpu people just yet.

Also here is the nvidia-smi result after sitting idle on the desktop environment.

| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce GTX 1050    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   37C    P8    N/A /  N/A |    188MiB /  3020MiB |      0%      Default |
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0      1196      G   /usr/lib/xorg/Xorg                            87MiB |
|    0      1744      G   /usr/bin/kwin_x11                             31MiB |
|    0      1749      G   /usr/bin/krunner                               1MiB |
|    0      1751      G   /usr/bin/plasmashell                          50MiB |
|    0      1776      G   /usr/bin/latte-dock                           14MiB |

Yes, it’s the same, just add it to the grub config like you did with the nouveau parameter.
Power states look normal, to save power when on battery, you can only switch back to amd, running sudo prime-select intel

Hi, it seems like nvidia-drm kernel module is already being loaded upon bootup so therefore i don’t need to add nvidia-drm.modeset=1 in my kernel parameters anymore?

Also, quick question. Should nvidia-smi be able to communicate with the nvidia driver if nvidia prime is currently set at the Intel profile?

Just curious as i asked my buddy to execute sudo nvidia-smi while the intel profile is currently selected, it returned an error that nvidia-smi cannot communicate with the driver as long as the intel profile was selected which what one would expect. Therefore my question is, if nvidia-smi cannot communicate with my nvidia graphics card and not display an output, then the driver is working properly and using the integrated graphics instead of the performance-based nvidia card?

I am still able to fetch data from nvidia-smi even if prime-select is already selected for the intel profile

nvidia-drm is always loaded, modeset=1 is an option for it.
sudo cat /sys/module/nvidia_drm/parameters/modeset
should return ‘Y’ if enabled.

Whether or not nvidia-smi displays something when switched to intel depends on the method used to turn off the nvidia gpu, i.e. on the Ubuntu version. Older versions used bbswitch to completely turn it off, then nvidia-smi returns nothing. Newer versions use runtime suspending, then nvidia-smi will wake up the gpu.