Silverblue F35 not working with Nvidia PrimaryGPU?

Hi,

I this is my very first try with Silverblue, I decided to install F35, initially it went very well, but started to see glitches on the display, so I went back to the proprietary Nvidia drivers - this was my working setup on F34 Workstation. I have an Optimus card, where the Nvidia card is connected to the external HDMI port and the Intel card is driving the internal display.

Installing Nvidia from RPM Fusion as usual, all went fine. But when I was testing sleep I noticed that there are missing characters across the GNOME desktop starting with the login screen.

First the login screen did not show that I even type the password and did not show the user name correctly either. Once I logged back in, GNOME was missing characters everywhere, completely unreadable. Interestingly, applications like Firefox and Terminator that were open, were looking fine. It was only the GNOME parts that were broken. I could fix it by Alt-F2 then “restart” and everything went back to normal.

I have never seen this before, does anyone have any idea what could be broken? I’m not sure if this is Silverblue or F35 related, F34 Workstation was working for me.

% rpm -qa | grep nvidia
xorg-x11-drv-nvidia-cuda-libs-510.60.02-1.fc35.x86_64
xorg-x11-drv-nvidia-kmodsrc-510.60.02-1.fc35.x86_64
nvidia-persistenced-510.60.02-1.fc35.x86_64
xorg-x11-drv-nvidia-libs-510.60.02-1.fc35.x86_64
nvidia-settings-510.60.02-1.fc35.x86_64
xorg-x11-drv-nvidia-power-510.60.02-1.fc35.x86_64
xorg-x11-drv-nvidia-510.60.02-1.fc35.x86_64
akmod-nvidia-510.60.02-1.fc35.x86_64
xorg-x11-drv-nvidia-cuda-510.60.02-1.fc35.x86_64
% cat /etc/modprobe.d/nvidia.conf 
# Enable DynamicPwerManagement
# http://download.nvidia.com/XFree86/Linux-x86_64/440.31/README/dynamicpowermanagement.html
options nvidia NVreg_DynamicPowerManagement=0x02
# Testing fix for suspend problems
options nvidia NVreg_PreserveVideoMemoryAllocations=1 
options nvidia NVreg_TemporaryFilePath=/var/tmp
% cat /etc/X11/xorg.conf.d/nvidia.conf 
Section "OutputClass"
	Identifier "nvidia"
	MatchDriver "nvidia-drm"
	Driver "nvidia"
	Option "AllowEmptyInitialConfiguration"
	Option "SLI" "Auto"
	Option "BaseMosaic" "on"
	Option "PrimaryGPU" "yes"
	Option "HardDPMS" "on"
	Option "ConnectToAcpid" "off"
	# The below does not seem to work
	Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
% rpm-ostree status
ignoring ``: invalid filter directive
State: idle
Deployments:
● fedora:fedora/35/x86_64/silverblue
                   Version: 35.20220417.0 (2022-04-17T21:57:14Z)
                BaseCommit: 83575cdc5c977aaea0ea53fd8a68f42a0e9518e7759c916acf670624afcc5d6a
              GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
           LayeredPackages: akmod-nvidia chromium-freeworld gnome-tweaks htop libva-utils libva-vdpau-driver pass passmenu ranger sysstat terminator testdisk tor util-linux-user vdpauinfo vifm vim-enhanced vim-X11
                            vulkan-tools xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs xrandr zsh
             LocalPackages: rpmfusion-free-release-35-1.noarch rpmfusion-nonfree-release-35-1.noarch

  fedora:fedora/35/x86_64/silverblue
                   Version: 35.20220417.0 (2022-04-17T21:57:14Z)
                BaseCommit: 83575cdc5c977aaea0ea53fd8a68f42a0e9518e7759c916acf670624afcc5d6a
              GPGSignature: Valid signature by 787EA6AE1147EEE56C40B30CDB4639719867C58F
           LayeredPackages: akmod-nvidia chromium-freeworld gnome-tweaks htop libva-utils libva-vdpau-driver pass passmenu ranger sysstat terminator testdisk tor util-linux-user vdpauinfo vifm vim-enhanced vim-X11
                            vulkan-tools xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs zsh
             LocalPackages: rpmfusion-free-release-35-1.noarch rpmfusion-nonfree-release-35-1.noarch
% systemctl status nvidia-powerd.service 
× nvidia-powerd.service - nvidia-powerd service
     Loaded: loaded (/usr/lib/systemd/system/nvidia-powerd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-04-18 18:23:41 CEST; 52min ago
    Process: 1488 ExecStart=/usr/bin/nvidia-powerd (code=exited, status=1/FAILURE)
   Main PID: 1488 (code=exited, status=1/FAILURE)
        CPU: 4ms

Apr 18 18:23:40 eli systemd[1]: Starting nvidia-powerd service...
Apr 18 18:23:40 eli /usr/bin/nvidia-powerd[1488]: nvidia-powerd version:1.0(build 1)
Apr 18 18:23:40 eli /usr/bin/nvidia-powerd[1488]: SBIOS support not found for NVPCF GET_SUPPORTED function
Apr 18 18:23:40 eli /usr/bin/nvidia-powerd[1488]: No matching GPU found
Apr 18 18:23:40 eli /usr/bin/nvidia-powerd[1488]: Failed to initialize RM Client
Apr 18 18:23:41 eli systemd[1]: nvidia-powerd.service: Main process exited, code=exited, status=1/FAILURE
Apr 18 18:23:41 eli systemd[1]: nvidia-powerd.service: Failed with result 'exit-code'.
Apr 18 18:23:41 eli systemd[1]: Failed to start nvidia-powerd service.
1 Like

The nvidia suspend/resume services are running also:

Apr 18 19:19:27 eli systemd[1]: Starting NVIDIA system suspend actions...
Apr 18 19:19:27 eli suspend[8236]: nvidia-suspend.service
Apr 18 19:19:27 eli logger[8236]: <13>Apr 18 19:19:27 suspend: nvidia-suspend.service
Apr 18 19:19:28 eli systemd[1]: nvidia-suspend.service: Deactivated successfully.
Apr 18 19:19:28 eli systemd[1]: Finished NVIDIA system suspend actions.
Apr 18 19:19:28 eli audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? ter>
Apr 18 19:19:28 eli audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? term>
Apr 18 19:20:01 eli kernel: nvidia 0000:01:00.0: Enabling HDA controller
Apr 18 19:20:02 eli systemd[1]: Starting NVIDIA system resume actions...
Apr 18 19:20:02 eli suspend[8379]: nvidia-resume.service
Apr 18 19:20:02 eli logger[8379]: <13>Apr 18 19:20:02 suspend: nvidia-resume.service
Apr 18 19:20:02 eli systemd[1]: nvidia-resume.service: Deactivated successfully.
Apr 18 19:20:02 eli systemd[1]: Finished NVIDIA system resume actions.
Apr 18 19:20:02 eli audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-resume comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? term>
Apr 18 19:20:02 eli audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=nvidia-resume comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termi>

Hm, it seems there are also other problems with this installation. For example, when I switch users, one screen disappears, when I log back in to the first user window layouts are changed around and I have to move back and resize windows again. Also small artifacts seem to appear in the gnome title bar too.

Found the problem, it is the Nvidia primary gpu option that breaks things.

The use of this option is still in the official Fedora documentation: How to Set Nvidia as Primary GPU on Optimus-based Laptops :: Fedora Docs

And without this option my machine is using the intel card

% glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel
[robi@eli]~% vainfo           
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
[robi@eli]~% vdpauinfo        
display: :1   screen: 0
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1

But it seems that PRIME might be working (it was not really working before hence needed to make Nvidia the primary GPU).

% __NV_PRIME_RENDER_OFFLOAD=1 vkcube
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

Selected GPU 1: Quadro P600, type: 2
[robi@eli]~% __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor
server glx vendor string: NVIDIA Corporation
client glx vendor string: NVIDIA Corporation
OpenGL vendor string: NVIDIA Corporation

It’s not really working, I did some quick test with glmark2

  • Nvidia as Primary GPU, score 5498
  • Nvidia not as Primary GPU:
    • Intel integrated, score 1285
    • Nvidia with __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia, score 331

It seems my only option is to go with setting Nvidia as PrimaryGPU, however, that breaks GNOME, at least on my Silverblue F35 for some reason.

I’ll update the discussion title to reflect what really the problem is here. How to make Silverblue F35 working with Nvidia PrimaryGPU option?

Oh, I have just realized that this is not the “Ask” forum but the “Discussions” forum. I moved this question over to Ask now: Silverblue F35 not working with Nvidia PrimaryGPU? - Ask Fedora Sorry

Don’t be sorry. You could add the #docs tag and give feedback afterwards, what it is different from the Documentation, to help to update it.

I also would find it good, if you move/copy the technical information to ask.fpo. Generally you will get faster answer when the tech info is on one place. Flipping back and forward to help is quite uncomfortable.

In the end we are all :fedora:, here and there.

I’m not sure if this belongs here or the Ask page, but I had a very similar issue, but for some reason on GNOME with Wayland, my application wasn’t loading or finding libva and giving the __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia did make it so my applicaiton would use my GPU rather than whatever it was trying to before.