You are not logged in.

#1 2025-04-18 21:32:59

Big Scorpio
Member
Registered: 2024-12-15
Posts: 63

Nvidia HW Acceleration doesn't work on certain programs

Hello Arch Friends,

This is a weird situation i have. I have a GTX 1080 Ti and I use "nvidia-dkms" drivers for it along with lib32 api's and other nvidia related api's (lib32-nvidia-utils, libva-nvidia-driver, nvidia-utils, opencl-nvidia), Mesa (mesa-utils, vulkan-mesa-layers), Vulkan (vulkan-headers, vulkan-icd-loader, vulkan-intel (I have an i7 6700K), vulkan-tools).

In principle my HW acceleration is enabled ("cat /sys/module/nvidia_drm/parameters/modeset" -> Y) and kernel parameter DRM modeset is set to 0.
Here I added some things to environment variables to "force" using the nvidia thingy in my /etc/environment. Not sure if it's a good idea, especially if I want to make use of intel integrated graphics somewhere -> https://media.discordapp.net/attachment … y=lossless

Now to the what works and doesn't work. First what works:

- ffmpeg convert video to h264 or 265 using NVENC e.g. with "ffmpeg -i input.mkv -c:v h264_nvenc -c:a copy output.mkv"
- Video Capturing screen using OBS and Nvidia NVENC encoding to H264 or H265, no problem at all.

What doesn't work:

- Steam GPU HW Acceleration. If i enable it, then the steam client will jitter when visiting store pages and especially video playback. Additionally I see my CPU usage going up significantly like 20-40% usage. Were I to disable GPU HW acceleration, then i don't have this problem.
- Cinnamon Desktop Environment (i ditched KDE). If I use just "Cinnamon" from my display manager, which uses 3D acceleration, then in just 5 to 10 minutes my screen freezes and the system becomes unresponsive to anything. After about 2 minutes my computer reboots anew as if i pressed the reset button. Currently i resorted back to "Cinnamon (Software render)" and I'll deal with this in a separate thread.

So to me it doesn't really sound like a Linux and the Nvidia CUDA reachability problem but where lies the problem? Is it the Nvidia drivers themselves (i mean I see Nvidia having a negative reputation among Linux users) and Nvidia being too lazy to make linux drivers right? Or is it, that the programs I use aren't built to support nvidia on linux properly?

What can I do?

Offline

#2 Yesterday 06:45:11

seth
Member
Registered: 2012-09-03
Posts: 62,824

Re: Nvidia HW Acceleration doesn't work on certain programs

In principle my HW acceleration is enabled ("cat /sys/module/nvidia_drm/parameters/modeset" -> Y) and kernel parameter DRM modeset is set to 0.

That line is nonsensical and  contradictory, kms isn't "HW acceleration", but a good idea, mandatory for wayland and if nvidia_drm.modeset=0 is set, nvidia_drm/parameters/modeset isn't "Y"

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Please post your Xorg log, https://wiki.archlinux.org/title/Xorg#General
And also the outputs of "glxinfo -B" and "vulkaninfo --summary"

Offline

#3 Yesterday 12:52:06

Big Scorpio
Member
Registered: 2024-12-15
Posts: 63

Re: Nvidia HW Acceleration doesn't work on certain programs

seth wrote:

That line is nonsensical and  contradictory, kms isn't "HW acceleration", but a good idea, mandatory for wayland and if nvidia_drm.modeset=0 is set, nvidia_drm/parameters/modeset isn't "Y"

My bad. Monkeying around with these things until at night made me sleep deprived.
Here's my truthful drm modeset setting:

> cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT="Advanced options for Arch Linux>Arch Linux, with Linux linux"
GRUB_TIMEOUT="3"
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet cryptdevice=UUID=<UUID of my encrypted volume>:systemdrive cryptkey=rootfs:/etc/cryptsetup-keys.d/cryptlvm.key nvidia_drm.modeset=1 nvidia_drm.fbdev=0"
GRUB_CMDLINE_LINUX=""

> sudo cat /sys/module/nvidia_drm/parameters/modeset
Y

journalctl -> https://0x0.st/8OV9.txt
Xorg log of "/var/log/Xorg.0.log" -> http://0x0.st/8OVp.txt
Xorg log of "/var/log/Xorg.2.log" -> http://0x0.st/8OVf.txt

"glxinfo -B"

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 11264 MB
    Total available memory: 11264 MB
    Currently available dedicated video memory: 10613 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 570.133.07
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 570.133.07
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 570.133.07
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

"vulkaninfo --summary"

==========
VULKANINFO
==========

Vulkan Instance Version: 1.4.309


Instance Extensions: count = 25
-------------------------------
VK_EXT_acquire_drm_display             : extension revision 1
VK_EXT_acquire_xlib_display            : extension revision 1
VK_EXT_debug_report                    : extension revision 10
VK_EXT_debug_utils                     : extension revision 2
VK_EXT_direct_mode_display             : extension revision 1
VK_EXT_display_surface_counter         : extension revision 1
VK_EXT_headless_surface                : extension revision 1
VK_EXT_surface_maintenance1            : extension revision 1
VK_EXT_swapchain_colorspace            : extension revision 5
VK_KHR_device_group_creation           : extension revision 1
VK_KHR_display                         : extension revision 23
VK_KHR_external_fence_capabilities     : extension revision 1
VK_KHR_external_memory_capabilities    : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2         : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2       : extension revision 1
VK_KHR_portability_enumeration         : extension revision 1
VK_KHR_surface                         : extension revision 25
VK_KHR_surface_protected_capabilities  : extension revision 1
VK_KHR_wayland_surface                 : extension revision 6
VK_KHR_xcb_surface                     : extension revision 6
VK_KHR_xlib_surface                    : extension revision 6
VK_LUNARG_direct_driver_loading        : extension revision 1
VK_NV_display_stereo                   : extension revision 1

Instance Layers: count = 10
---------------------------
VK_LAYER_INTEL_nullhw             INTEL NULL HW                1.1.73   version 1
VK_LAYER_MESA_device_select       Linux device selection layer 1.4.303  version 1
VK_LAYER_MESA_overlay             Mesa Overlay layer           1.4.303  version 1
VK_LAYER_MESA_screenshot          Mesa Screenshot layer        1.4.303  version 1
VK_LAYER_MESA_vram_report_limit   Limit reported VRAM          1.4.303  version 1
VK_LAYER_NV_optimus               NVIDIA Optimus layer         1.4.303  version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_32   Steam Overlay Layer          1.3.207  version 1
VK_LAYER_VALVE_steam_overlay_64   Steam Overlay Layer          1.3.207  version 1

Devices:
========
GPU0:
        apiVersion         = 1.4.303
        driverVersion      = 570.133.7.0
        vendorID           = 0x10de
        deviceID           = 0x1b06
        deviceType         = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
        deviceName         = NVIDIA GeForce GTX 1080 Ti
        driverID           = DRIVER_ID_NVIDIA_PROPRIETARY
        driverName         = NVIDIA
        driverInfo         = 570.133.07
        conformanceVersion = 1.4.1.0
        deviceUUID         = 53d43949-6a13-e9b2-7da2-e5b953fec214
        driverUUID         = a312329b-a338-5885-bebf-8b95ca9ae741
GPU1:
        apiVersion         = 1.4.305
        driverVersion      = 25.0.3
        vendorID           = 0x8086
        deviceID           = 0x1912
        deviceType         = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
        deviceName         = Intel(R) HD Graphics 530 (SKL GT2)
        driverID           = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
        driverName         = Intel open-source Mesa driver
        driverInfo         = Mesa 25.0.3-arch1.1
        conformanceVersion = 1.4.0.0
        deviceUUID         = 86801219-0600-0000-0002-000000000000
        driverUUID         = d0a849ea-650f-8ea2-f5c3-be32b6a9ea30

Sidenote: The Desktop Environment "Cinnamon (Software Render)" has frozen and rebooted my computer too. I'm not sure if it has something to do with my problem here but i'll post that as my next thread after i'm done with this one.

Offline

#4 Yesterday 23:15:55

seth
Member
Registered: 2012-09-03
Posts: 62,824

Re: Nvidia HW Acceleration doesn't work on certain programs

Hybrid graphics, no outputs attached to the IGP, X11 runs on the nvidia GPU
There's no indication for any problems w/ that setup.

steam client will jitter when visiting store pages and especially video playback.

vainfo

You might have to nudge the system to use the nvidia libva, "LIBVA_DRIVER_NAME=nvidia vainfo", exporting LIBVA_DRIVER_NAME might solve this problem.
steam might also try to be clever any implicitly use DRI_PRIME, but on your config, that'll probably result in using the IGP => DRI_PRIME=0
https://wiki.archlinux.org/title/PRIME# … _using_GPU

nb, if you can disable the IGP in the UEFI, you'd probably want to do that.

system becomes unresponsive to anything. After about 2 minutes my computer reboots anew as if i pressed the reset button

"Cinnamon (Software Render)" has frozen and rebooted my computer too.

Underpowered, overheated, bad RAM  or broken CPU.

Apr 19 14:13:20 Nexus kernel: DMI: Gigabyte Technology Co., Ltd. Z170X-Gaming GT/Z170X-Gaming GT, BIOS F22f 03/09/2018

Do you overclock anything or your an XMP RAM setting?
This does absolutely never happen w/ KDE?

There's a bunch of drives/partitions - is there a parallel windows installation?

Offline

#5 Today 01:09:04

Big Scorpio
Member
Registered: 2024-12-15
Posts: 63

Re: Nvidia HW Acceleration doesn't work on certain programs

seth wrote:
vainfo
Trying display: wayland
Trying display: x11
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: VA-API NVDEC driver [direct backend]
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain12             : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD

I put these in "/etc/environment" now.

LIBVA_DRIVER_NAME=nvidia vainfo
__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia command
seth wrote:

nb, if you can disable the IGP in the UEFI, you'd probably want to do that.

I can do that but I have a use case for intel's integrated graphic processor and that is OBS Studio.

system becomes unresponsive to anything. After about 2 minutes my computer reboots anew as if i pressed the reset button

No, it's none of the hardware failure such as being underpowered, overheated, bad RAM  or broken CPU. My HW components have been mostly the same for as many years as the intel's Skylake generation was released and i only added new RAM and a nvme SSD to it. This problem happened only 2 days ago, so since 2 days i made some changes in my Linux, that i am reverting. Plus this freeze and reboot happened in XFCE too. dmesg hasn't reported anything suspicious (i was logging it in real time) and the system resources were being used sparingly. I think i got it now (was monkeying with the USB port problem, that i blacklisted using udev rules) but we'll have to see in time.

seth wrote:
Apr 19 14:13:20 Nexus kernel: DMI: Gigabyte Technology Co., Ltd. Z170X-Gaming GT/Z170X-Gaming GT, BIOS F22f 03/09/2018

Do you overclock anything or your an XMP RAM setting?
This does absolutely never happen w/ KDE?

Indeed, I overlocked my CPU by 1 level to 4.3 GHz and my XMP RAM Profile 1 from 2133 MHz to 2400 MHz (i think. I'll need to check). System is not hot. I have a Cooler Master Evo 212 on my CPU and I use the Arctic MX-4 thermal paste, that I applied 6 months ago or so. CPU on idle is +40*C on avg.

seth wrote:

There's a bunch of drives/partitions - is there a parallel windows installation?

Yes. I am running RAID1 on these data disk drives (Software RAID on windows and formatted in NTFS filesystem) and there's an SSD containing Windows. Don't worry, i disabled windows fast boot as i remember from previously to do that.

This does absolutely never happen w/ KDE?

I am more wondering if it'll never happen on Windows but. Me want no more crypto mining KDE.

Offline

#6 Today 07:13:34

seth
Member
Registered: 2012-09-03
Posts: 62,824

Re: Nvidia HW Acceleration doesn't work on certain programs

I can do that but I have a use case for intel's integrated graphic processor and that is OBS Studio.

Not sure about the usecase, notably since

Video Capturing screen using OBS and Nvidia NVENC encoding to H264 or H265, no problem at all.

but the idea would be to at least temporarily disable it to see whetehr the condition has any impact on the steam behavior.

I put these in "/etc/environment" now.

LIBVA_DRIVER_NAME=nvidia vainfo
__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia command

that'd be wrong - proper syntax would be

LIBVA_DRIVER_NAME=nvidia
__NV_PRIME_RENDER_OFFLOAD=1
__GLX_VENDOR_LIBRARY_NAME=nvidia

and the idea would be to limit that to steam only anyway.

Is the steam problem limited to

visiting store pages and especially video playback

No problems w/ gameplay and nvidia-smi suggests steam runs on the nvidia GPU?

You have vaapi support, but I guess steam uses electron as browser and that's super picky (see the eternal https://bbs.archlinux.org/viewtopic.php … 5#p2237885 thread)

-- on the probably unrelated reboots:

Ftr "fast start" - "fast boot" generally refers to an unrelated BIOS/UEFI feature.
Make sure it's still disabled because windows occasionally re-enables it with updates and then

No, it's none of the hardware failure such as…

I'm afraid unless windows is scheduling reboots (hence the hibernation/fast-start problem) it'll come down to one of those.

I overlocked my CPU by 1 level to 4.3 GHz and my XMP RAM Profile 1 from 2133 MHz to 2400 MHz

Undo that - pick the most conservative settings possible - it's not only about heat, if you clock too fast™ the HW will loose the ability to distinguish between 0 and 1

Me want no more crypto mining KDE.

Conspiracy theory or do you mean that KDE uses up so many reources that it might as well be mining bitcoins on the side?

Offline

Board footer

Powered by FluxBB