NVIDIA X Server Settings not working and GPU shown as unknown

6,910

I always had issues when installing NVIDIA drivers from ppa:graphics-drivers, I would suggest downloading the drivers from NVIDIA's website.

Installation (some commands require "sudo")

Once you've downloaded the correct driver for your card:

  • Set the run file as runnable (either via the properties menu or via command line)
    • command: chmod u+x <file> to add the execute bit for the current user on the specified file

NOTE: you'll have to do this part in CLI only (no visuals, I suggest opening this on your phone to follow along, you can press ctrl+alt+F1 you may need to use F2, F3, F4, etc.)

  • Stop your display manager (gdm by default or whichever one you have)
    • command: service gdm stop
  • Change the run level (this doesn't seem to be required anymore, but just in case)
    • command: init 3
  • Change to the directory of the NVIDIA installation run file
    • command: cd ~/Downloads/
  • Run the run file
    • command: ./NVIDIA... (tab completion should be possible, otherwise use ls to check the name)
    • if it fails due to gcc version, you can attempt to ignore the gcc version using the following command: ./NVIDIA... --no-cc-version-check
    • if this doesn't work, either downgrade your gcc version to the requested version or upgrade your kernel version (rather try downgrading gcc or setting the default gcc to an older one temporarily)
    • e.g. if you need gcc 5.x (don't forget to undo it afterwards, first command is to check the current link for /usr/bin/gcc)
ls -l /usr/bin/gcc
unlink /usr/bin/gcc
sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc
  • Follow the prompts (dkms doesn't work for me currently, 32-bit libraries is up to you, etc.) (default selection if it fails to install)
  • Reboot
    • command: reboot

Checking if it succeeded

I usually test by using any of the following or all of them:

  • glxinfo|egrep "OpenGL vendor|OpenGL renderer*"
  • nvidia-settings
  • nvidia-smi

Footer

I can see you are already familiar enough with Ubuntu that you don't need some of the commands stated for you, I'm doing that for anyone else who might stumble across this, hopefully it helps them too

Extras

Neat extra: the run file has many flags, to list them, you can use -A flag like so: ./NVIDIA... -A

Share:
6,910

Related videos on Youtube

Peter
Author by

Peter

Updated on September 18, 2022

Comments

  • Peter
    Peter over 1 year

    I have recently bought a Thinkpad T490 with an Intel i7 CPU and an NVIDIA GeForce MX250 graphics card (and an integrated Intel HD-Graphics 620) and installed Ubuntu 18.04 LTS. After encountering some graphics bugs I wanted to check whether all drivers are up to date.

    The first thing I noticed is that in the "Additional Drivers" tab of software-properties-gtk, Intel is listed as "Intel Corporation: Unknown - this device is not working" and my Nvidia graphics card is listed as "NVIDIA Corporation: Unknown" (see image).

    Next I tried to open "NVIDIA X Server Settings", but the window is almost empty (image). When I open it from console via nvidia-settings, i get the following output:

    # nvidia-settings
    ERROR: Error querying enabled displays on GPU 0 (Missing Extension).
    
    
    ERROR: Error querying connected displays on GPU 0 (Missing Extension).
    
    ** Message: 09:38:37.446: PRIME: Requires offloading
    ** Message: 09:38:37.446: PRIME: is it supported? yes
    
    ERROR: nvidia-settings could not find the registry key file. This
           file should have been installed along with this driver at
           /usr/share/nvidia/nvidia-application-profiles-key-documentati
           on. The application profiles will continue to work, but
           values cannot be prepopulated or validated, and will not be
           listed in the help text. Please see the README for possible
           values and descriptions.
    

    I have tried disabling secure boot, since that seems to have fixed similar problems for other people, but that didn't change anything. I also tried installing newest NVIDIA-drivers, as was indicated in many posts with similar problems, but nothing changed.

    Update: I removed all drivers with sudo apt purge nvidia* and reinstalled the latest driver (440) as instructed in this thread. Nothing changed, except that in nvidia-settings there is now only the "prime-profiles" option, so even less then before (see image).


    Some outputs that might be relevant:

    # lshw -c display
      *-display                 
           description: VGA compatible controller
           product: UHD Graphics 620 (Whiskey Lake)
           vendor: Intel Corporation
           physical id: 2
           bus info: pci@0000:00:02.0
           version: 02
           width: 64 bits
           clock: 33MHz
           capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
           configuration: driver=i915 latency=0
           resources: irq:147 memory:dc000000-dcffffff memory:70000000-7fffffff ioport:3000(size=64) memory:c0000-dffff
      *-display
           description: 3D controller
           product: GP108M [GeForce MX250]
           vendor: NVIDIA Corporation
           physical id: 0
           bus info: pci@0000:3c:00.0
           version: a1
           width: 64 bits
           clock: 33MHz
           capabilities: pm msi pciexpress bus_master cap_list
           configuration: driver=nvidia latency=0
           resources: irq:156 memory:db000000-dbffffff memory:80000000-8fffffff memory:90000000-91ffffff ioport:2000(size=128)
    
    # lspci -v
    00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake) (rev 02) (prog-if 00 [VGA controller])
        Subsystem: Lenovo Device 2278
        Flags: bus master, fast devsel, latency 0, IRQ 147
        Memory at dc000000 (64-bit, non-prefetchable) [size=16M]
        Memory at 70000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 3000 [size=64]
        [virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
        Capabilities: [40] Vendor Specific Information: Len=0c <?>
        Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
        Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [d0] Power Management version 2
        Capabilities: [100] Process Address Space ID (PASID)
        Capabilities: [200] Address Translation Service (ATS)
        Capabilities: [300] Page Request Interface (PRI)
        Kernel driver in use: i915
        Kernel modules: i915
    ...
    3c:00.0 3D controller: NVIDIA Corporation GP108M [GeForce MX250] (rev a1)
        Subsystem: Lenovo Device 2278
        Flags: bus master, fast devsel, latency 0, IRQ 156
        Memory at db000000 (32-bit, non-prefetchable) [size=16M]
        Memory at 80000000 (64-bit, prefetchable) [size=256M]
        Memory at 90000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 2000 [size=128]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [250] Latency Tolerance Reporting
        Capabilities: [258] L1 PM Substates
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: nvidia
        Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
    
    • Michal Przybylowicz
      Michal Przybylowicz about 4 years
      Looks like nvidia drivers were incorrectly installed. Can You remove them (purge) and reinstall again ? Also make sure You do not have other nvidia drivers installed together - just one.
    • Peter
      Peter about 4 years
      @MichalPrzybylowicz I did, but sadly that did not work (see Update in the post).
  • Peter
    Peter about 4 years
    Thank you for the answer! I followed your steps, however at some point during the installation I got a prompt that the gcc version check failed. Apparently my kernel was compiled with gcc 7.4, but my current gcc version is 7.5 (I confirmed that with gcc --version). I guess that means that I have to install gcc 7.4 and compile the NVIDIA installer with it? However, when I tried sudo apt install gcc-7.4 I got an error that the package was not found. I'm also not sure whether it could cause problems to have two different gcc compilers installed.
  • Dan
    Dan about 4 years
    @Peter Not sure why I didn't receive an email about this comment, but I luckily came back to check up on this, I also have gcc 7.5 and had no issue, but just in case, you can add the following installation argument: --no-cc-version-check on the sudo ./NVIDIA... command (when running the .run file) and it should work, I'll add it to the answer too