Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 586  / 2 Years ago, tue, january 18, 2022, 3:43:26

I have dual graphics Intel 520 integrated and nVidia 930MX dedicated. I'm running 20.04.2 and installed nvidia-driver-460 through Additional Drivers, and intel-media-va-driver-non-free through terminal. Currently I'm only getting display (and successful boot) on intel GPU. After I run sudo prime-select nvidia and reboot, I'm no longer able to boot, and have to revert to intel through TTY. Running nvidia-smi gives following error:


NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

The nvidia-xconfig generates a xorg.conf in which the 'Files' section is empty.


nvidia-settings gives error:


ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
(nvidia-settings:10549): GLib-GObject-CRITICAL **: 18:16:11.739: g_object_unref: assertion
'G_IS_OBJECT (object)' failed
** Message: 18:16:11.749: PRIME: Requires offloading
** Message: 18:16:11.749: PRIME: is it supported? yes
** Message: 18:16:11.857: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 18:16:11.857: PRIME: on-demand mode: "1"
** Message: 18:16:11.857: PRIME: is "on-demand" mode supported? yes

Running whereis nvidia gives:


nvidia: /usr/lib/x86_64-linux-gnu/nvidia /usr/lib/nvidia /usr/share/nvidia /usr/src/nvidia-460.73.01/nvidia

So driver is installed but not loading. How to get the driver working? I'd like to retain intel as well.


EDIT: running sudo prime-select nvidia, reboot with nomodeset, then running nvidia-smi from TTY (because there is no GUI) gives following output:


Tue May 25 18:33:17 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01 Driver Version: 460.73.01 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce 930MX Off | 00000000:01:00.0 Off | N/A |
| N/A 39C P8 N/A / N/A | 10MiB / 2004MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1063 G /usr/lib/xorg/Xorg 6MiB |
| 0 N/A N/A 1292 G /usr/bin/gnome-shell 2MiB |
+-----------------------------------------------------------------------------+

That shows nvidia driver is loading and working, but why the GUI isn't working is beyond me.


EDIT 2: running nvidia-settings and selecting any graphics from PRIME profiles results in Segmentation fault.


More From » drivers

 Answers
7

The answer posted by Celebre Asm worked for me.


First remove all the occurrences of xorg.conf and xorg.conf.old from /etc/X11/.


Then run inxi -Fxzc0 and note down the BusID of your GPUs. In my case intel was 00:02.0 = 0:2:0 and nvidia was 01:00.0 = 1:0:0.


Then create a xorg.conf.d folder, make 20-intel.conf file inside it with following content:


Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
EndSection

And 90-nvidia.conf file with following content:


Section "ServerLayout"
Identifier "layout"
Screen 0 "iGPU"
Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
Identifier "iGPU"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection

Section "Screen"
Identifier "iGPU"
Device "iGPU"
EndSection

Section "Device"
Identifier "dGPU"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection

Additionally I removed xserver-xorg-video-intel because somehow I was getting rectangles diagonally drawn on desktop and unreadable fonts, and removing it solved that.


Reboot.


**Footnote: This mess happened because I tried to boot my laptop using nvidia to use VDPAU. As of now, GM108 series of nvidia GPU doesn't have decoding support, and offloads decoding to intel counterpart. Everything was smooth as long as I didn't change "on-demand" option which was default since I first installed Ubuntu.


[#1534] Tuesday, January 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
antebrow

Total Points: 291
Total Questions: 135
Total Answers: 117

Location: New Caledonia
Member since Thu, Mar 23, 2023
1 Year ago
antebrow questions
;