NVIDIA driver is not loaded. Ubuntu 18.10

Safe boot really was enabled, but now I disabled it.
When I run nvidia-settings it shows the following:

ERROR: Unable to load info from any available system

(nvidia-settings:3034): GLib-GObject-CRITICAL **: 11:54:20.863: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 11:54:20.867: PRIME: Requires offloading
** Message: 11:54:20.867: PRIME: is it supported? yes
** Message: 11:54:20.910: PRIME: Usage: /usr/bin/prime-select nvidia|intel|query
** Message: 11:54:20.910: PRIME: on-demand mode: “0”
** Message: 11:54:20.910: PRIME: is “on-demand” mode supported? no
nvidia-bug-report.log (1.9 MB)
And the new log is below

Please delete /etc/X11/xorg.conf

have a question regarding nvidia driver
I could not switch from default Intel to Nvidia
bug report is below
nvidia-bug-report.log (647.3 KB)

There doesn’t seem to be a driver installed. Please run

sudo apt install linux-headers-$(uname -r)

to install the headers and then the driver using

sudo apt install nvidia-driver-440

Afterwards, please post the output of

dkms status

Hi, I’ve got the same kind of problems to load the driver 440 on ubuntu 20.04 with a gtx 1650 mobile Max-Q. I tried a lot of things but unfortunately was not working at all and always finishing with a black screen and command line. Can You help me please ?
Find my nvidia bug report:
nvidia-bug-report.log (2.8 MB)

Please delete /etc/X11/xorg.conf
then follow this:

1 Like

Thank You for quick reply.

  • I tried the first solution (with 4 files to modify or create and by deleting /etc/X11/xorg.conf > see first attached .log file) resulting with black screen.
    nvidia-bug-report-1.log (2.8 MB)

  • Then I tried your second solution (only with modified /etc/X11/xorg.conf > see second attached .log file) and I could log in on Ubuntu with graphic interface also I get a graphic result with nvidia-setting for the first time. However, the gpu seems inactive:
    $ nvidia-smi
    Tue Jun 2 17:38:10 2020
    | NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 |
    | 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 1650 Off | 00000000:01:00.0 Off | N/A |
    | N/A 40C P8 1W / N/A | 17MiB / 3911MiB | 0% Default |

    | Processes: GPU Memory |
    | GPU PID Type Process name Usage |
    | 0 1196 G /usr/lib/xorg/Xorg 15MiB |
    $ glxinfo | grep “OpenGL renderer”
    OpenGL renderer string: AMD RAVEN (DRM 3.35.0, 5.4.0-33-generic, LLVM 9.0.1)

I think, I did not understand very well…
Please, how can I active my Nvidia gpu or switch between AMD cpu and Nvidia gpu use ?
nvidia-bug-report-2.log (2.9 MB)

Thanks for the reply

I see that

dkms status


nvidia, 440.82: added

Note: I have run this

sudo apt install linux-headers-generic

command instead of this

sudo apt install linux-headers-$(uname -r)

and yes, I use Ubuntu

@mykytab I suspect you’re booting into the wrong kernel, please upgrade to the latest HWE stack using
sudo apt-get install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
After reboot, please make sure in grub menu that you’re booting into the latest 5.3 kernel and create a new nvidia-bug-report.log.

1 Like

@cardonec the first config is correctly set up but either the optimus.desktop files are incorrectly created or have no effect. Those are for Gnome, are you using a different DE? Please also check for correct file permissions, should be readable by anyone.
The second config also looks correct but this is an on-demand profile, so everything will be rendered on the amd gpu unless you explicitly order for the nvidia gpu to render:

glxinfo |grep vendor


__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor

running glxgears on nvidia:

1 Like

Yes, I did, after I run everything on 5.3 it started working without any additional actions. Thanks.

I have gone through this post and many others but I’m still getting the same error.

Last things I’ve tried:

purged nvidia drivers
installed recommended driver (according to ‘ubuntu-drivers devices’) using ‘sudo apt install nvidia-driver-xxx’ and rebooted but no luck, I also tried using the software & packages approach after purging.
Secure boot is disabled.
Nouveau driver is blacklisted
deleted blacklist-nvidia.conf file 
no /etc/X11/xorg.conf file exits

Results from command lines:
NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

nvidia-settings (only opens the profile selection GUI):
ERROR: NVIDIA driver is not loaded
ERROR: Unable to load info from any available system
(nvidia-settings:7639): GLib-GObject-CRITICAL **: 11:07:23.004: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 11:07:23.006: PRIME: Requires offloading
** Message: 11:07:23.006: PRIME: is it supported? yes
** Message: 11:07:23.034: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 11:07:23.034: PRIME: on-demand mode: “1”
** Message: 11:07:23.034: PRIME: is “on-demand” mode supported? yes

sudo lshw -c video:
description: VGA compatible controller
product: UHD Graphics 630 (Mobile)
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:131 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff
dkms status:
bbswitch, 0.8, 5.3.0-53-generic, x86_64: installed
bbswitch, 0.8, 5.3.0-55-generic, x86_64: installed
nvidia, 440.59, 5.3.0-55-generic, x86_64: installed
Laptop: Dell xps 15 9570
I’ve checked in grub menu and I’m booting into the latest 5.3.0-55 kernel
nvidia-bug-report.log (542.0 KB)

Hi @generix, thanks again !
For the second config I understand well now and it’s working well. 👍
For the first one, to answer your questions:

  • You are right, I am using mate and not gnome env. Do You think that I Can adapt the config files or must I go to gnome DE ?
  • For the permissions of files, do You mean I have to use something like chmod 777 for the .desktop config files ?
  • Last, does this config permit to switch between AMD CPU and NVIDIA GPU or only a permanent GPU using ?

Ok for Mate the .desktop files won’t have any effect. Which DM (login manager) are you using? is it lightdm?
So you don’t need to change permissions on the files.
You should be able to switch to amd only using
sudo prime-select intel

For lightdm, please see this:

Yes, I think it’s lightdm for login.
Ok for prime, thank You.
For primarygpu option on gnome, is it only a permanent using of GPU or could I Switch between AMD and GPU? Under a such config?

Like said, with primary gpu option set, you can use
sudo prime-select intel
and reboot to switch to amd only.

The prime-select command dont work it seems but I I have made little scripts to Switch between permanent GPU or AMD/NVIDIA hybrid session.

Here find the full steps I used to do it working under ubuntu-mate 20.04:

  • Install driver 440:
    sudo apt Install nvidia-driver-440

  • Modify or create an /etc/X11/xorg.conf just containing

Section "ServerLayout"
  Identifier "layout"
  Option "AllowNVIDIAGPUScreens"
  • modify /usr/share/X11/xorg.conf.d/10-amdgpu.conf
    replacing only
Driver "amdgpu"


Driver "modesetting"
  • Add
Option "PrimaryGPU" "Yes"

inside /usr/share/X11/xorg.conf.d/10-nvidia.conf

  • Create a /etc/lightdm/display_setup.sh script containing:
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
  • Make the last script executable with chmod +x

  • Create /etc/lightdm/lightdm.conf file and write:

  • Create executable scripts to switch between permanent or hybrid config (including reboot):
~$ cat scripts/* #content of echo.sh and normal.sh scripts:

#eco.sh by Christophe Cardone
#Prepare a permanent GPU using with a new ubuntu-mate session
sudo rm /etc/lightdm/lightdm.conf
sudo sed -i 's/#*\(Option .*PrimaryGPU.*\)/#\1/' /usr/share/X11/xorg.conf.d/10-nvidia.conf

#normal.sh by Christophe Cardone
#Prepare a hybrid CPU/GPU using with a new ubuntu-mate session
sudo cp /etc/lightdm/lightdm.conf.backup /etc/lightdm/lightdm.conf
sudo sed -i 's/#*\(Option .*PrimaryGPU.*\)/\1/' /usr/share/X11/xorg.conf.d/10-nvidia.conf
  • Modify my .bashrc to include the path of the directory containing the 2 Last scripts and an alias for using GPU with softwares when using hybrid system:
#export script dir in PATH:
export PATH=~/scripts:$PATH

#alias for prime offload with nvidia

I think there is some useless or redundant things but it seems working well except for GRUB that appears only with grey screen and some other litle bugs.

i did this it said that profile is already selected and /lib/modprobe.d/blacklist-nvidia.conf didnt exist. I see that I have to disable secure boot but how do I do that? I use KDE neon (ubuntu 18.04) GTX 1050 4GB.

It’s a setting in system bios.