Fails to start graphical mode after installing GeForce RTX 3050 Ti driver on OpenSUSE Linux

I recently bought an Acer Nitro 5 laptop with a Nvidia GeForce RTX 3050 Ti 4GB graphics card. I downloaded the driver from Nvidia’s website:
Product Series: GeForce RTX 30 series (Notebook)
Product: GeForce RTX 3050 Ti Laptop GPU
Operating system: Linux (64 bit)
Download type: Production Branch

I successfully installed the official Nvidia driver and disabled the Nouveau driver but when I reboot, the screen doesn’t enter into graphical mode (login screen) but just hangs. Thankfully, CTRL ALT F2 works and I am able to login via text mode. I run nvidia-smi and this is the output:

Sat Feb 25 00:38:32 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   35C    P8     6W /  60W |     29MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1615      G   /usr/bin/X                          8MiB |
|    0   N/A  N/A      1842      G   /usr/bin/sddm-greeter              18MiB |
+-----------------------------------------------------------------------------+

Even though graphical mode doesn’t start, it looks like it recognizes the GPU: 1) GPU is enumerated (as 0 in processes table); 2) there are processes started with GPU 0; 3) it reports 29MiB of 4096 MiB in use. However, I am confused why nvidia-smi still reports: 0 NVIDIA GeForce…Off !!! Why? Is it supposed to be “on”? Is my GPU active and running? Why doesn’t graphical mode start? Can someone please detail how to get graphical mode going with my GPU active. I searched for answers and didn’t find anything relevant. I was very careful to follow the steps to install the driver and any dependencies.

This is the generated /etc/X11/xorg.conf file by the Nvidia driver:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 525.89.02

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from data in "/etc/sysconfig/mouse"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "IMPS/2"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "yes"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

If I rename xorg.conf to xorg.conf.dontuse, effectively not using any xorg.conf file (or even a blank xorg.conf) and rebooting, graphical mode starts normally and I land at a graphical login screen. KDE works normally. In this configuration, this is what nvidia-smi reports:

Mon Feb 27 16:59:40 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   30C    P8     6W /  60W |      0MiB /  4096MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

with no xorg.conf, boots into graphical mode with no problems but no GPU. (I am still confused what is: 0 NVIDIA GeForce … Off | 00000000:01:00.0 Off). I did try installing the nvidia drivers from the additional repositories in YaST but the GPU was not actived.

Can someone please help? Thank you so much. Thank you also to give detailed steps to try or to do. I have used Linux for several years and comfortable using the Terminal but would still say I have much to learn still. I am on OpenSUSE Leap Linux 15.4. My laptop’s hardware is: https://store.acer.com/en-ca/nitro-5-gaming-laptop-an515-57-79yr.

@dad4linux Hi, sure it’s not running an itel gpu as well (Optimus/Hybrid graphics), can you show the output from;

/sbin/lspci -nnk | grep -EA3 "VGA|Display|3D"

With the explicit xorg configuration you get xorg and sddm running, so that’s the graphical mode waiting for you to login. You think it hangs because it is rendered in the NVIDIA gpu and the system expects output to be rendered with the onboard intel graphics (run the command provided by @malcolmlewis to identify which one). Display Active = Off. The outputs can be configured with xrandr as a xinit script. Under this configuration you’ll get the desktop environment running off NVIDIA all the time.

Without explicit configuration xorg is running off the primary GPU (intel) and nvidia could be used to offfload rendering on demand. This configuration is more energy-efficient than the previous one.

I’d say keep working with the latter option, install inxi and run inxi -Gxx to learn more about loaded graphics state. Then learn and setup PRIME, some links:

This package might be useful to setup prime (no idea if it’s available for Leap):

@awerlang if the op wants to use prime render offload, then better to use switcherooctl (command line except GNOME DE) or just alias the environment variable to start applications wanting to use with the Nvidia card. If wanting to play games, steam/proton etc then you need to use suse-prime and switch (if it works, YMMV).

@dad4linux strange, is inxi installed, if not zypper in inxi then run inxi -Gxxz and post the output.

Thanks for the replies! Sorry, I mistyped the command. Here’s the output.


$ sudo /sbin/lspci -nnk | grep -EA3 "VGA|Display|3D"
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a60] (rev 01)
        Subsystem: Acer Incorporated [ALI] Device [1025:1539]
        Kernel driver in use: i915
        Kernel modules: i915
--
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
        Subsystem: Acer Incorporated [ALI] Device [1025:153a]
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia
$ inxi -Gxxz 
Graphics:  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Acer Incorporated ALI driver: i915 v: kernel
           bus-ID: 0000:00:02.0 chip-ID: 8086:9a60
           Device-2: NVIDIA GA107M [GeForce RTX 3050 Ti Mobile] vendor: Acer Incorporated ALI driver: nvidia v: 525.89.02
           bus-ID: 0000:01:00.0 chip-ID: 10de:25a0
           Device-3: Quanta HD User Facing type: USB driver: uvcvideo bus-ID: 3-9:2 chip-ID: 0408:a061
           Display: x11 server: X.Org 1.20.3 compositor: kwin_x11 driver: loaded: modesetting unloaded: fbdev,nv,nvidia,vesa
           alternate: intel,nouveau resolution: 1920x1080~144Hz s-dpi: 96
           OpenGL: renderer: Mesa Intel UHD Graphics (TGL GT1) v: 4.6 Mesa 21.2.4 direct render: Yes

@dad4linux can you show the output from;

xrandr --listproviders

Thanks @awerlang. that makes sense since there are two graphic cards installed, Intel integrated graphics and Nvidia GeForce RTX 3050 Ti.

The chapters you referred me to are very helpful. I need to read it more carefully to understand offloading graphics. So it’s possible to switch back and forth between graphic cards as the primary? if there are no entries in xorg.conf, then there is no description or configuration for the Nvidia card; how can this GPU be used if xorg.conf has no entries for it? If there is no explicit xorg.conf, it may be energy efficient but wouldn’t that be more demanding on other system resources (for example, the integrated Intel graphics card would use RAM whereas the Nvidia card would use its dedicated 4 GB of graphics memory)? Sorry for the questions and my confusion; this is my first time with a dedicated graphics card.

Output:


$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x46; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 4; outputs: 3; associated providers: 0; name: modesetting
    output eDP-1
    output DP-1
    output DP-2

@dad4linux so not showing the Nvidia GPU, can you show the output from;

cat /proc/cmdline

@dad4linux that’s not how offload works, not xorg.conf necessary, unless it is used as the primary graphics gpu (suse-prime, or if BIOS supports changing).

It could also be Leap 15.4 showing it’s age with respect to the release of your Ampere card…

Output:

BOOT_IMAGE=/boot/vmlinuz-5.14.21-150400.24.46-default root=/dev/mapper/encSSD-encRoot splash=silent preempt=full mitigations=auto quiet security=apparmor

Question: both lspci and inxi show the Nvida card. Maybe xrandr doesn’t show Nvidia because xorg.conf is empty? How can you tell that xrandr --listproviders is not showing the Nvidia GPU? The output looks cryptic to me.

@malcolmlewis
suse-prime SDB:NVIDIA SUSE Prime - openSUSE Wiki) looks like an awesome tool to easily switch between graphic cards. can I use this to activate my nvidia gpu when I like or is there still some config I’m missing? Is suse-prrime compatible with the official Nvidia drivers (no conflicts?

Thx for your help and patience.

@dad4linux I’ve run intel/nvidia before, my current setup is Nvidia/Nvidia (This is a Tumbleweed Workstation HP Z440) I only have an Xorg file for the primary GPU…

/sbin/lspci -nnk |grep -EA3 "VGA|Display|3D"

02:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117GLM [Quadro T400 Mobile] [10de:1fb2] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:1489]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

03:00.0 3D controller [0302]: NVIDIA Corporation GP104GL [Tesla P4] [10de:1bb3] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:11d8]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

inxi -Gxxz

Graphics:
  Device-1: NVIDIA TU117GLM [Quadro T400 Mobile] driver: nvidia v: 525.89.02
    arch: Turing pcie: speed: 2.5 GT/s lanes: 16 ports: active: none
    off: DP-1,DP-2,DP-3 empty: none bus-ID: 02:00.0 chip-ID: 10de:1fb2
  Device-2: NVIDIA GP104GL [Tesla P4] driver: nvidia v: 525.89.02 pcie:
    speed: 2.5 GT/s lanes: 16 bus-ID: 03:00.0 chip-ID: 10de:1bb3
  Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8
    compositor: gnome-shell v: 43.3 driver: X: loaded: nvidia
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96
  Monitor-1: DP-1 pos: top-left res: 1920x1080 dpi: 94 diag: 598mm (23.53")
  Monitor-2: DP-3 pos: primary,bottom-c res: 1920x1080 dpi: 94
    diag: 598mm (23.53")
  Monitor-3: DP-5 pos: top-right res: 1920x1080 dpi: 94 diag: 598mm (23.53")
  Monitor-4: DVI-D-1-0 size-res: N/A
  API: OpenGL v: 4.6.0 NVIDIA 525.89.02 renderer: NVIDIA T400/PCIe/SSE2
    direct render: Yes

xrandr --listproviders 

Providers: number : 2
Provider 0: id: 0x217; cap: 0x1 (Source Output); crtcs: 4; outputs: 6; associated providers: 1; name: NVIDIA-0
    output DP-0
    output DP-1
    output DP-2
    output DP-3
    output DP-4
    output DP-5
Provider 1: id: 0x3d1; cap: 0x2 (Sink Output); crtcs: 4; outputs: 4; associated providers: 1; name: NVIDIA-G0
    output DVI-D-1-0
    output DVI-D-1-1
    output DVI-D-1-2
    output DVI-D-1-3

glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA T400/PCIe/SSE2

switcherooctl glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Tesla P4/PCIe/SSE2

@dad4linux it should work, what suse-prime does is create an xorg.conf file when you switch to nvidia, then removes it when you switch back to intel.

You need suse-prime and the bbswitch files as well… So you can have either intel, nvidia, or AFAIK it should work offload, when you try that you need to check xrandr outpout again, if you donot see both devices then it will not work, so can only switch between the two.

I suspect if you tried booting a Tumbleweed Live USB the results will be different…

I installed suse-prime package from YaST and its dependencies and ran the command from the Terminal as root:

# prime-select boot nvidia

After rebooting, it appeared that my NVIDIA GPU was activated and in use:

$ glxinfo | grep 'OpenGL renderer string'
OpenGL renderer string: NVIDIA GeForce RTX 3050 Ti Laptop GPU/PCIe/SSE2

$ xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1f1; cap: 0x1 (Source Output); crtcs: 4; outputs: 1; associated providers: 1; name: NVIDIA-0
    output HDMI-0
Provider 1: id: 0x46; cap: 0xf (Source Output, Sink Output, Source Offload, Sink Offload); crtcs: 4; outputs: 3; associated providers: 1; name: modesetting
    output eDP-1-1
    output DP-1-1
    output DP-1-2

However, nvidia-smi and nvidia-settings seemed to be uninstalled. I also installed from YaST the package nvdock to see info on the GPU as it is being used. The program failed because it couldn’t find nvidia-settings. I reinstalled the downloaded drivers from NVIDIA’s website:

# ./NVIDIA-Linux-x86_64-525.89.02.run

The installer asked me if I wanted to install over the existing drivers, I clicked yes. The installation was successful and after rebooting, success! nvidia-smi and nvidia-settings were reinstalled. nvdock works and I see the metrics and stats on the GPU.

I tried reverting back to Intel integrated GPU by running:
# prime-select boot intel

However, X server didn’t start at all upon reboot and I was at a text-only prompt. Will try again and report but happy the NVIDIA GPU works! Thanks so much to @malcolmlewis and @awerlang for your help and suggestions.

@dad4linux Hi, check after you switch back to intel if there is a xorg.conf file in /etc/X11/ or /etc/X11/xorg.conf.d and in that file if it refers to the nvidia device. If it is, copy it out of that location and reboot and it should be running the intel device. I would try setting suse-prime to use offload mode and see if that works.

I suspect if you switch back to nvidia, it may start working as the run file may have created it’s own file, AFAIK suse-prime creates/deletes as required.

If you switch back to the Nvidia rpms, you may need to ensure the nvidia-utils package is installed, this should have nvidia-smi etc present.

There was no xorg.conf file in either /etc/X11/ or /etc/X11/xorg.conf.d/. I noticed that after running prime-select, a file (either 90-nvidia.conf or 90-intel.conf was generated in /etc/X11/xorg.conf.d/. Running prime-select boot intel or prime-select boot offload didn’t work; X didn’t start and was dropped to text login screen. In fact, noticed that network didn’t even start - there was no internet after logging in.

After running prime-select boot intel, this is what /etc/X11/xorg.conf.d/90-intel.conf contained (there was no 90-nvidia.conf):

Section "ServerLayout"
    Identifier "layout"
    Screen "intel"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:0:2"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

After running prime-select boot offload, this is what /etc/X11/xorg.conf.d/90-intel.conf contained (there was no 90-nvidia.conf):

Section "ServerLayout"
    Identifier "layout"
    Screen "intel"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:0:2"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

# needed for NVIDIA PRIME Render Offload
Section "Device"
  Identifier "nvidia"
  Driver "nvidia"
  BusID "PCI:1:0:0"
EndSection

After running prime-select boot offload, this is what /etc/X11/xorg.conf.d/90-nvidia.conf contained (there was no 90-intel.conf):

Section "ServerLayout"
    Identifier "layout"
    Screen "nvidia"
    Inactive "intel"
    Inactive "modesetting"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "intel"
EndSection

Section "Screen"
    Identifier "modesetting"
    Device "modesetting"
EndSection

Section "Device"
    Identifier "modesetting"
    Driver "modesetting"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "DPI" "96 x 96"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus"
EndSection

Now it appears only the NVIDIA GPU works.

@dad4linux I would suggest uninstalling the run file and install the Nvidia rpms, suse-prime and the bbswitch stuff with the -f (force) option and see how it goes. I would also install the nvidia-utils package too.

I think you had a typo in the last command, I guess you meant prime-select boot nvidia. The output and outcome would make more sense.

One thing I’d try is removing the PCI: from the BusID so it becomes, for Intel:

    BusID "0:0:2"

Also, let’s double check the PCI identifiers again with different options:

sudo /sbin/lspci -nnD | grep -E "VGA|Display|3D"

If booting leaves you at text mode, inspect the content of /var/log/Xorg.0.log, in particular lines with (EE). You might paste a link to it with:

cat /var/log/Xorg.0.log | susepaste