Kernel 5.15 and CUDA

So I have this issue where if I run the 5.15.2-2 kernel, Blender isn’t detecting my Pascal-era nvidia gpu (running 495.44 drivers) as a CUDA device. CUDA runs fine with 5.14.18-1 kernel.

I don’t mind running an older kernel for the moment, but in the longer term, will this just fix itself with a driver update, or should I actually do something?

Is linux515-nvidia installed ?

I’m on testing branch with a Maxwell GPU, a bit older than yours and have no issues.
Please share:
inxi -Fazy
mhwd -li

1 Like

Certainly.

[mad@mj ~]$ pacman -Q | grep -e nvidia -e cuda
cuda 11.5.0-1
lib32-nvidia-utils 495.44-2
linux513-nvidia 495.44-1
linux514-nvidia 495.44-5
linux515-nvidia 495.44-7
mhwd-nvidia 495.44-4
mhwd-nvidia-390xx 390.144-1
mhwd-nvidia-470xx 470.86-2
nvidia-utils 495.44-4
opencl-nvidia 495.44-4
[mad@mj ~]$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2021.11.04               false            PCI


Warning: No installed USB configs!
[mad@mj ~]$ inxi -Fazy
System:
  Kernel: 5.14.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.14-x86_64
  root=UUID=138eb2ac-faf7-4441-bf9a-3cc5a26292b6 rw quiet apparmor=1
  security=apparmor resume=UUID=b57eae6e-fefa-4ccc-8ead-7dfaf2cd940a
  udev.log_priority=3
  Desktop: GNOME 41.1 tk: GTK 3.24.30 wm: gnome-shell
  dm: GDM 41.0, LightDM 1.30.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: X570 AORUS ELITE v: -CF
  serial: <superuser required>
  Mobo: Gigabyte model: X570 AORUS ELITE serial: <superuser required>
  UEFI: American Megatrends v: F31j date: 11/20/2020
Battery:
  Device-1: hidpp_battery_1 model: Logitech MX Master 3 for Mac
  serial: <filter> charge: 100% (should be ignored) rechargeable: yes
  status: Discharging
CPU:
  Info: 12-Core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3
  family: 19 (25) model-id: 21 (33) stepping: 0 microcode: A201009 cache:
  L1: 768 KiB L2: 6 MiB L3: 64 MiB
  flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  bogomips: 177359
  Speed: 2900 MHz min/max: 2200/3700 MHz boost: enabled Core speeds (MHz):
  1: 2900 2: 3423 3: 2151 4: 2524 5: 2897 6: 3452 7: 3879 8: 2074 9: 2108
  10: 2216 11: 2138 12: 2176 13: 3625 14: 2194 15: 2201 16: 2194 17: 2192
  18: 2053 19: 2035 20: 2075 21: 2194 22: 2193 23: 2191 24: 2199
  Vulnerabilities: Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, IBRS_FW,
  STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GP102 [GeForce GTX 1080 Ti] vendor: ASUSTeK driver: nvidia
  v: 495.44 alternate: nouveau,nvidia_drm bus-ID: 09:00.0 chip-ID: 10de:1b06
  class-ID: 0300
  Display: x11 server: X.Org 1.21.1.1 compositor: gnome-shell driver:
  loaded: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x572mm (40.0x22.5")
  s-diag: 1166mm (45.9")
  Monitor-1: HDMI-0 res: 3840x2160 hz: 60 dpi: 61
  size: 1600x900mm (63.0x35.4") diag: 1836mm (72.3")
  OpenGL: renderer: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
  v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio:
  Device-1: NVIDIA GP102 HDMI Audio vendor: ASUSTeK driver: snd_hda_intel
  v: kernel bus-ID: 09:00.1 chip-ID: 10de:10ef class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte
  driver: snd_hda_intel v: kernel bus-ID: 0b:00.4 chip-ID: 1022:1487
  class-ID: 0403
  Sound Server-1: ALSA v: k5.14.18-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.40 running: no
Network:
  Device-1: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel
  port: f000 bus-ID: 05:00.0 chip-ID: 8086:1539 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: ASUSTek Broadcom BCM20702A0 Bluetooth type: USB driver: btusb
  v: 0.8 bus-ID: 5-4:3 chip-ID: 0b05:17cb class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 8.08 TiB used: 5.44 TiB (67.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
  model: SSD 970 EVO Plus 250GB size: 232.89 GiB block-size: physical: 512 B
  logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
  rev: 1B2QEXM7 temp: 40.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:5 vendor: Samsung model: SSD 980 1TB
  size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
  lanes: 4 type: SSD serial: <filter> rev: 1B4QFXO7 temp: 43.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD40EZRZ-75GXCB0
  size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
  type: HDD rpm: 5400 serial: <filter> rev: 0A80 scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Patriot model: Burst size: 111.79 GiB
  block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD
  serial: <filter> rev: 11.1 scheme: MBR
  ID-5: /dev/sdc maj-min: 8:32 vendor: Crucial model: CT512MX100SSD1
  size: 476.94 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
  type: SSD serial: <filter> rev: MU01 scheme: MBR
  ID-6: /dev/sdd maj-min: 8:48 vendor: Western Digital model: WD30EZRZ-00Z5HB0
  size: 2.73 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
  type: HDD rpm: 5400 serial: <filter> rev: 0A80 scheme: GPT
Partition:
  ID-1: / raw-size: 896.79 GiB size: 881.64 GiB (98.31%)
  used: 396.62 GiB (45.0%) fs: ext4 dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
  used: 292 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:6
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 34.43 GiB used: 0 KiB (0.0%) priority: -2
  dev: /dev/nvme1n1p3 maj-min: 259:8
Sensors:
  System Temperatures: cpu: 49.0 C mobo: 35.0 C gpu: nvidia temp: 52 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
  Processes: 436 Uptime: 3h 10m wakeups: 4 Memory: 31.3 GiB
  used: 6.51 GiB (20.8%) Init: systemd v: 249 tool: systemctl Compilers:
  gcc: 11.1.0 clang: 13.0.0 Packages: 2104 pacman: 2079 lib: 548 flatpak: 18
  snap: 7 Shell: Bash v: 5.1.8 running-in: cool-retro-term inxi: 3.3.09

No apparent issue there, but did you tried to reboot (after first boot in 5.15 and cuda not working) back to 5.15 instead of the working kernel? The reason i ask, is because sometimes when i switch kernels, i notice some inconsistencies.

On the other hand, i always use this additions to the default nvidia.config

    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"

and nvidia drivers never failed me. Sometimes running
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
helps … especially after changing the config.

On my Gnome install i use early KMS too.

1 Like

Yeah, I only noticed the CUDA thing after several reboots.

To be fair, this may be a Blender issue, so perhaps I’ll open an issue on their tracker.
I should probably test this with their official builds rather than my custom ones before I do so however. (not that my small customizations touch on cycles or CUDA in any way)

Ah, so is not the Blender we provide in our repositories either?

1 Like

No, I’m an avid Blender user and generally always run master builds, file bug reports and such - and updating from git and building from source is just faster and easier than downloading 200mb every other day :slight_smile:

Hence master problems … fine, do your thing.

1 Like

Huh. That’s weird. I installed Blender from the repos just to check… and now my cuda seems to work on the custom builds on 5.15. Which is odd because Blender provides its own libs.

Weird.

Oh well. At least it works.

Thanks!