Nvidia drivers not working on 17.1 or 17.2

I recently bought a new laptop with a Ryzen 7 CPU and an Nvidia RTX 4070 GPU (link to model). I've been using Windows on my desktop so far (and will keep doing so because of gaming), but I figured I'd give Linux another shot on my laptop (I'm a software developer with some linux experience from work, so I should have the basic technical skills).

Anyway, the graphics drivers have unfortunately been an absolute PITA. To avoid a lengthy wall of text, I'll summarize my steps a bit:

  • laptop arrived
  • installed Zorin OS 17.1
  • graphics drivers didn't work properly
  • switch between various driver version (535, 550, etc.)
  • install/edit various stuff (that was a few weeks ago, I don't remember all the details)
  • nothing worked
  • ignored it for a bit because I didn't want to deal with the problem
  • fresh install: dual boot with Win11 and Kubuntu 2024.04
  • graphics work fine on Win11 as far as I can tell
  • driver install with "ubuntu-drivers" (not the custom Zorin OS settings) throws the same errors
  • accidentally brick the partition table because I thought it was a good idea to enable bitlocker on a dual-boot system with only one disk
  • fresh install: dual boot with Zorin OS 17.2 and Win11 (Zorin encrypted, Windows not)
  • graphics drivers still busted

When I say the drivers are broken, here's what I mean:

  • random screen shutoff for a second or two (screen goes black)
  • colorful artifacts (horizontal lines)
  • screen goes white and either doesn't recover at all until I force-reboot, or only after closing the lid for a few seconds and reopening (mostly the latter)
  • system doesn't recognize the 4070 as the GPU (Settings > About shows "GFX1103_R1")
  • nvidia-smi only sometimes works (only with some version of the driver, on the current Zorin OS 17.2 install with 550 drivers it doesn't throw any errors and includes an RTX4070 in the displayed "table")
  • nvidia-settings throws errors (following output is with --verbose flag, but the GLib-GObject-CRITICAL error also appears without the flag):
WARNING: NV-CONTROL Display not found.

WARNING: Unable to determine number of NVIDIA Frame Lock Devices on 'wayland-0'.

WARNING: NV-CONTROL Display not found.

WARNING: Unable to determine number of NVIDIA 3D Vision Pro Transceivers on 'wayland-0'.

WARNING: Unable to determine number of NVIDIA Display Devices on 'wayland-0'.

WARNING: Unable to determine number of NVIDIA X Screens on 'wayland-0'.

(nvidia-settings:31982): GLib-GObject-CRITICAL **: 15:43:26.218: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Unhandled integer attribute PlatformPowerMode (434) of GPU (0)
Unhandled integer attribute GPUResizableBAR (438) of GPU (0)
** Message: 15:43:26.254: PRIME: Requires offloading
** Message: 15:43:26.254: PRIME: is it supported? yes
** Message: 15:43:26.272: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 15:43:26.272: PRIME: on-demand mode: "1"
** Message: 15:43:26.272: PRIME: is "on-demand" mode supported? yes

I don't know what else to try. It could just be a hardware problem, of course, but since the GPU seemed to work fine in Windows, I don't think this is very likely (I haven't tested it extensively though).

2 Likes

Could it be that you run Zorin in Wayland? You can check that in the Settings. Go there to the About-Tab and there look for ''Window Manager''. If there stands Wayland, you should change it to Xorg. That should work better with Nvidia.

For that go to the Login Screen. Click there on Your Profile so that the Password Field appears. It must be appeared! After it is appeared, You should see in the bottom right Corner a Gear Icon. Click on it. Choose there the Option ''Zorin Desktop on Xorg'' and log in and test.

2 Likes

@Ponce-De-Leon Yes, it seems I do use Wayland. I haven't configured it like that though - aside from the non-standard dual-boot partitions, I'm working with a fresh, barely changed Zorin OS.
Since I chose the "modern nvidia drivers" option (or whatever it's called) during installation, I would expect this to be automatically configured correctly.

Regardless, changing the window manager to xorg in the login screen doesn't solve the problem, although I get slightly different errors now. Progress? :sweat_smile:
Also, the settings/about section now shows "Nvidia Corporation / GFX1103_R1".

WARNING: NV-CONTROL extension not present on screen 0 of this Display.

WARNING: Unable to determine number of NVIDIA Frame Lock Devices on ':0'.

WARNING: Unable to determine number of NVIDIA 3D Vision Pro Transceivers on
         ':0'.

WARNING: Unable to determine number of NVIDIA Display Devices on ':0'.

WARNING: Unable to determine number of NVIDIA X Screens on ':0'.

(nvidia-settings:10123): GLib-GObject-CRITICAL **: 16:39:47.317: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Unhandled integer attribute Unknown (41) of GPU (0)

WARNING: Unhandled string attribute NvControlVersion (58) of GPU (0)

Unhandled integer attribute PlatformPowerMode (434) of GPU (0)
Unhandled integer attribute GPUResizableBAR (438) of GPU (0)
Unhandled integer attribute GPUGraphicsClockOffsetAllPerformanceLevels (424) of
GPU (0)
Unhandled integer attribute GPUGraphicsClockOffset (409) of GPU (0)
Unhandled integer attribute GPUMemoryTransferRateOffsetAllPerformanceLevels
(425) of GPU (0)
Unhandled integer attribute GPUMemoryTransferRateOffset (410) of GPU (0)
** Message: 16:39:47.372: PRIME: Requires offloading
** Message: 16:39:47.372: PRIME: is it supported? yes
** Message: 16:39:47.390: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 16:39:47.390: PRIME: on-demand mode: "1"
** Message: 16:39:47.390: PRIME: is "on-demand" mode supported? yes

Do I need to reinstall drivers or something like that now?

Wayland lacks Nvidia support. The short of it is, Nvidia users should be using the standard stable X11 display, not Wayland.
For most people, the system automatically reverts to X11 if Nvidia is detected.

1 Like

Okay, yes. Let's try it with a new Installation of the Nvidia Drivers. I think in the Terminal it should be easier to make. So, first uninstall the Driver. for that type in the Terminal:

sudo apt purge nvidia* libnvidia*

After this type sudo apt autoremove to delete the Rest's of Files. But look at the Files that will be removed. When there is something with Zorin in the Name be careful. You don't have to do this Step. It is an optional One. But it could delete Files that aren't deleted in the Uninstallation.

And then install the Nvidia Driver with the Command:

sudo apt install nvidia-driver-550
1 Like

During the sudo apt purge, I get "possible missing firmware /lib/firmware/amdgpu/..." warnings, but it otherwise seems to work fine. None of the removed packages had "zorin" in the name, and the same is true for everything removed with autoremove.

The nvidia-driver-550 installation runs generally fine, but it throws the same amdgpu warnings. (Side note: it prints a status message "secure boot not enabled on this system". I think I read before that this can be relevant, so I thought I'd mention it here)

Unfortunately, when launching nvidia-settings, I get the same errors as earlier (both before and after restarting the laptop).

When You type in the Terminal nvidia-smi what Output do you get? One Point could be the Encryption because of the Secure Boot Thing.

This amdgpu could be because of Your Ryzen Processor and possible integrated Graphics there.

1 Like

Here's the nvidia-smi output:

Sun Sep 29 20:39:53 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.107.02             Driver Version: 550.107.02     CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 4070 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   30C    P5             14W /   80W |       9MiB /   8188MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      1538      G   /usr/lib/xorg/Xorg                              4MiB |
+-----------------------------------------------------------------------------------------+

Note that this is basically identical to before reinstalling the drivers, the 4070 was visible here earlier as well. Sadly that doesn't mean that it works

You have a integrated gpu ?

β€œ PRIME: is it supported? yes”

1 Like

Okay, so it detects the Driver and the Card. Let's try something. Your CPU should have an integrated Graphics. Open the terminal and type sudo prime-select nvidia

That Command should switch the Graphics to the Nvidia Card.

1 Like

yes, my Ryzen processor has an integrated GPU. I thought I'd mentioned that before, but apparently not - my bad.

This didn't solve the issue, but after logging out and back in, I now get different errors (username changed to "x" placeholder):

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 33 of configuration file
         '/home/x/.nvidia-settings-rc'.

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 34 of configuration file
         '/home/x/.nvidia-settings-rc'.

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 35 of configuration file
         '/home/x/.nvidia-settings-rc'.

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 36 of configuration file
         '/home/x/.nvidia-settings-rc'.

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 37 of configuration file
         '/home/x/.nvidia-settings-rc'.

WARNING: Failed to match any targets for target specification 'DPY:HDMI-0',
         specified on line 38 of configuration file
         '/home/x/.nvidia-settings-rc'.

(nvidia-settings:28039): GLib-GObject-CRITICAL **: 16:35:55.337: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Unhandled integer attribute PlatformPowerMode (434) of GPU (0)
Unhandled integer attribute GPUResizableBAR (438) of GPU (0)
Unhandled integer attribute GPUGraphicsClockOffsetAllPerformanceLevels (424) of
GPU (0)
Unhandled integer attribute GPUGraphicsClockOffset (409) of GPU (0)
Unhandled integer attribute GPUMemoryTransferRateOffsetAllPerformanceLevels
(425) of GPU (0)
Unhandled integer attribute GPUMemoryTransferRateOffset (410) of GPU (0)
** Message: 16:35:55.480: PRIME: Requires offloading
** Message: 16:35:55.480: PRIME: is it supported? yes
** Message: 16:35:55.501: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 16:35:55.501: PRIME: on-demand mode: "1"
** Message: 16:35:55.501: PRIME: is "on-demand" mode supported? yes

This the the aforementioned .nvidia-settings-rc (starting at line 10 because there's no point in pasting the boilerplate comments):

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
UpdateRulesOnProfileNameChange = Yes
Timer = Memory_Used_(GPU_0),Yes,3000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000

# Attributes:

0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/ShowGraphicsVisualIndicator=0
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/ColorSpace=0
[DPY:HDMI-0]/ColorRange=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0

Note that, while writing this reply, my screen "blacked out" twice once again, and this time I noticed it's actually not black - just EXTREMELY dim. Perhaps the backlight just shuts off, while the pixels are still on. While this feels like a hardware issue with the backlight, it doesn't explain the error messages or why I haven't seen this behaviour on Windows (although like I mentioned, I haven't used Windows on this laptop a lot). I therefore still think it's (at least partly) a driver issue; and the display drivers must have control over the backlight as well, after all you can change brightness settings via software.

You might want to try the kernel from pop os and use their nvidia drivers instead (the 550 one). This fixed issues for me running Zorin OS 17.1.

Open the terminal and write

sudo apt-add-repository -y ppa:system76-dev/stable
sudo apt-get update

Download their latest kernel (6.9.x):

sudo apt-get update && sudo apt install linux-image-generic linux-headers-generic

Download the stable Nvidia driver:

sudo apt-get install nvidia-driver-550-server

After it's installed you might want to delete their repo

sudo apt-add-repository --remove ppa:system76-dev/stable
1 Like

Well, these Values are all on 0. Maybe You have to kick off this Driver and use a newer One. Now, You could make what @Michel suggests or You go to the Nvidia-Website and look there for a Driver or You go to the Manufacturer's Website of Your Graphics Card and look there for a Driver.

A newer Kernel could help, too but don't have to.

1 Like

Bad idea! it's not like windows that you could download and install it that easy. You have to do alot of steps to do this, blacklisting noveau drivers, setting up dkms and so on + there might be kernel conflicts at some point.

I have tried this in the past because i wanted the latest of the latest...i am not going that road again. I broke alot of times my OS because of the manual install of nvidia drivers.

2 Likes

What is your terminal output for

xrandr

1 Like

I only offered an Alternative for the Case that @PixelMaster maybe don't wan't to add a third-party PPA.

1 Like
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
HDMI-0 disconnected (normal left inverted right x axis y axis)
eDP-1-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 355mm x 199mm
   1920x1080    144.00*+  60.00  
   1680x1050    144.00  
   1280x1024    144.00  
   1440x900     144.00  
   1280x800     144.00  
   1280x720     144.00  
   1024x768     144.00  
   800x600      144.00  
   640x480      144.00  
DisplayPort-1-0 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-2 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-3 disconnected (normal left inverted right x axis y axis)
DisplayPort-1-4 disconnected (normal left inverted right x axis y axis)

This shows no HDMI connections.
Are you connecting a Monitor using an HDMI Cable?
Have you checked the cable? Some HDMI Cables are One Directional and cannot work in reverse. The fix is to unplug it, turn it around and plug it in with the ends in the opposite ports they were the first time.

1 Like

it's a laptop, I'm using the integrated display. I have not connected an external monitor.