Can you please run “sudo nvidia-bug-report.sh” and then attach the resulting nvidia-bug-report.log.gz to your post by hovering your mouse over it and then clicking the paperclip icon?
Okay, I think that’s it uploaded. Thank you for the quick reply.
Thanks. It looks like nvidia-settings isn’t working because it looks like the NVIDIA driver isn’t being initialized in your X server: it’s using the amdgpu driver for the primary desktop, and the nvidia driver isn’t loading as a so-called “GPU screen” because it’s still disabled by default:
What is the configuration you’re trying to achieve on this system?
As for nvidia-xconfig, are you running it as root? I suspect the “Unable to parse X.Org version string” comes from trying to run it as a non-root user and having “Xorg -version” print this: “Xorg.wrap: Only console users are allowed to run the X server”.
Oh, to be honest, as you can see, I am completely new to this. I am an IT student who heard that next year I will have to do a lot of crazy things with linux, so I’m trying to right now completely migrate to linux so as to be more familiar with it next year. My main problem until now was that I couldn’t play Blizzard Games at a good fps (I used to get 20-40 fps on a good time and it could possibly drop to 0-4 fps)
After upgrading to Ubuntu 19.10 I seem to have been able to make vulkan finally work. Up until now it just wouldnt, and I suspected that the actual root problem was the errors I was getting here.
If you think these things could be ignored then okay, I’m finally able to start Lutris without getting any errors, so I’m okay with keeping it this way if you think its okay.
Should I go into sudo su and run nvidia-xconfig?
I assumed my nvidia drives werent good because everyone else would get the nvidia-settings to work (theyd get an actual working GUI, meanwhile I’d get an empty one).
But its weird that theyre disabled by default because when i do the prime-select method it shows that nvidia is chosen.
Yeah, the terminology can be confusing, partly because there are just so many options.
What “prime-select” currently lets you do is choose between two configurations:
- iGPU-only mode. Everything is rendered on the AMD or Intel integrated GPU. The NVIDIA discrete GPU is not used.
- "display offload" mode. Everything is rendered on the NVIDIA dGPU and copied over to the iGPU for display.
What the new “GPU screen” thing allows is a third mode:
- "render offload" mode. Everything is displayed on the iGPU. Everything is also rendered on the iGPU except for specific ("offloaded") applications.
It sounds like you’re currently using iGPU-only mode, where everything including your games are rendered on the AMD Raven Ridge GPU. If you want to run things on the NVIDIA GPU you’ll need to configure one of the offload modes described above.
Maybe some more practical infos:
You have a hybrid amd/nvidia system so you can’t/mustn’t use nvidia-xconfig, you’ll never get a working config out of it. In general, nvidia-xconfig shouldn’t be used on modern systems.
The problem with Ubuntu’s prime-select feature is it (still) doesn’t work for amd/nvidia but only for intel/nvidia. Needs manual tweaking of the config files.
You could try this:
Please delete /etc/X11/xorg.conf
and modify /usr/share/X11/xorg.conf.d/10-amdgpu.conf
Option "PrimaryGPU" "Yes"
inside the OutputClass of /usr/share/X11/xorg.conf.d/10-nvidia.conf
Then create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing
[Desktop Entry] Type=Application Name=Optimus Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto" NoDisplay=true X-GNOME-Autostart-Phase=DisplayServer
This should enable the nvidia profile on Ubuntu.
The “render offload” feature needs a patched Xserver, I don’t know if Ubuntu is providing this. If so, it could be enabled by not doing any of the above mentioned settings, but by creating an /etc/X11/xorg.conf just containing
Section "ServerLayout" Identifier "layout" Option "AllowNVIDIAGPUScreens" EndSection
Afterwards, function can be checked running
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor
should return something “Nvidia”.
Then applications can be started on the nvidia gpu running
Downside of this is that no external monitors connected to the nvidia gpu will work.
Thank you very much, both of you. I want you to know, generix, that your lines of code made everything work, I can finally access nvidia-settings.
You can ignore what I will say next but, I think I will revoke what you told me to do because I just realized it’s not the best to make my main, dedicated, graphics card, handle everything. At the moment I managed to make lutris and vulkan use the right GPU, so I’m happy.
I have to say though, even though my laptop is getting really hot right now, I am very happy that I finally managed to get nvidia-settings to work.
Thank you very much to both of you, and to both of you, I wish a kind day. You certainly made my day.
Without reverting the changes, you should be able to use prime-select intel to switch to amd only. Or you try using render offload config to have an on-demand profile.
Man, I wish I asked my question here ages ago, thank you very much, man.
Just wanted to thank you, it took me quite some time to get to this post but it works perfectly for me :)
I’m running on render offload mode (I suppose) and apparently I’m able to connect to an external monitor via HDMI, which by what I read it was not possible supposedly.
I don’t have a proper knowledge of the concepts behind all this matter of hybrid gpus, optimus stuff etc, and I’m a little confused by now. If you guys can elucidate me I would be much grateful.
At this point, I can be at nvidia profile via prime-select, and switch back to intel when I need (and in that case I’m not able to connect to the external monitor of course).
After installing cuda and cudNN successfully, everything is fine, running as it should (I suppose).
Now the problem is, after I upgrade the system by apt upgrade and reboot, which install the following packages:
distro-info-data gir1.2-json-1.0 gnome-software gnome-software-common
gnome-software-plugin-snap libjson-glib-1.0-0 libjson-glib-1.0-common
libpulse-mainloop-glib0 libpulse0 libpulsedsp pulseaudio
pulseaudio-module-bluetooth pulseaudio-utils python3-update-manager
ubuntu-software update-manager update-manager-core
the laptop monitor goes blank after login, only being with the external monitor working. (and even if the external is not plugged, the laptop screen is blank anyway)
Fortunately I had created a restore point before cuda installation and could get back.
Initially, I thought that was maybe the gnome packages that originate this and I marked them in order to not be upgraded, then upgrade the system but the same happened. So I think that maybe has to do with the xserver packages. What shall I do mates?
Still, about the possible modes that @aplattner said above, what is your advice of I should configure this system considering an amd/nvidia combo plus the fact I have to work with an external monitor, and be able to have the nvidia loaded for cuda? Should I change the actual setup considering that this problem of blank screen maybe happen in the future or the actual is ok?
The report before the upgrade is the following:
nvidia-bug-report-before.log (1.3 MB)
Thank you in advance guys.
You’re not running in render offload mode, you’re using traditional PRIME output.
After upgrade, please post the output of
and check if running
xrandr --setprovideroutputsource modesetting NVIDIA-0
makes the internal screen work.
Thanks for the clarification @generix .
Regarding the xrandr, it didn’t work. Didn’t return errors in the terminal but no changes.
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1fa cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 2 associated providers: 1 name:modesetting
What you think that it is the problem?
It’s some odd bug with that gpu combo where the internal screen simply stays off without any errors. Please try enabling it in Gnome’s monitor manager, for some users that worked to re-enable it permanently.
Maybe you forget to mention also the command: xrandr --auto, after the set provider. Now it works mate!
However, I can’t get a way to make this permanent, after reboot I’ve to type again.
I tried to put these two lines in $HOME/.xinitrc but apparently don’t fix.
What do you think?
Did you create the .desktop files from my post on top of this thread?
Yeah… I didn’t! Now it’s everything working properly!
Thank you @generix, you are the man!
See you in the next encounter, hopefully not too soon.
All the best mate!
After doing the above steps when I enter the above command I get output as:
No protocol specified
Error: unable to open display :0
Sounds like you’re running a wayland session.
How do I configure the offload mode? Nvidia X Server Setting is displaying blank screen.