Nvidia Optimus doesn’t work with 545 driver

Hello, my Manjaro KDE unstable setup won’t run with prime-run anything. Drivers installed correctly, everything is detected, i may run nvidia-settings, but anything i run with prime-run crashes after recent updates.

Actually, after 545 driver update yesterday i played a game, but at the evening there were mhwd update. Don’t know if it’s a coincidence, but after shutting down yesterday and turning on laptop today prime-run does not work.

Tried with 6.1 and 6.6 kernels, with no luck. Nvidia works properly on Windows (i have install in separate USB drive to test).

Forgot to mention, using X11 windows system. Tried to load Wayland, but now i get black screen with mouse cursor.

inxi -Gazy


Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-12.1 process: Intel 10nm built: 2020-21
    ports: active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, HDMI-A-1
    bus-ID: 00:02.0 chip-ID: 8086:9a49 class-ID: 0300
  Device-2: NVIDIA TU117M [GeForce MX450] vendor: Lenovo driver: nvidia
    v: 545.29.02 alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current
    (as of 2023-10; EOL~2026-12-xx) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-2022 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 4 link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:1f97 class-ID: 0302
  Device-3: IMC Networks Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-7:3 chip-ID: 13d3:56fb
    class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: modesetting,nouveau
    alternate: fbdev,nv,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1600 s-dpi: 96 s-size: 677x423mm (26.65x16.65")
    s-diag: 798mm (31.43")
  Monitor-1: eDP-1 model-id: CSO 0x1602 built: 2020 res: 2560x1600 hz: 60
    dpi: 189 gamma: 1.2 size: 344x215mm (13.54x8.46") diag: 406mm (16")
    ratio: 16:10 modes: 2560x1600
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 1 drv: iris device: 3 drv: swrast surfaceless:
    drv: nvidia x11: drv: iris inactive: gbm,wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 23.1.9-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2)
    device-ID: 8086:9a49 memory: 15.05 GiB unified: yes
  API: Vulkan v: 1.3.269 layers: 16 device: 0 type: integrated-gpu name: Intel
    Xe Graphics (TGL GT2) driver: mesa intel v: 23.1.9-manjaro1.1
    device-ID: 8086:9a49 surfaces: xcb,xlib device: 1 type: discrete-gpu
    name: NVIDIA GeForce MX450 driver: nvidia v: 545.29.02 device-ID: 10de:1f97
    surfaces: xcb,xlib

prime-run glxinfo

name of display: :0
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  0
  Current serial number in output stream:  31

pacman -Qs “(mesa|nvidia|nouv|xf86-video|optimus|vulkan)”

local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/geforcenow-electron-bin 2.0.0-1
    Linux Desktop client for Nvidia's GeForce NOW game streaming service
local/glu 9.0.3-1
    Mesa OpenGL utility library
local/goverlay-bin 0.9.1-3
    A GUI to help manage Vulkan/OpenGL overlays
local/lib32-glu 9.0.3-1
    Mesa OpenGL utility library (32 bits)
local/lib32-libva-mesa-driver 1:23.1.9-1
    VA-API drivers (32-bit)
local/lib32-libvdpau 1.5-2
    Nvidia VDPAU library
local/lib32-mesa 1:23.1.9-1
    An open-source implementation of the OpenGL specification (32-bit)
local/lib32-mesa-demos 9.0.0-1
    Mesa demos (32-bit)
local/lib32-mesa-utils 9.0.0-1
    Essential Mesa utilities (32-bit)
local/lib32-mesa-vdpau 1:23.1.9-1
    VDPAU drivers (32-bit)
local/lib32-nvidia-utils 545.29.02-1
    NVIDIA drivers utilities (32-bit)
local/lib32-opencl-nvidia 545.29.02-1
    OpenCL implemention for NVIDIA (32-bit)
local/lib32-vkd3d 1.9-1
    Direct3D 12 to Vulkan translation library By WineHQ
local/lib32-vulkan-icd-loader 1.3.269-1
    Vulkan Installable Client Driver (ICD) Loader (32-bit)
local/lib32-vulkan-intel 1:23.1.9-1
    Intel's Vulkan mesa driver (32-bit)
local/lib32-vulkan-mesa-layers 1:23.1.9-1
    Mesa's Vulkan layers (32-bit)
local/lib32-vulkan-radeon 1:23.1.9-1
    Radeon's Vulkan mesa driver (32-bit)
local/lib32-vulkan-validation-layers 1.3.268.0-1
    Vulkan Validation Layers (32-bit)
local/libva-mesa-driver 1:23.1.9-1
    VA-API drivers
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 545.29.02-1
    NVIDIA NV-CONTROL X extension
local/linux61-nvidia 545.29.02-1 (linux61-extramodules)
    NVIDIA drivers for linux
local/linux66-nvidia 545.29.02-1 (linux66-extramodules)
    NVIDIA drivers for linux
local/mangohud 0.7.0-2
    A Vulkan overlay layer for monitoring FPS, temperatures, CPU/GPU load and more.
local/mesa 1:23.1.9-1
    An open-source implementation of the OpenGL specification
local/mesa-demos 9.0.0-3
    Mesa demos
local/mesa-utils 9.0.0-3
    Essential Mesa utilities
local/mesa-vdpau 1:23.1.9-1
    VDPAU drivers
local/mhwd-nvidia 545.29.02-1
    MHWD module-ids for nvidia 545.29.02
local/mhwd-nvidia-390xx 390.157-8
    MHWD module-ids for nvidia 390.157
local/mhwd-nvidia-470xx 470.223.02-1
    MHWD module-ids for nvidia 470.223.02
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-settings 545.29.02-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 545.29.02-1
    NVIDIA drivers utilities
local/nvtop 3.0.2-1
    GPUs process monitoring for AMD, Intel and NVIDIA
local/opencl-nvidia 545.29.02-1
    OpenCL implemention for NVIDIA
local/perl-role-tiny 2.002004-4
    Roles. Like a nouvelle cuisine portion size slice of Moose.
local/spirv-tools 2022.4-1 (vulkan-devel)
    API and commands for processing SPIR-V modules
local/vkd3d 1.9-1
    Direct3D 12 to Vulkan translation library By WineHQ
local/vulkan-extra-layers 1.3.250.0-1 (vulkan-devel)
    Extra layers for Vulkan development
local/vulkan-headers 1:1.3.269-1 (vulkan-devel)
    Vulkan header files
local/vulkan-icd-loader 1.3.269-1
    Vulkan Installable Client Driver (ICD) Loader
local/vulkan-intel 1:23.1.9-1
    Intel's Vulkan mesa driver
local/vulkan-mesa-layers 1:23.1.9-1
    Mesa's Vulkan layers
local/vulkan-radeon 1:23.1.9-1
    Radeon's Vulkan mesa driver
local/vulkan-tools 1.3.269-1 (vulkan-devel)
    Vulkan Utilities and Tools
local/vulkan-validation-layers 1.3.268.0-1 (vulkan-devel)
    Vulkan Validation Layers
local/xf86-video-nouveau 1.0.17-2 (xorg-drivers)
    Open Source 3D acceleration driver for nVidia cards

mhwd -li

sudo micro /etc/mkinitcpio.conf

HOOKS=(base systemd autodetect modconf kms keyboard keymap consolefont block filesystems fsck)

also tried load MODULES =(i915) or =(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

that didn’t help

reinstalled drivers several times with:

sudo mhwd -r pci video-hybrid-intel-nvidia-prime
sudo mhwd -a pci nonfree 0300

that didn’t help

prime-run steam crashes with similar error message:

prime-run steam

steam.sh[35329]: Running Steam on manjarolinux 23.1.0 64-bit

steam.sh[35329]: STEAM_RUNTIME is enabled automatically

setup.sh[35401]: Steam runtime environment up-to-date!

steam.sh[35329]: Steam client's requirements are satisfied

[2023-11-01 23:58:34] Startup - updater built Oct 31 2023 02:08:17

[2023-11-01 23:58:34] Startup - Steam Client launched with: '/home/keturidu/.local/share/Steam/ubuntu12_32/steam'

11/01 23:58:34 Init: Installing breakpad exception handler for appid(steam)/version(1698777785)/tid(35469)

SteamUpdateUI: An X Error occurred

X Error of failed request: BadAlloc (insufficient resources for operation)

Major opcode of failed request: 152 (GLX)

Minor opcode of failed request: 5 (X_GLXMakeCurrent)

Serial number of failed request: 0

xerror_handler: X failed, continuing

Looks like steam didn't shutdown cleanly, scheduling immediate update check

[2023-11-01 23:58:34] Loading cached metrics from disk (/home/keturidu/.local/share/Steam/package/steam_client_metrics.bin)

[2023-11-01 23:58:34] Using the following download hosts for Public, Realm steamglobal

[2023-11-01 23:58:34] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'

[2023-11-01 23:58:34] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'

[2023-11-01 23:58:34] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'

[2023-11-01 23:58:34] Checking for update on startup

[2023-11-01 23:58:34] Checking for available updates...

[2023-11-01 23:58:34] Downloading manifest: https://client-update.akamai.steamstatic.com/steam_client_ubuntu12

[2023-11-01 23:58:34] Manifest download: send request

[2023-11-01 23:58:34] Manifest download: waiting for download to finish

[2023-11-01 23:58:34] Manifest download: finished

[2023-11-01 23:58:34] Download skipped: /steam_client_ubuntu12 version 1698777785, installed version 1698777785, existing pending version 0

[2023-11-01 23:58:34] Nothing to do

[2023-11-01 23:58:34] Verifying installation...

[2023-11-01 23:58:34] Performing checksum verification of executable files

[2023-11-01 23:58:35] Verification complete

Steam logging initialized: directory: /home/keturidu/.local/share/Steam/logs

/home/keturidu/.themes/Breeze-KDE-Story-Light/gtk-2.0/widgets/entry:70: error: unexpected identifier 'direction', expected character '}'

/home/keturidu/.themes/Breeze-KDE-Story-Light/gtk-2.0/widgets/styles:36: error: invalid string constant "combobox_entry", expected valid string constant

XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xf0c25dc0

XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xf0c24500

crash_20231101235835_5.dmp[35489]: Uploading dump (out-of-process)

/tmp/dumps/crash_20231101235835_5.dmp

/home/keturidu/.local/share/Steam/steam.sh: line 798: 35469 Segmentation fault (core dumped) "$STEAMROOT/$STEAMEXEPATH" "$@"

xorg.log

https://justpaste.it/cit03

As an aside … you shouldnt be launching steam with prime-run.
Instead you edit a games launch options like so (assuming no other options):

prime-run %command%

To the issue:
I know nvidia updates were pushed because of disclosed vulnerabilities some time in the last few days. But I cant offer much more than that.

sure, that was just for testing. i can’t launch any game now with prime-run %command% in steam, that’s the whole point of this thread :smile:

That won’t do much without: DRM kernel mode setting :wink:

Ok, thanks. Have some progress here, but prime-run still doesn’t work on X11.

updated grub:

updated initframs:

screenshot were made after update grub and initframs and restart.

X11 prime-run glxinfo | grep OpenGL:

X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  5 (X_GLXMakeCurrent)
  Serial number of failed request:  0
  Current serial number in output stream:  31

wayland prime-run glxinfo | grep OpenGL:

Wine games on steam on X11 with prime-run %command% shows this error:
Selection_173

Native games on X11 crashes (won’t start).

I could use Wayland, i guess. But when i login to it i get black screen and mouse cursor. I could launch apps with ALT+F2.

That is strange. You don’t have any environment variables set like LIBVA_DRIVER_NAME=nvidia or VDPAU_DRIVER=nvidia, do you?

I also have an Intel+NVIDIA hybrid laptop, however I have three monitors connected so I’m always using the dedicated NVIDIA card.

Which kernel are you using?

About env: i don’t use any variables, at least as far as i know :smiley: this setup lives many years, and i made lots of changes before. but no, i don’t remember using these.

Tested prime-run with two kernels 6.6 and 6.1. Same results.

tl;dr removed everything related with nvidia, cleaned up manjaro system, reinstalled again - now prime-run works as intended.

After several days of lurking at distrowatch, using ventoy and trying live distros, realized that i won’t get anything better for my tastes.

Then lived for a day with an idea, that i need to reinstall Manjaro but this time with btrfs. Then i realized, how much i’ll have to learn to enjoy this and got back to my current setup.

So i used brute force and cleaned everything i could reach. With mhwd removed nvidia driver. Removed all leftover files that looked suspicious: in /etc/modprobe.d/ nvidia.conf and file xorg.conf-nvidia-xconfig-original from /etc/X11. Rebooted, then uninstalled everything i didn’t use at all or don’t use anymore from AUR. Cleaned up system from packages/leftovers etc. Removed nvidia modules from initframs, updated it. Removed drm modeset from grub, updated it. Reinstalled nvidia drivers with manjaro tool.

And now prime-run works.

I’ve no clue, what changed, but i see from inxi -G, that this time “Display” didn’t load drivers modesetting, nouveau - system loads modesetting, nvidia.

was:

Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: modesetting,nouveau
    alternate: fbdev,nv,vesa dri: iris gpu: i915 display-ID: :0 screens: 1

now:

Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia unloaded: nouveau
    alternate: fbdev,nv,vesa dri: iris gpu: i915 display-ID: :0 screens: 1

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.