Terminal login persists - new kernel, potential broken drivers or desktop manager

Am on tumbleweed version 20180406, kernel 4.16. My graphics card is an NVIDIA GTX 680. Have read this thread but am not sure it is applicable to my situation, as even choosing the old kernel version (4.15.13) from GRUB advanced options still leads to a terminal login. And, even if it is, I am not 100% sure on how to apply the patch so any help there would be great too.

Also apologies for not knowing how to format with inline code, I can’t seem to find that option anywhere in the editor.

I have tried a few things:

Running

startkde

, which gives

$DISPLAY is not set or cannot connect to the X server.

So then running

startx

(which is apparently deprecated, but it was still a suggested fix) says that

xinit failed. /usr/bin/Xorg is not setuid, maybe that's the reason? If so either use a display manager ...

I have tried running

sudo zypper dup

, but it says everything is up to date.

I have tried going through

sudo yast

to install nvidia drivers (playing around with either

x11-video-nvidiaG04, xf86-video-nouveau, and xf86-video-nv

whilst making sure to edit

/etc/X11/xorg.conf

), but all versions do not seem to give the GUI login.

I have also played around with editing

/etc/sysconfig

to change my desktop manager, but that has given no success either (sddm or kdm both). Running

systemctl status sddm

shows that it is active, however there is a line:

Process: 1829 ExecStartPre=/usr/bin/plymouth quit --retain-splash (code=exited, status=1/FAILURE)

which might be of use.

Any help would be great!

The nvidia driver currently doesn’t work with Kernel 4.16.
You’d need to patch it, or stick to an older kernel for now (which you should be able to boot via “Advanced Options” in the boot menu) until it is updated.

There are a couple of threads about this already, as you noticed…

If Kernel 4.15 doesn’t work either, there’s likely a general problem with your nvidia driver installation.
Try to uninstall and reinstall it completely (when booted to kernel 4.15), maybe that helps.
If not, please post more information how you installed nvidia, what kernel and nvidia packages you do have installed, and /var/log/Xorg.0.log (and/or /var/log/Xorg.0.log.old) which should show why Xorg fails to start exactly.

Other remarks:

  • you cannot run startkde in text mode, it needs a running X session.
  • startx doesn’t work for normal users with the default security settings, only root has the necessary privileges (but it’s unsupported and disrecommended since years anyway)
  • it’s probably better to remove /etc/X11/xorg.conf completely to let Xorg pick the driver automatically. Might help getting a graphical session even if the installed nvidia driver doesn’t work.

I suppose I should rephrase - how do I know if it’s a fault with how I’ve setup my DM, rather than with my graphics (as opposed to just fixing the graphics and seeing if it works again)?

Other remarks:

  • you cannot run startkde in text mode, it needs a running X session.
  • startx doesn’t work for normal users with the default security settings, only root has the necessary privileges (but it’s unsupported and disrecommended since years anyway)
  • it’s probably better to remove /etc/X11/xorg.conf completely to let Xorg pick the driver automatically. Might help getting a graphical session even if the installed nvidia driver doesn’t work.

So removing xorg.conf gave a graphical session, but its not at the monitors native resolution and the 2nd monitor isn’t being detected. But, it’s a start. Each time I reboot the file is remade though, so I need to remove it every single time first. I’m assuming there’s a way to figure this out at the end?

If Kernel 4.15 doesn’t work either, there’s likely a general problem with your nvidia driver installation.
Try to uninstall and reinstall it completely (when booted to kernel 4.15), maybe that helps.

If not, please post more information how you installed nvidia, what kernel and nvidia packages you do have installed, and /var/log/Xorg.0.log (and/or /var/log/Xorg.0.log.old) which should show why Xorg fails to start exactly.

kernel: 4.15.3
list of nvidia packages installed: nvidia-computeG04, nvidia-gfxG04-kmp-default, nvidia-glG04, x11-video-nvidiaG04.
method: uninstalled and reinstalled using instructions from SDB – SDB:NVIDIA drivers - openSUSE Wiki

It has still failed.

Link to Xorg.0.log – SUSE Paste

Xorg.0.log.old – SUSE Paste

I suppose of note is that Xorg.0.log.old tries to load a module ‘nvida’, but I can’t seem to figure out why.

Also, I’m not sure if this would be helpful – trying to run NVIDIA X Server settings prompts the message "You do not appear to be using the NVIDIA X driver… run nvidia-xconfig as root and restart the X server. Running this the first time (after xorg.conf is deleted) says that xorg-server was not found, and suggests adding the directory of xorg-server.pc to the PKG_CONFIG_PATH env variable. But, it then makes a xorg.conf, and then running nvidia-xconfig again updates it.

You could try a different DM.

But the Xorg logs do show what’s going on anyway.

So removing xorg.conf gave a graphical session, but its not at the monitors native resolution and the 2nd monitor isn’t being detected. But, it’s a start.

Because nvidia fails to load and the fallback fbdev driver is used, which takes over the screen resolution from text mode (and ultimatively the boot menu).

Each time I reboot the file is remade though, so I need to remove it every single time first. I’m assuming there’s a way to figure this out at the end?

xorg.conf should not get recreated automatically.

Link to Xorg.0.log – SUSE Paste

The nvidia kernel module fails to load, so the nvidia X driver cannot be loaded either.

   208.047] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the

   208.047] (EE) NVIDIA:     system's kernel log for additional error messages and

   208.047] (EE) NVIDIA:     consult the NVIDIA README for details.


As mentioned, the fbdev driver is loaded as fallback now, but as nvidia’s GLX module is in use, OpenGL does not work (and that likely also prevents the DM to work, as at least SDDM does require OpenGL support).

Xorg.0.log.old – SUSE Paste

I suppose of note is that Xorg.0.log.old tries to load a module ‘nvida’, but I can’t seem to figure out why.

This is with an xorg.conf, which supposedly sets nvidia as driver.
As nvidia cannot be loaded (it seems to be not installed here, although strange enough, nvidia’s GLX module is), starting Xorg fails.

Xorg.0.log.old is from the previous boot though, so not really the one we should concentrate on.

Also, I’m not sure if this would be helpful – trying to run NVIDIA X Server settings prompts the message "You do not appear to be using the NVIDIA X driver…

That’s because nvidia is not in use.
Running nvidia-xconfig won’t help, this just creates an xorg.conf that sets the nvidia driver to be loaded.
I suppose that (running nvidia-xconfig) is the reason why you write “Each time I reboot the file is remade though”…

So the main problem is that the nvidia kernel module cannot be loaded, even when booting Kernel 4.15.

Please try to reinstall it, and provide the output. That should show whether it fails to build.

sudo zypper in -f nvidia-gfxG04-kmp-default

And please also provide the list of kernel packages installed:

rpm -qa|grep kernel

Maybe also your repo list, and the exact nvidia package versions, just to check that there’s no mixture or wrong repo in use:

rpm -qa|grep nvidia
zypper lr -d

(e.g. 42.3’s nvidia repo won’t work well on TW)

Also, did you ever try to install the nvidia driver using the .run installer?
There may be some remnants left, causing problems.

And to be clear: do not run nvidia-xconfig. It isn’t necessary, and can only break things.

That makes sense.

Please try to reinstall it, and provide the output. That should show whether it fails to build.

sudo zypper in -f nvidia-gfxG04-kmp-default

Reinstalled it with force, problem not solved. Suse paste is giving me spammer error so here is an output from zypper - https://ghostbin.com/paste/bk6sy

And please also provide the list of kernel packages installed:

rpm -qa|grep kernel

https://paste.opensuse.org/ace1e510

Maybe also your repo list, and the exact nvidia package versions, just to check that there’s no mixture or wrong repo in use:

rpm -qa|grep nvidia

x11-video-nvidiaG04-390.48-6.1.x86_64
nvidia-computeG04-390.48-6.1.x86_64
nvidia-glG04-390.48-6.1.x86_64
nvidia-gfxG04-kmp-default-390.48_k4.15.13_1-6.1.x86_64

zypper lr -d
#  | Alias                          | Name                        | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                 | Service
---+--------------------------------+-----------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------------+--------
 1 | Atom                           | Atom Editor                 | No      | ----      | ----    |   99     | rpm-md | https://packagecloud.io/AtomEditor/atom/el/7/x86_64                                 |        
 2 | NVIDIA                         | NVIDIA                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://http.download.nvidia.com/opensuse/tumbleweed                                 |        
 3 | download.nvidia.com-tumbleweed | nVidia Graphics Drivers     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://download.nvidia.com/opensuse/tumbleweed                                     |        
 4 | openSUSE-20180224-0            | openSUSE-20180224-0         | No      | ----      | ----    |   99     | yast2  | hd:///?device=/dev/disk/by-id/usb-General_USB_Flash_Disk_0552090000000084-0:0-part2 |        
 5 | packman                        | packman                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/                 |        
 6 | repo-debug                     | openSUSE-Tumbleweed-Debug   | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/tumbleweed/repo/oss/                             |        
 7 | repo-non-oss                   | openSUSE-Tumbleweed-Non-Oss | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/                               |        
 8 | repo-oss                       | openSUSE-Tumbleweed-Oss     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                                   |        
 9 | repo-source                    | openSUSE-Tumbleweed-Source  | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/tumbleweed/repo/oss/                            |        
10 | repo-update                    | openSUSE-Tumbleweed-Update  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/                                     |        
11 | skype-stable                   | skype (stable)              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://repo.skype.com/rpm/stable/                                                  |        
12 | skypeforlinux                  | skypeforlinux               | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://repo.skype.com/rpm/stable                                                   |        

Also, did you ever try to install the nvidia driver using the .run installer?
There may be some remnants left, causing problems.

No, I have only ever done it through yast.

After uninstalling, removing the repositories, and reinstalling as specified by the SDB, here is some new output which is slightly different:

List of kernel packages and nvidia packages are the same.

List of repos:

#  | Alias               | Name                        | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                                 | Service
---+---------------------+-----------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------------+--------
 1 | Atom                | Atom Editor                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://packagecloud.io/AtomEditor/atom/el/7/x86_64                                 |        
 2 | NVIDIA              | NVIDIA                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://http.download.nvidia.com/opensuse/tumbleweed                                 |        
 3 | openSUSE-20180224-0 | openSUSE-20180224-0         | No      | ----      | ----    |   99     | yast2  | hd:///?device=/dev/disk/by-id/usb-General_USB_Flash_Disk_0552090000000084-0:0-part2 |        
 4 | packman             | packman                     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/                 |        
 5 | repo-debug          | openSUSE-Tumbleweed-Debug   | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/debug/tumbleweed/repo/oss/                             |        
 6 | repo-non-oss        | openSUSE-Tumbleweed-Non-Oss | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/non-oss/                               |        
 7 | repo-oss            | openSUSE-Tumbleweed-Oss     | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/tumbleweed/repo/oss/                                   |        
 8 | repo-source         | openSUSE-Tumbleweed-Source  | No      | ----      | ----    |   99     | NONE   | http://download.opensuse.org/source/tumbleweed/repo/oss/                            |        
 9 | repo-update         | openSUSE-Tumbleweed-Update  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/tumbleweed/                                     |        
10 | skype-stable        | skype (stable)              | Yes     | (r ) Yes  | No      |   99     | rpm-md | https://repo.skype.com/rpm/stable/                                                  |        

After running sudo zypper in -f nvidia-gfxG04-kmp-default:

https://paste.opensuse.org/a202232d

Seems you forgot to post the output?

List of kernel packages and nvidia packages are the same.

The package lists are fine, except for one thing:
You have kernel-pae-devel installed, which are the devel files for the 32bit PAE Kernel, i.e. that’s useless.
Better uninstall it.
I don’t think it should cause the problem though.

List of repos:

That’s fine.

After running sudo zypper in -f nvidia-gfxG04-kmp-default:

SUSE Paste

Hm, I don’t see any error in there, except some complaints about incompatibilities with kernel 4.16 which are to be expected I suppose.
You do boot kernel 4.15, do you?

If it still doesn’t work (with kernel 4.15.3), I’d suggest to uninstall kernel 4.16 and the nvidia driver completely, reboot, and then reinstall the driver.
You can remove a particular kernel (or package) version in YaST->Software Management by clicking on “Versions”, or via zypper by specifying the exact version like e.g.:

sudo zypper rm kernel-default-4.16.0

A patch for kernel 4.16 has been added to the nvidia packages yesterday, but the update is not in the repo yet. I’d expect it to appear today or tomorrow though.

kernel-pae-devel uninstalled.

Interestingly, after deleting the 4.16 kernel packages AND uninstalling all nvidia drivers from the official repo restores things to normal – both monitors working at native 1080p.

However, upon reinstalling nvidia-gfxG04-kmp-default, the problem comes back - scaled down resolution on only one monitor. Here’s the output after running sudo zypper in -f nvidia-gfxG04-kmp-default:


Additional rpm output:
cat: write error: Broken pipe
/usr/src/kernel-modules/nvidia-390.48-default /
rm -f -r conftest
make[1]: Entering directory '/usr/src/linux-4.15.13-1'
make[2]: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'
make[2]: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'
make[1]: Leaving directory '/usr/src/linux-4.15.13-1'
/
make: *** No rule to make target 'kernelrelease'.  Stop.
make: Entering directory '/usr/src/linux-4.16.0-1-obj/x86_64/default'
make: *** No rule to make target 'modules'.  Stop.                                                                                                                
make: Leaving directory '/usr/src/linux-4.16.0-1-obj/x86_64/default'                                                                                              
/usr/src/kernel-modules/nvidia-390.48-default /                                                                                                                   
make[1]: *** /lib/modules//source: No such file or directory.  Stop.                                                                                              
make: *** [Makefile:79: modules] Error 2                                                                                                                          
/                                                                                                                                                                 
install: cannot stat '/usr/src/kernel-modules/nvidia-390.48-default/nvidia*.ko': No such file or directory                                                        
update-alternatives: using /usr/lib/nvidia/alternate-install-present-default to provide /usr/lib/nvidia/alternate-install-present (alternate-install-present) in auto mode                                                                                                                                                          

Modprobe blacklist files have been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-*.conf.    

*** Reboot your computer and verify that the NVIDIA graphics driver can be loaded. ***                                                                            

grep: /etc/sysconfig/kernel: No such file or directory                                                                                                            
Creating initrd: /boot/initrd-4.15.13-1-default                                                                                                                   
dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-4.15.13-1-default 4.15.13-1-default                                 
dracut: dracut module 'plymouth' will not be installed, because it's in the list to be omitted!                                                                   
dracut: *** Including module: bash ***                                                                                                                            
dracut: *** Including module: systemd ***                                                                                                                         
dracut: *** Including module: warpclock ***                                                                                                                       
dracut: *** Including module: systemd-initrd ***                                                                                                                  
dracut: *** Including module: i18n ***                                                                                                                            
dracut: Could not find FONT_MAP none!                                                                                                                             
dracut: *** Including module: btrfs ***                                                                                                                           
dracut: *** Including module: kernel-modules ***                                                                                                                  
dracut: *** Including module: resume ***                                                                                                                          
dracut: *** Including module: rootfs-block ***                                                                                                                    
dracut: *** Including module: suse-xfs ***                                                                                                                        
dracut: *** Including module: terminfo ***                                                                                                                        
dracut: *** Including module: udev-rules ***                                                                                                                      
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 61-persistent-storage-compat.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: haveged ***
dracut: *** Including module: ostree ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including module: suse ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies and firmware ***
dracut: *** Installing kernel module dependencies and firmware done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done***
dracut: *** Hardlinking files ***
dracut: *** Hardlinking files done ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing GenuineIntel.bin ****
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut:  resume=UUID=504b9aa8-c026-4ff4-9d39-6269dd247705
dracut:  root=UUID=b9f7904b-3c9a-4751-8003-9441b22f9faa rootfstype=btrfs rootflags=rw,relatime,ssd,space_cache,subvolid=5,subvol=/,
dracut: *** Creating image file '/boot/initrd-4.15.13-1-default' ***
dracut: *** Creating initramfs image file '/boot/initrd-4.15.13-1-default' done *** 

On boot (when nvidia drivers are not installed), dmesg also gives new error messages which were not present before:


nouveau 0000:01:00.0: DRM: DDC responded, but no EDID for DVI-D-1

But I suppose on the surface things seem to be working graphically at least.

Sure, nouveau does support your card properly.
Before, you were using fbdev though, because the installed nvidia driver does block/blacklist nouveau.

However, upon reinstalling nvidia-gfxG04-kmp-default, the problem comes back - scaled down resolution on only one monitor.

Sounds like nvidia is still not working.
But let’s keep kernel 4.16 out of the equation for now, as it’s not going to work anyway.

Here’s the output after running sudo zypper in -f nvidia-gfxG04-kmp-default:

Additional rpm output:
cat: write error: Broken pipe
/usr/src/kernel-modules/nvidia-390.48-default /
rm -f -r conftest
make[1]: Entering directory ‘/usr/src/linux-4.15.13-1’
make[2]: Entering directory ‘/usr/src/linux-4.15.13-1-obj/x86_64/default’
make[2]: Leaving directory ‘/usr/src/linux-4.15.13-1-obj/x86_64/default’
make[1]: Leaving directory ‘/usr/src/linux-4.15.13-1’
/
make: *** No rule to make target ‘kernelrelease’. Stop.
make: Entering directory ‘/usr/src/linux-4.16.0-1-obj/x86_64/default’
make: *** No rule to make target ‘modules’. Stop.
make: Leaving directory ‘/usr/src/linux-4.16.0-1-obj/x86_64/default’
/usr/src/kernel-modules/nvidia-390.48-default /
make[1]: *** /lib/modules//source: No such file or directory. Stop.
make: *** [Makefile:79: modules] Error 2

The kernel module failed to compile now.
For some reason the output is still referring to kernel 4.16.0…

Did you uninstall all kernel 4.16.0 packages, i.e. also kernel-source, kernel-devel and kernel-default-devel? (sorry, I probably should have been more specific, but I though zypper would remove them anyway)
If not, do that and try to reinstall the driver again.

So, going through yast, here’s the list of kernel packages:

kernel-default, kernel-default-devel, kernel-devel, kernel-source, kernel-syms, kernel-macros, kernel-firmware

In red are the ones with version 4.15.13-1.5.

In green are the ones with both version 4.15.13-1.5 and 4.15.13-1.7.

kernel-syms is version 4.15.13-1.7 only.

kernel-macros is version 4.16.0-1.5-noarch. I’m assuming I should get rid of this? However in doing so Yast asks me to resolve the conflict, either breaking dependencies or uninstalling every other kernel package.

kernel-firmware is version 20180402-1.1-noarch. This came with the update for 4.16 too.

Which should I get rid of before reinstalling nvidia drivers?

No. That’s rather irrelevant here, it only contains some macros needed to create kmp packages.

kernel-firmware is version 20180402-1.1-noarch. This came with the update for 4.16 too.

That’s fine, it isn’t bound to any kernel version. And it only contains firmware that’s necessary to operate certain devices.
Unrelated to nvidia, though nouveau would use/need it.

Which should I get rid of before reinstalling nvidia drivers?

Well, from what you write here, nothing.
But the compile error mentions /usr/src/linux-4.16.0-1-obj/ which shouldn’t exist then (or did you still have some 4.16.0 packages installed at that point and uninstalled them meanwhile?).

Maybe some left-over, try to delete or rename /usr/src/linux-4.16.0-1-obj/ before you reinstall the nvidia driver.

You probably should run “rpm -qa | grep kernel” again to double check that you didn’t overlook some 4.16.0 package though.

Maybe some left-over, try to delete or rename /usr/src/linux-4.16.0-1-obj/ before you reinstall the nvidia driver.

Deleted and reinstalled using sudo zypper in -f nvidia-gfxG04-kmp-default – output:


Additional rpm output:
cat: write error: Broken pipe                                                                                                                                     
/usr/src/kernel-modules/nvidia-390.48-default /                                                                                                                   
rm -f -r conftest                                                                                                                                                 
make[1]: Entering directory '/usr/src/linux-4.15.13-1'                                                                                                            
make[2]: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                                                                         
make[2]: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                                                                          
make[1]: Leaving directory '/usr/src/linux-4.15.13-1'                                                                                                             
/                                                                                                                                                                 
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                                                                    
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                                                                    
/usr/src/kernel-modules/nvidia-390.48-default /                                                                                                                   
make[1]: *** /lib/modules//source: No such file or directory.  Stop.                                                                                              
make: *** [Makefile:79: modules] Error 2                                                                                                                          
/                                                                                                                                                                 
install: cannot stat '/usr/src/kernel-modules/nvidia-390.48-default/nvidia*.ko': No such file or directory                                                        
update-alternatives: using /usr/lib/nvidia/alternate-install-present-default to provide /usr/lib/nvidia/alternate-install-present (alternate-install-present) in auto mode                                                                                                                                                          

Modprobe blacklist files have been created at /etc/modprobe.d to prevent Nouveau from loading. This can be reverted by deleting /etc/modprobe.d/nvidia-*.conf. 

Still doesn’t work unfortunately :frowning:

You probably should run “rpm -qa | grep kernel” again to double check that you didn’t overlook some 4.16.0 package though.

Output:


kernel-source-4.15.13-1.7.noarch
kernel-devel-4.15.13-1.7.noarch
kernel-default-4.15.13-1.5.x86_64
kernel-default-devel-4.15.13-1.5.x86_64
kernel-syms-4.15.13-1.7.x86_64
patterns-devel-base-devel_kernel-20170319-4.2.x86_64
kernel-firmware-20180402-1.1.noarch
texlive-l3kernel-doc-2017.136.svn44483-39.1.noarch
kernel-devel-4.15.13-1.5.noarch
texlive-l3kernel-2017.136.svn44483-39.1.noarch
kernel-source-4.15.13-1.5.noarch
kernel-macros-4.16.0-1.5.noarch

So seems okay to me.

Hm. /lib/modules//source seems to be completely bogus now.

But /usr/src/linux-obj/x86_64/default should be part of kernel-default-devel, at least that’s the case here in Leap 42.3.
If that’s missing, that may explain why the driver/compilation doesn’t work.

Unfortunately the older kernel packages are no longer in the repo, so it’s not possible to reinstall it either.
But that is only a symlink anyway, which you could create manually.
Does /usr/src/linux-obj/ exist?
What does “ls -l /usr/src/linux-obj/x86_64/” say?
(maybe the symlink does exist but points to a wrong directory)

And please also the output of “ls -l /usr/src/”.

What does “ls -l /usr/src/linux-obj/x86_64/” say?

total 4
drwxr-xr-x 1 root root 14 Apr  9 15:05 .
drwxr-xr-x 1 root root 12 Apr 10 18:14 ..
lrwxrwxrwx 1 root root 39 Apr  9 15:05 default -> ../../linux-4.16.0-1-obj/x86_64/default

And please also the output of “ls -l /usr/src/”.


total 4
drwxr-xr-x 1 root root 324 Apr 10 21:35 .
drwxr-xr-x 1 root root 104 Apr  1 00:39 ..
drwxr-xr-x 1 root root 160 Apr  3 21:57 kernel-modules
lrwxrwxrwx 1 root root  14 Apr  9 15:05 linux -> linux-4.16.0-1
drwxr-xr-x 1 root root  12 Mar 22 13:26 linux-4.15.10-1-obj
drwxr-xr-x 1 root root  12 Mar 27 10:36 linux-4.15.11-1-obj
drwxr-xr-x 1 root root 472 Apr  3 15:12 linux-4.15.13-1
drwxr-xr-x 1 root root  12 Mar 30 09:28 linux-4.15.13-1-obj
drwxr-xr-x 1 root root  12 Mar  6 20:37 linux-4.15.7-1-obj
drwxr-xr-x 1 root root  12 Mar 15 09:42 linux-4.15.8-1-obj
drwxr-xr-x 1 root root  12 Mar 19 20:11 linux-4.15.9-1-obj
drwxr-xr-x 1 root root  12 Apr 10 18:14 linux-obj
drwxr-xr-x 1 root root  70 Apr  1 00:39 packages

Right, and it points to (the non-existing) kernel 4.16.0.
Delete that, and create the correct link:

cd /usr/src/linux-obj/x86_64/
sudo rm default
sudo ln -s ../../linux-4.15.3-1-obj/x86_64/default

It should have been changed automatically when you uninstalled 4.16.0, but apparently something went wrong…


total 4
drwxr-xr-x 1 root root 324 Apr 10 21:35 .
drwxr-xr-x 1 root root 104 Apr  1 00:39 ..
drwxr-xr-x 1 root root 160 Apr  3 21:57 kernel-modules
lrwxrwxrwx 1 root root  14 Apr  9 15:05 linux -> linux-4.16.0-1
drwxr-xr-x 1 root root  12 Mar 22 13:26 linux-4.15.10-1-obj
drwxr-xr-x 1 root root  12 Mar 27 10:36 linux-4.15.11-1-obj
drwxr-xr-x 1 root root 472 Apr  3 15:12 linux-4.15.13-1
drwxr-xr-x 1 root root  12 Mar 30 09:28 linux-4.15.13-1-obj
drwxr-xr-x 1 root root  12 Mar  6 20:37 linux-4.15.7-1-obj
drwxr-xr-x 1 root root  12 Mar 15 09:42 linux-4.15.8-1-obj
drwxr-xr-x 1 root root  12 Mar 19 20:11 linux-4.15.9-1-obj
drwxr-xr-x 1 root root  12 Apr 10 18:14 linux-obj
drwxr-xr-x 1 root root  70 Apr  1 00:39 packages

There is another one here, that may also cause problems.
So change it as well:

cd /usr/src
sudo rm linux
sudo ln -s linux-4.15.13-1 linux

You probably could delete the directories for other kernel versions too, but they don’t seem to matter.

Sorry, I couldn’t edit my post so I deleted it due to the 10 min restriction – my bad! copy pasted it here for future reference (with my edits though)

What does “ls -l /usr/src/linux-obj/x86_64/” say?

total 4
lrwxrwxrwx 1 root root 39 Apr  9 15:05 default -> ../../linux-4.16.0-1-obj/x86_64/default

And please also the output of “ls -l /usr/src/”.


total 4
drwxr-xr-x 1 root root 160 Apr  3 21:57 kernel-modules
lrwxrwxrwx 1 root root  14 Apr  9 15:05 linux -> linux-4.16.0-1
drwxr-xr-x 1 root root  12 Mar 22 13:26 linux-4.15.10-1-obj
drwxr-xr-x 1 root root  12 Mar 27 10:36 linux-4.15.11-1-obj
drwxr-xr-x 1 root root 472 Apr  3 15:12 linux-4.15.13-1
drwxr-xr-x 1 root root  12 Mar 30 09:28 linux-4.15.13-1-obj
drwxr-xr-x 1 root root  12 Mar  6 20:37 linux-4.15.7-1-obj
drwxr-xr-x 1 root root  12 Mar 15 09:42 linux-4.15.8-1-obj
drwxr-xr-x 1 root root  12 Mar 19 20:11 linux-4.15.9-1-obj
drwxr-xr-x 1 root root  12 Apr 10 18:14 linux-obj
drwxr-xr-x 1 root root  70 Apr  1 00:39 packages

So it looks like /usr/src/linux-obj/x86_64/default symlink is pointing to a nonexistent directory that came about with the 4.16 upgrade. So I updated it – sudo ln -s -T -f /usr/src/linux-4.15.13-1-obj/x86_64/default/ default works, and now to retry reinstalling nvidia drivers.


So I will continue with the other suggestion to remove the other symlink and change it round too, then reinstall drivers.

Output of sudo zypper in -f nvidia-gfxG04-kmp-default:


Additional rpm output:
cat: write error: Broken pipe                                                                                       
/usr/src/kernel-modules/nvidia-390.48-default /                                                                     
rm -f -r conftest                                                                                                   
make[1]: Entering directory '/usr/src/linux-4.15.13-1'                                                              
make[2]: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                           
make[2]: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                            
make[1]: Leaving directory '/usr/src/linux-4.15.13-1'                                                               
/                                                                                                                   
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                      
make: *** /usr/src/linux-obj/x86_64/default: No such file or directory.  Stop.                                      
/usr/src/kernel-modules/nvidia-390.48-default /                                                                     
make[1]: *** /lib/modules//source: No such file or directory.  Stop.                                                
make: *** [Makefile:79: modules] Error 2                                                                            
/                                                                                                                   
install: cannot stat '/usr/src/kernel-modules/nvidia-390.48-default/nvidia*.ko': No such file or directory          
update-alternatives: using /usr/lib/nvidia/alternate-install-present-default to provide /usr/lib/nvidia/alternate-install-present (alternate-install-present) in auto mode 

So /usr/src/linux-obj/x86_64/default does not exist, which leads me to believe the command sudo ln -s ../.. isn’t correct due to the …/… part. Indeed, with that, running ls -l highlights everything in red, whilst using sudo ln -s -T -f /usr/src/linux-4.15.13-1-obj/x86_64/default/ default does not highlight anything.

So, after doing that, here’s the new output of sudo zypper in -f nvidia-gfxG04-kmp-default:


Additional rpm output:
cat: write error: Broken pipe
/usr/src/kernel-modules/nvidia-390.48-default/
rm -f -r conftest
make[1]: Entering directory '/usr/src/linux-4.15.13-1'
make[2]: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'
make[2]: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                            
make[1]: Leaving directory '/usr/src/linux-4.15.13-1'                                                               
/
make: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                              
  Building modules, stage 2.                                                                                        
  MODPOST 0 modules                                                                                                 
make: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                               
/usr/src/kernel-modules/nvidia-390.48-default /                                                                     
make[1]: Entering directory '/usr/src/linux-4.15.13-1'                                                              
make[2]: Entering directory '/usr/src/linux-4.15.13-1-obj/x86_64/default' 
CONFTEST <stuff>
...
Building modules, stage 2.                                                                                        
  MODPOST 4 modules                                                                                                 
  CC      /usr/src/kernel-modules/nvidia-390.48-default/nvidia-drm.mod.o                                            
  LD [M]  /usr/src/kernel-modules/nvidia-390.48-default/nvidia-drm.ko                                               
  CC      /usr/src/kernel-modules/nvidia-390.48-default/nvidia-modeset.mod.o                                        
  LD [M]  /usr/src/kernel-modules/nvidia-390.48-default/nvidia-modeset.ko                                           
  CC      /usr/src/kernel-modules/nvidia-390.48-default/nvidia-uvm.mod.o                                            
  LD [M]  /usr/src/kernel-modules/nvidia-390.48-default/nvidia-uvm.ko                                               
  CC      /usr/src/kernel-modules/nvidia-390.48-default/nvidia.mod.o                                                
  LD [M]  /usr/src/kernel-modules/nvidia-390.48-default/nvidia.ko                                                   
make[2]: Leaving directory '/usr/src/linux-4.15.13-1-obj/x86_64/default'                                            
make[1]: Leaving directory '/usr/src/linux-4.15.13-1'                                                               
ld -T /lib/modules/4.15.13-1-default/source/scripts/module-common.lds -r -o nv-linux.o \                            
  nvidia.mod.o nvidia/nv-interface.o                                                                                
/                                                                                                                   
update-alternatives: using /usr/lib/nvidia/alternate-install-present-default to provide /usr/lib/nvidia/alternate-install-present (alternate-install-present) in auto mode 

On restart it still does not seem to work though.

Hm, there are no errors at all anymore in the output you posted.
So the module should be built and installed fine.

What does “dmesg|grep -i nvidia” say?

What particular nvidia modules (and where) do now exist on your hard disk?

find /lib/modules/ -name nvidia.ko

Can you please provide the Xorg.0.log again when it does not work?
Maybe the problem is a different one now…

So /usr/src/linux-obj/x86_64/default does not exist, which leads me to believe the command sudo ln -s ../.. isn’t correct due to the …/… part.

You probably didn’t cd to /usr/src/linux-obj/x86_64/ first, so …/…/ would point to a completely different place…

Weirdly, on power on today it works fine again (I did restart it yesterday, and I didn’t run any updates since then). However, for the sake of confirmation:

Output of dmesg | grep -i nvidia:


    1.897581] nvidia: loading out-of-tree module taints kernel.
    1.897586] nvidia: module license 'NVIDIA' taints kernel.
    1.910546] nvidia-nvlink: Nvlink Core is being initialized, major device number 244
    1.910759] nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
    1.910820] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  390.48  Thu Mar 22 00:42:57 PDT 2018 (using threaded interrupts)
    1.920027] nvidia-uvm: Loaded the UVM driver in 8 mode, major device number 243
    1.961582] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  390.48  Wed Mar 21 23:48:34 PDT 2018
    1.962210] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
    1.962211] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
    4.160364] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input14
    4.160393] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
    4.160441] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
    4.160471] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
    6.459825] caller _nv001169rm+0xe3/0x1d0 [nvidia] mapping multiple BARs
    6.841095] nvidia-modeset: Allocated GPU:0 (GPU-7953a2eb-1bd4-506b-557c-0c0c5d502b65) @ PCI:0000:01:00.0

And it shouldn’t make a difference between …/… for the symlink right? good catch on that one, I totally forgot what … was meant to do.

Great!

No idea why it didn’t work after reboot, but well…

And it shouldn’t make a difference between …/… for the symlink right?

Right. Except that you may save a few bytes on the partition (or rather not because of the blocksize, but that may also depend on the filesystem), as a symlink is just stored as text. :wink: