after install of nvidia drivers, 1st boot works, then subsequent boots won't hit graphical target

So I just installed leap 15.3, and then I disabled nouveau and installed all the nvidia drivers from the nvidia repo. I rebooted and everything came up just fine.

Then as I was installing other things I remembered I wanted kernel-source (for later when I setup virtualbox), so I installed it along with switching all my system packages to packman.

Then when I rebooted, it went to what we used to call run level 3 (I can’t remember the right systemd term for it now). I was like, oh no, why. The only thing I could see from journalctl was that nvidia ‘tainted’ the kernel. But then I thought, well, I can’t see anything really wrong and a ton of people run with this nvidia tainted kernel thing, so I just typed ‘startx’ from run level 3, and voila, I have my gui and plasma desktop back.

But I can’t seem to get the system on boot to bring up the display manager, and it always goes to run level 3 now. I can get into plasma by typing ‘startx’, but I shouldn’t have to do that. What might be wrong here?

**#** hwinfo --gfxcard
18: PCI 100.0: 0300 VGA compatible controller (VGA)              
  [Created at pci.386]
  Unique ID: VCu0.VMf5H_NeGP6
  Parent ID: _Znp.FMDgKnDywJ4
  SysFS ID: /devices/pci0000:00/0000:00:02.0/0000:01:00.0
  SysFS BusID: 0000:01:00.0
  Hardware Class: graphics card
  Model: "nVidia GM107 [GeForce GTX 750 Ti]"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x1380 "GM107 [GeForce GTX 750 Ti]"
  SubVendor: pci 0x10de "nVidia Corporation"
  SubDevice: pci 0x105f  
  Revision: 0xa2
  Driver: "nvidia"
  Driver Modules: "nvidia"
  Memory Range: 0xfd000000-0xfdffffff (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: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)
  IRQ: 36 (55587 events)
  Module Alias: "pci:v000010DEd00001380sv000010DEsd0000105Fbc03sc00i00"
  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: #33 (PCI bridge)

Primary display adapter: #18


Try to run as root

mkinitrd

ran mkinitrd, no change. It still boots to rl3 and I have to type startx.

The only errors I have found in journalctl:

**#** journalctl | grep -i error
Dec 18 06:57:25 localhost kernel: RAS: Correctable **Error**s collector initialized.
Dec 18 13:00:17 tribaltrekker.attlocal.net kscreen_backend_launcher[2593]: kscreen.xcb.helper: Event **Error**:  147
Dec 18 13:00:42 tribaltrekker.attlocal.net pulseaudio[2559]: GetManagedObjects() failed: org.freedesktop.DBus.**Error**.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)

Any other logs or anything else I should post? I don’t really know what else to look for.

Does systemctl get-default return graphical.target?

Does appending 5 to the linu line in Grub improve the behavior?

When that happens to me, I just reinstall the nvidia driver. I normally use zypper to do the install, so in my case I first identify all the nvidia components:

zypper --no-refresh se --installed-only -r NVIDIA

Then user a single zypper install --force on all at the same time, the following line will echo the necessary install command:

zypper --no-refresh se --installed-only -r NVIDIA | awk '$1 == "i+" { print $3 }' | xargs echo zypper in --force

Providing the current kernel is compatible, this normally does the trick.

**#** systemctl get-default
multi-user.target

Not sure what the difference between multi-user.target and graphical.target is. Maybe that’s like runlevel 4 = graphical and runlevel 5 = multi-user?

I was hoping this would work, but after force reinstalling everything and rebooting, same thing. It only boots to runlevel 3, then I have to login and type startx.

Graphical (kind of like run level 5) comes after multi-user (kind of like run level 3). Maybe the past failure or install attempts has resulted in the default changing down.

This post has instructions for changing the default, including how to switch without rebooting:

https://forums.opensuse.org/showthread.php/526792-How-to-change-default-runlevel?p=2835874#post2835874

You have it backwards. Multi-user is everything except graphical, roughly equivalent to runlevel 3. openSUSE never used runlevel 4. Graphical equates to 5. As long as multi-user is returned from get-default, the GUI won’t start until you run startx, or switch to graphical.target. Switching default to graphical.target, which is what you’re complaining you don’t have is simple:

sudo systemctl set-default graphical.target

Once done, unless something about your greeter is broken, next boot should produce your expected GUI login greeter.

Before committing, you can test if graphical.target is broken by appending 5 to the linux line using the E key at the Grub menu.

Take a look here, perhaps it’s your issue:
https://forums.opensuse.org/showthread.php/556678-Lost-desktop-after-nvidia-drivers-update-maybe-because-of-MOK