Nvidia drivers not working after install

Hi, I have a Dell XPS laptop with a recent Nvidia 1050 card. I’m using Tumbleweed. I have followed the official instructions to install the proprietary drivers from the repositories, but it does not work.

Here I post some hardware info:


# hwinfo --gfxcard
15: PCI 02.0: 0300 VGA compatible controller (VGA)              
  [Created at pci.378]
  Unique ID: _Znp.YYkfCa54gtA
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Device Name: "Onboard IGD"
  Model: "Intel VGA compatible controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x591b 
  SubVendor: pci 0x1028 "Dell"
  SubDevice: pci 0x07be 
  Revision: 0x04
  Driver: "i915"
  Driver Modules: "i915"
  Memory Range: 0xeb000000-0xebffffff (rw,non-prefetchable)
  Memory Range: 0x80000000-0x8fffffff (ro,non-prefetchable)
  I/O Ports: 0xf000-0xf03f (rw)
  Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 134 (335924 events)
  I/O Ports: 0x3c0-0x3df (rw)
  Module Alias: "pci:v00008086d0000591Bsv00001028sd000007BEbc03sc00i00"
  Driver Info #0:
    Driver Status: i915 is active
    Driver Activation Cmd: "modprobe i915"
  Config Status: cfg=no, avail=yes, need=no, active=unknown

29: PCI 100.0: 0302 3D controller
  [Created at pci.378]
  Unique ID: VCu0.sRZ0RayInC7
  Parent ID: vSkL.mFcJbPekmnF
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia GP107M [GeForce GTX 1050 Mobile]"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x1c8d "GP107M [GeForce GTX 1050 Mobile]"
  SubVendor: pci 0x1028 "Dell"
  SubDevice: pci 0x07be 
  Revision: 0xa1
  Driver: "nvidia"
  Driver Modules: "nvidia"
  Memory Range: 0xec000000-0xecffffff (rw,non-prefetchable)
  Memory Range: 0xc0000000-0xcfffffff (ro,non-prefetchable)
  Memory Range: 0xd0000000-0xd1ffffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xefff (rw)
  Memory Range: 0xed000000-0xed07ffff (ro,non-prefetchable,disabled)
  IRQ: 16 (no events)
  Module Alias: "pci:v000010DEd00001C8Dsv00001028sd000007BEbc03sc02i00"
  Driver Info #0:
    Driver Status: nouveau is not active
    Driver Activation Cmd: "modprobe nouveau"
  Driver Info #1:
    Driver Status: nvidia_drm is active
    Driver Activation Cmd: "modprobe nvidia_drm"
  Driver Info #2:
    Driver Status: nvidia is active
    Driver Activation Cmd: "modprobe nvidia"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #25 (PCI bridge)

Primary display adapter: #15


 # lspci 
00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 3D controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)

Further, the module seems to be loaded


# lsmod | grep nvidia
nvidia_drm             53248  2
nvidia_modeset        860160  1 nvidia_drm
nvidia_uvm            761856  0
nvidia              13168640  14 nvidia_modeset,nvidia_uvm
drm_kms_helper        200704  2 i915,nvidia_drm
drm                   438272  11 i915,nvidia_drm,drm_kms_helper

The X system runs, so I thought I was done, but no. The animations are slow, and indeed when I run nvidia-settings I get a popup message ‘You do not appear to be using the NVIDIA X driver’, together with a bunch of error messages in the terminal.

$ nvidia-settings 

ERROR: Error querying enabled displays on GPU 0 (Missing Extension).


ERROR: Error querying connected displays on GPU 0 (Missing Extension).


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-documentation. 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.


Any idea how to debug this?

Ah, now we are getting closer to your real problem…

This is an Optimus system, you cannot install the nvidia driver and expect it to work. Because the intel chip is used by default.
You’d need to use bumblebee or suse-prime to utilize nvidia.

I have no experience with both, hopefully somebody else will chime in.
The Bumblebee instructions can be found here though:
https://en.opensuse.org/SDB:NVIDIA_Bumblebee

PS: if you had posted your Xorg.0.log as I asked in the other thread, that would have shown up there too. :wink:

Thanks for the hint. I have now suddenly understood many things:). I had read about Optimus and so (I’m a completely noob in hardware stuff), but I thought it was somewhat optional, meaning that without it the nvidia card would be used always without the chance to switch it off to save battery. It turns out that it is the other way around.

Unfortunately I have been reading about all this, and I have the feeling all this stuff is hardly supported nowadays, especially in Suse (I used Ubuntu few days last Christmas and the installation of both proprietary drivers and prime was trivial). It’s a pity, because AFAIK this Optimus stuff is not precisely brand new: it is already 8 years old. I would expect it to be supported by modern distributions by now. I have to use this system to work, I can not expend now countless hours in forums playing to be a hacker to make it work. Sorry if I sound rude, but I’m a bit disappointed. The fact that in 2018 no desktop is yet fully compatible out-of-the-box with hdpi does not help.

I’ll give a try to suse-prime (bunblebee seems to be designed to run punctual applications, but I want to run it to improve the desktop usability), but the fact that the documentation assumes that you are running 42.1 and that several users have reported how it broke the system after installation, makes me think there is little hope for me. But I know myself, so I guess I’ll try later, when I forget that I have broken the system and reinstalled linux ~5 times in the last weeks…

Thank you very much in any case lol!

PS: I could not post the Xorg log file because by then my system was already broken

Well, as expected I could not help it and I had to try suse-prime xD And also as expected, it didn’t work. I get a black screen with no X system whatsoever and basically an unusable laptop. Luckily, I was able to boot in text mode and rollback (first time I do so; its a really cool feature!).

If I find the time/courage, I’ll try to dig into the suse-prime scripts to learn what they do and try to adapt them accordingly.

That would be the case if you disable the intel chip in your BIOS settings.
But that’s not possible on most Optimus systems, AFAIK.

That seems to be the case in my Dell. I had yesterday a fast look at the BIOS and I could not find any option related to Optimus or graphics cards. That’s unfortunate because I would be willing to pay the price of higher battery consumption, as I’m plugged 95% of the time.

But as I said, I’ll dig into the scripts when I have the chance. They seem very simple, basically an automation to create a setup file for Xorg. It could be the excuse I always needed to learn more about the Xs and systemd. As you seem to control this topic, it is possible that I’ll ask you some details ;). Hopefully we can come up with an updated how-to, at least for Tumbleweed.

Cheers.

The suse-prime stuff is fairly simple. It is bash script that does a handful of things:

  • runs updata-alternatives, setting /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so as alternative to libglx.so (I’m not familiar with this tool, but the file at least exists, so OK)
  • creates a link in /etc/X11/xinit/xinitrc.d/ to the script /etc/prime/prime-offload.sh, whose content is simply:

xrandr --setprovideroutputsource Intel NVIDIA-0
xrandr --auto
 

-creates the /etc/X11/xorg.conf.d/90-nvidia.conf file whose content is


Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection
 
Section "Device"
    Identifier "intel"
    Driver "intel"
EndSection
 
Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection
 
Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "DPI" "96 x 96"
EndSection
 
Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "UseDisplayDevice" "None"
EndSection



  • creates the file /etc/ld.so.conf.d/nvidia-libs.conf whose content is

/etc/X11R6/lib
/etc/X11R6/include

  • runs ldconfig

And that’s it!

The only noteworthy issue is that the directory /etc/X11R6 does not exist in my system, so if the driver is expecting to find libraries and headers files there, it will find nothing. Other than that, I don’t know what might be a source of error. I mean, I do not understand the xorg file, but if it used to work in previous instances of Suse, it should still work now. Right?

Any hint from someone familiar with Xorg is welcome.

Indeed, same on Leap 42.3 as well.

I suppose that’s meant to be /usr/X11R6/lib(64)/ instead, that’s where nvidia’s OpenGL libs are located (if you use the rpm packages at least).
But Tumbleweed uses libglvnd since a while now to allow to have several OpenGL implementations side-by-side, so this should not be necessary at all anymore as nvidia’s GL libs are in the standard /usr/lib64/ as well.

I suppose the problem is that libglvnd tries to use intel’s (Mesa’s) libs then, but I have absolutely no idea how to change/fix that.

A brute force way would probably be to replace libglvnd’s libs with symlinks to nvidia’s, but that would obviously break on updates.
Although I imagine you could override it’s libs by putting similar named symlinks (that point to nvidia’s libs) into /usr/X11R6/lib64/ (or any other location), and add that to the linker path via a file in /etc/ld.so.conf.d/ (like it was done in the past anyway).

Hello, I’m struggling with the same kinf od problem as onturenio. I’m not new to linux, but i’m new to Optimus (and the BTRFS/Snapper stuff in OpenSuse… this feature is awesome!).

In case anyone reads this thread and needs some help, I’ll summarize what I’ve done until now, because I needed a bit of time to get all this information together. I think that I’ve followed more or less the same steps and discovered the same things as onturenio.
[ul]
[li]First, let’s create a checkpoint if you’re using btrfs (everything here is to be done as root): snapper create -d “Checkpoint before messing with X” - this way you can always comme back to here if needed by running snapper list and then snapper rollback <number of checkpoint taken from the list> [/li][li]I have installed the nvidia drivers using the bumblebee repository (but not the bubmblebee program itself, only the drivers), as instructed here : https://lists.opensuse.org/opensuse-factory/2016-02/msg00482.html[/li][LIST]
[li]Something that is not well explained in the link is how to enable this repository. When you follow the link from the post above, you end up on a list of many repositories corresponding to various driver versions. The “latest” repository seems to expose dynamically the latest driver version so I took that one. When I click on the link, I get to a new page for the “latest” repository. On the top of this page are various tabs, including a “Repositories” tab. When I clicked that, I found a list of OpenSuseVersions, each of them with a “Go to download repository” link. This link is the repository URL you’re looking for. It can be fed to the YaST configuration utility to enable the repo. For me (OpenSuse Tumblewwed + latest drivers), it was : https://download.opensuse.org/repositories/home:/Bumblebee-Project:/nVidia:/latest/openSUSE_Tumbleweed/ [/li][li]Then run zypper install x11-video-nvidia to install the drivers [/li][/ul]

[li]Then I installed the suse-prime-alt repo for Tumbleweed into YaST with the URL linked on the author’s post I linked above: http://download.opensuse.org/repositories/home:/bosim:/suse-prime/openSUSE_Tumbleweed/ [/li][li]Then I ran zypper install suse-prime-alt [/li][li]At this point, it’s not yet possible to run prime-select nvidia, because the nouveau driver is currently loaded in the kernel and messes with nvidia. [/li][li]So let’s reboot the machine in command-line mode.[/li][ul]
[li]When grub is presented, select your OpenSuse entry and press e (the letter e, not the Enter key). This lets you edit the boot options (this is only temporary, the changes you make now will be discarded when you reboot). Look for the line which begins with “Linux” and add a stray 3 at the end. [/li][li]This one-time kernel option will start your system in runlevel 3 (command-line) instead of 5 (graphical user interface). [/li][li]Since you have a command line and your (possibly broken) graphical interface is not yet started, you can login (still as root) and run prime-select nvidia. the only line you should see is “running ldconfig” or so. This change is permanent, you can run prime-select intel later to get back to the intel chip. [/li][li]Then you can try to (re)start the graphical user interface by running service display-manager restart [/li][/ul]

[/LIST]

Now here’s my problem: obviously, this does not work (yet). I’ve solved a few problems already before coming up with the above steps, but something is still amiss. using the intel chip (prime-select intel) works apparently well (at least I get a fluid, working desktop), but nvidia does not. My screen does not display anything new when I try to start the display manager with it (it just shows the virtual console from runlevel 3 which i was previously using, but frozen). Interestingly, I can still go back to my console (Ctrl+Alt+F1) and restart it on intel (prime-select intel && service display-manager restart).

When I had a look at my systemd logs, it turned out that this failed attempt to start display-manager left no trace whatsoever there (no entry from the relevant date/time interval). Nothing either in dmesg. However, a file gets generated in /var/log/XOrg.log. The very weird thing is that there seems to be absolutely no problem according to this log: not even a warning! What do you think is going wrong then ? Here’s the xorg log in question:

[  3541.062] (--) Log file renamed from "/var/log/Xorg.pid-8552.log" to "/var/log/Xorg.0.log"
[  3541.062] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[  3541.062] X Protocol Version 11, Revision 0
(...)
[  3541.062] (==) ServerLayout "layout"
[  3541.062] (**) |-->Screen "nvidia" (0)
[  3541.062] (**) |   |-->Monitor "<default monitor>"
[  3541.063] (**) |   |-->Device "nvidia"
[  3541.063] (==) No monitor specified for screen "nvidia".
    Using a default monitor configuration.
[  3541.063] (==) Automatically adding devices
[  3541.063] (==) Automatically enabling devices
[  3541.063] (==) Automatically adding GPU devices
[  3541.063] (==) Max clients allowed: 256, resource mask: 0x1fffff
(...)
[  3541.063] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  3541.064] (II) xfree86: Adding drm device (/dev/dri/card1)
[  3541.064] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3541.065] (--) PCI:*(0:0:2:0) 8086:591b:1462:11d5 rev 4, Mem @ 0xdd000000/16777216, 0xb0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[  3541.065] (--) PCI: (0:1:0:0) 10de:1c20:1462:11d5 rev 161, Mem @ 0xde000000/16777216, 0xc0000000/268435456, 0xd0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[  3541.065] (II) LoadModule: "glx"
[  3541.066] (II) Loading /usr/lib64/nvidia/xorg/modules/updates/extensions/libglx.so
[  3541.068] (II) Module glx: vendor="NVIDIA Corporation"
[  3541.068]     compiled for 4.0.2, module version = 1.0.0
[  3541.068]     Module class: X.Org Server Extension
[  3541.068] (II) NVIDIA GLX Module  387.34  Tue Nov 21 02:04:31 PST 2017
[  3541.069] (II) LoadModule: "nvidia"
[  3541.069] (II) Loading /usr/lib64/nvidia/xorg/modules/updates/drivers/nvidia_drv.so
[  3541.069] (II) Module nvidia: vendor="NVIDIA Corporation"
[  3541.069]     compiled for 4.0.2, module version = 1.0.0
[  3541.069]     Module class: X.Org Video Driver
[  3541.069] (II) NVIDIA dlloader X Driver  387.34  Tue Nov 21 01:38:22 PST 2017
[  3541.069] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(...)
[  3541.084] (II) NVIDIA(0): Creating default Display subsection in Screen section
    "nvidia" for depth/fbbpp 24/32
[  3541.084] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
(...)
[  3541.652] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[  3541.652] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[  3541.652] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[  3541.652] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[  3541.652] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[  3541.652] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[  3541.652] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[  3541.652] (II) NVIDIA(0):     Config Options in the README.
[  3541.658] (II) NVIDIA(0): Setting mode "NULL"
(...)
[  3541.712] (II) LoadModule: "libinput"
[  3541.712] (II) Loading /usr/lib64/xorg/modules/input/libinput_drv.so
(... lots of input-related stuff ...)
[  3542.132] (II) config/udev: Adding input device (unnamed) (/dev/tty9)
[  3542.132] (II) No input driver specified, ignoring this device.
[  3542.132] (II) This device may have been added with another device file.
[  3559.786] (II) event4  - (II) Power Button: (II) device removed
(...)
[  3570.999] (II) UnloadModule: "libinput"
[  3571.005] (II) NVIDIA(GPU-0): Deleting GPU-0
[  3571.007] (II) Server terminated successfully (0). Closing log file.

I’m also having trouble trying to make the Nvidia driver work. In my case, is a GPU for desktop.


hwinfo --gfxcard
23: PCI 100.0: 0300 VGA compatible controller (VGA)             
  [Created at pci.378]
  Unique ID: VCu0.fTuzUrNVjZF
  Parent ID: vSkL.3rEhpzAE0V6
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia GP104 [GeForce GTX 1080]"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x1b80 "GP104 [GeForce GTX 1080]"
  SubVendor: pci 0x19da "ZOTAC International (MCO) Ltd."
  SubDevice: pci 0x1451 
  Revision: 0xa1
  Driver: "nouveau"
  Driver Modules: "nouveau"
  Memory Range: 0xf6000000-0xf6ffffff (rw,non-prefetchable)
  Memory Range: 0xe0000000-0xefffffff (ro,non-prefetchable)
  Memory Range: 0xf0000000-0xf1ffffff (ro,non-prefetchable)
  I/O Ports: 0xe000-0xefff (rw)
  Memory Range: 0xf7000000-0xf707ffff (ro,non-prefetchable,disabled)
  IRQ: 26 (1282 events)
  Module Alias: "pci:v000010DEd00001B80sv000019DAsd00001451bc03sc00i00"
  Driver Info #0:
    Driver Status: nouveau is active
    Driver Activation Cmd: "modprobe nouveau"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #21 (PCI bridge)

Primary display adapter: #23

01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

Trying to install for easy method, but doens’t work. Give me a black screen with pointer mouse.

Trying to install a “hard mode”, i get this error:


ERROR: Neither the '/usr/src/linux/include/linux/version.h' nor the '/usr/src/linux/include/generated/uapi/linux/version.h'
       kernel header file exists.  The most likely reason for this is that the kernel source files in '/usr/src/linux' have not
       been configured.


ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find suggestions on
       fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

So, how to get a Nvidia card working on TUMBLEWEED? Many thanks!

@mariojuniorjp](https://forums.opensuse.org/member.php/106090-mariojuniorjp)

If you installed the extra dependencies listed here: https://en.opensuse.org/SDB:NVIDIA_the_hard_way
and you get that message then you might have mismatched kernel packages.

zypper se -si kernel

I just solved that on Leap by
zypper update kernel-default
although, the proper approach probably would have been
zypper patch
since I needed to do that anyhow,
and had to reinstall the driver again after.

In the case of tumbleweed I think you might want to do a
zypper dup

After that and a fresh boot,
press ‘e’ at grub and add nomodeset
to the group “silent quiet showopts”
then press F10.

Then it will probably install… ;-]

You need to install kernel-devel and kernel-default-devel for the current kernel to be able to compile the kernel module.

The rpm packages from the repo should work too, unless the latest kernel update broke the 384.xx driver again. (haven’t heard any complaints yet though)

There are instructions here:
https://en.opensuse.org/SDB:NVIDIA_the_hard_way

PS: the next time please better open a new thread about your problem instead of replying to two older threads…

Thanks you very much! Now works. lol!


lsmod | grep nvidia
nvidia_drm             45056  1
nvidia_modeset       1097728  6 nvidia_drm
nvidia              14352384  528 nvidia_modeset
drm_kms_helper        200704  1 nvidia_drm
drm                   434176  4 nvidia_drm,drm_kms_helper
ipmi_msghandler        53248  2 nvidia,ipmi_devintf

I needed to install only the kernel-default. Also, thanks for the help! :wink:

Erm, that should be installed by default…

I suppose you mean update to the latest kernel-default? :wink:
Yes, the versions of kernel-default and kernel-(default-)devel have to match.