7

I am curious how am I supposed to switch to using the nvidia card on my ubuntu 20.04 setup?

on 18.04 once installed, I could just plug in and go.. seems with 20.04 it is using both iGPU and PCI-E GPU... I see the device is here, I have nvidia-smi responding with output.. but the ubuntu gnome resolution is only going up to 1920x1080.. telling me it's using the intel iGPU off my core i7 2600K

Edit:

strangely, after reinstalling.. it now eroneously occupies the GPU even though I only get intel resolutions..

how do I revert so the iGPU is used 100% and the GPU is left freed ?

enter image description here

Erik
  • 260
  • 1
  • 6
  • 24

2 Answers2

3

This solution was given to me and tested via the NVIDIA linux forums

Essentially start the NVIDIA X Server settings:

https://forums.developer.nvidia.com/t/ubuntu-20-04-fresh-install-looking-for-how-to-use-prime-to-use-igpu-on-desktop-intel-gtx-1060/124195/2

under PRIME profiles select

NVIDIA OnDemand

next, you need to do the following :

  • add ‘nogpumanager’ kernel parameter

See https://wiki.ubuntu.com/Kernel/KernelBootParameters if you're unfamiliar with that step

  • delete /usr/share/X11/xorg.conf.d/11-nvidia-offload.conf
  • create /etc/X11/xorg.conf with contents:
   Section "Device"
       Identifier     "intel"
       Driver         "modesetting"
       BusID          "PCI:0:2:0"
   EndSection
Erik
  • 260
  • 1
  • 6
  • 24
  • 1
    That worked, thank you! I'd just add a note explaining how to get the correct BusID, since it may be different from what you pasted. See my answer here for instructions if you'd like to make your answer even more awesome! – stason Oct 24 '20 at 05:14
  • 1
    And the first bit is much easier to do with just sudo prime-select on-demand – stason Oct 24 '20 at 05:15
  • Please note that this renders nvidia-settings unusable – Vladimir Hidalgo Feb 24 '21 at 23:55
  • the step to create xorg.conf was what allowed me to switch between intel and nvidia on my Lenovo Legion 5pi. Prior to this I could only get intel to work and logging in the GDM when using nvidia just caused Ubuntu to hang.

    on-demand does not work for me. Even without specifying the environment variables, everything uses nvidia.

    – jett Feb 25 '22 at 09:13
-1

Try changing the driver in Software & Updates --> Additional Drivers.

VidathD
  • 2,704
  • This doesn't work. Nvidia drivers still take over when you do this. This answer https://askubuntu.com/a/1243949/803807 solves the issue. – stason Oct 24 '20 at 05:16