Prime-run command not working in Wayland session

I am using the nvidia-470xx-dkms driver. I installed my driver following the instructions at: GitHub - korvahannu/arch-nvidia-drivers-installation-guide: A repository that holds a simple guide on how you can install and configure proprietary NVIDIA drivers for Arch Linux.

The contents of the prime-run file :


Prime-run works fine in X11 session, but not in Wayland session.
For example, when I run prime-run firefox or prime-run gimp, these programs do not work with the nvidia video card. Using nvidia-smi I can see that these programs do not work with nvidia. But when I run flatpak applications with prime-run in the wayland session, they work with the nvidia video card. For example, with prime-run flatpak run com.brave.Browser, brave starts with nvidia, but when I start non-flatpak brave with prime-run brave-browser, it opens with intel.
I also use optimus-manager. I use optimus-manager in hybrid mode.
The codes in /etc/X11/xorg.conf.d/10-optimus-manager.conf are :

Section “Files”
ModulePath “/usr/lib/nvidia”
ModulePath “/usr/lib32/nvidia”
ModulePath “/usr/lib32/nvidia/xorg/modules”
ModulePath “/usr/lib32/xorg/modules”
ModulePath “/usr/lib64/nvidia/xorg/modules”
ModulePath “/usr/lib64/nvidia/xorg”
ModulePath “/usr/lib64/xorg/modules”

Section “ServerLayout”
Identifier “layout”
Screen 0 “integrated”
Inactive “nvidia”
Option “AllowNVIDIAGPUScreens”

Section “Device”
Identifier “integrated”
Driver “intel”
BusID “PCI:0:2:0”
Option “AccelMethod” “sna”
Option “TearFree” “true”
Option “DRI” “3”

Section “Screen”
Identifier “integrated”
Device “integrated”

Section “Device”
Identifier “nvidia”
Driver “nvidia”
BusID “PCI:1:0:0”
Option “Coolbits” “28”

Section “Screen”
Identifier “nvidia”
Device “nvidia”

First problem. Or multiple really.

On manjaro we handle drivers through mhwd.

( Configure Graphics Cards - Manjaro )

Which would also equate to different packages - like linux66-nvidia470xx.

Furthermore you should not be trying to use wayland on any nvidia driver prior to the ~540 or so.
Which is quite a lot more recent than 470.
nvidia driver version 470 will not work with wayland. Simple as.

This is wrong and unsupported.
Undo these configurations and consult manjaro documentation.
Otherwise you are on your own.

I didn’t know that the nvidia-470xx-dkms driver doesn’t work with wayland. whenever I installed my nvidia drivers with mhwd, the session screen wouldn’t open, but it would open when I installed the dkms drivers, so I installed the dkms drivers.

That sounds like a different problem.
But we cannot diagnose it or talk about it at all really without further information.

If you want assistance with that then I might suggest beginning with some system information:

inxi -Farz
mhwd -li -l

Though note that other actions you have made, such as

Will be so out of scope as to not be considered by anyone.
So take care to undo them or at least list them if still present.

inxi -Farz :

Kernel: 6.9.3-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/boot/vmlinuz-6.9-x86_64
root=UUID=5437c900-efb8-4534-8dad-b3fae1358c3f rw quiet splash
udev.log_priority=3 nvidia-drm.modeset=1
Desktop: KDE Plasma v: 6.0.5 tk: Qt v: N/A info: frameworks v: 6.2.0
wm: kwin_wayland vt: 1 dm: SDDM Distro: Manjaro base: Arch Linux
Type: Laptop System: ARCELIK A.S. product: GNB-1588-B1-i5 v: 03
serial: Chassis: Quanta type: 10 v: UK
Mobo: Quanta model: TWD v: TBD serial:
part-nu: 152D1054 uuid: UEFI: Insyde v: GR162
date: 05/27/2014
Info: model: Intel Core i5-3210M bits: 64 type: MT MCP arch: Ivy Bridge
gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
model-id: 0x3A (58) stepping: 9 microcode: 0x21
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
L3: 3 MiB desc: 1x3 MiB
Speed (MHz): avg: 1275 high: 1500 min/max: 1200/3100 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 1500 2: 1200 3: 1200
4: 1200 bogomips: 19961
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Type: gather_data_sampling status: Not affected
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: mmio_stale_data status: Unknown: No mitigations
Type: reg_file_data_sampling status: Not affected
Type: retbleed status: Not affected
Type: spec_rstack_overflow status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
Type: srbds status: Vulnerable: No microcode
Type: tsx_async_abort status: Not affected
Device-1: Intel 3rd Gen Core processor Graphics vendor: QUANTA driver: i915
v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
active: LVDS-1 empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
chip-ID: 8086:0166 class-ID: 0300
Device-2: NVIDIA GK208M [GeForce GT 740M] vendor: QUANTA driver: nvidia
v: 470.256.02 alternate: nouveau,nvidia_drm non-free: series: 470.xx+
status: legacy-active (EOL~2024-09-xx) arch: Kepler code: GKxxx
process: TSMC 28nm built: 2012-2018 pcie: gen: 1 speed: 2.5 GT/s lanes: 8
link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1292
class-ID: 0302
Device-3: Chicony USB HD Webcam driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-3:3 chip-ID: 04f2:b506
class-ID: 0e02 serial:
Display: wayland server: v: with: Xwayland v: 24.1.0
compositor: kwin_wayland driver: X: loaded: intel,nvidia dri: i965
gpu: i915,nvidia display-ID: 0
Monitor-1: LVDS-1 res: 1366x768 size: N/A modes: N/A
API: EGL v: 1.5 hw: drv: intel crocus drv: nvidia platforms: device: 0
drv: nvidia device: 1 drv: crocus device: 3 drv: swrast gbm: drv: kms_swrast
surfaceless: drv: crocus wayland: drv: crocus x11: drv: crocus
inactive: device-2
API: OpenGL v: 4.6.0 compat-v: 4.2 vendor: intel mesa v: 24.0.9-manjaro1.1
glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 4000 (IVB
GT2) device-ID: 8086:0166 memory: 1.46 GiB unified: yes display-ID: :1.0
API: Vulkan v: 1.3.279 layers: 1 device: 0 type: discrete-gpu
name: NVIDIA GeForce GT 740M driver: nvidia v: 470.256.02
device-ID: 10de:1292 surfaces: xcb,xlib,wayland
Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: QUANTA
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
class-ID: 0403
API: ALSA v: k6.9.3-3-MANJARO status: kernel-api with: aoss
type: oss-emulator tools: alsactl,alsamixer,amixer
Server-1: JACK v: 1.9.22 status: off tools: N/A
Server-2: PipeWire v: 1.0.7 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
tools: pactl,pw-cat,pw-cli,wpctl
Device-1: Realtek RTL8723AE PCIe Wireless Network Adapter vendor: AzureWave
driver: rtl8723ae v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 4000
bus-ID: 07:00.0 chip-ID: 10ec:8723 class-ID: 0280
IF: wlp7s0 state: down mac:
Device-2: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: QUANTA
driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000
bus-ID: 08:00.0 chip-ID: 1969:1091 class-ID: 0200
IF: enp8s0 state: down mac:
Device-3: TP-Link Archer T3U [Realtek RTL8812BU] driver: rtw_8822bu
type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 3-1:2
chip-ID: 2357:012d class-ID: 0000 serial:
IF: wlp0s20u1 state: up mac:
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Device-1: IMC Networks Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1.3:3 chip-ID: 13d3:3394
class-ID: e001 serial:
Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: see --recommends
Local Storage: total: 810.43 GiB used: 141.47 GiB (17.5%)
SMART Message: Required tool smartctl not installed. Check --recommends
ID-1: /dev/sda maj-min: 8:0 vendor: Kingston model: SV300S37A120G
size: 111.79 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: fw-rev: BBF0 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Samsung model: ST750LM022 HN-M750MBB
size: 698.64 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
tech: HDD rpm: 5400 serial: fw-rev: 0001 scheme: GPT
ID-1: / raw-size: 45 GiB size: 43.99 GiB (97.76%) used: 17.77 GiB (40.4%)
fs: ext4 dev: /dev/sda5 maj-min: 8:5
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
used: 26 MiB (27.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
Alert: No swap data was found.
System Temperatures: cpu: 54.0 C mobo: N/A
Fan Speeds (rpm): N/A
Packages: 1301 pm: pacman pkgs: 1286 libs: 362 tools: pamac,yay pm: flatpak
pkgs: 15
Active pacman repo servers in: /etc/pacman.d/mirrorlist
Memory: total: 12 GiB available: 11.56 GiB used: 4.62 GiB (40.0%)
Processes: 239 Power: uptime: 27m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 4.6 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 255 default: graphical
tool: systemctl
Compilers: gcc: 14.1.1 Shell: Zsh v: 5.9 default: Bash v: 5.2.26
running-in: konsole inxi: 3.3.34

mhwd -li -l :

Warning: No installed PCI configs!
Warning: No installed USB configs!

0000:01:00.0 (0302:10de:1292) Display controller nVidia Corporation:

              NAME               VERSION          FREEDRIVER           TYPE

video-hybrid-intel-nvidia-390xx-bumblebee 2023.03.23 false PCI
video-nvidia-390xx 2023.03.23 false PCI
video-linux 2024.05.06 true PCI

0000:00:02.0 (0300:8086:0166) Display controller Intel Corporation:

              NAME               VERSION          FREEDRIVER           TYPE

video-hybrid-intel-nvidia-390xx-bumblebee 2023.03.23 false PCI
video-linux 2024.05.06 true PCI
video-modesetting 2020.01.13 true PCI
video-vesa 2017.03.12 true PCI

Then I undo all the steps I did in that link. But as I said, if I install the driver with mhwd, my login screen does not open. How can I install my driver?

I uninstalled the nvidia 470xx drivers and reverted back to the nouveau drivers. i will use DRI_PRIME=1 instead of prime-run

That will probably be the only solution if you want to use wayland.

In case these extra points are helpful;

I might suggest you go through those previous configs to be sure - such as removing any extra hooks, module settings, etc, as shown in the other link or anything related to that.

Similarly you may wish to reinstall the mhwd profile video-linux which is the grouping for the open drivers.

sudo mhwd -f -i pci video-linux

@LeviSpektrum In the future, please use proper formatting. Using quotes for file and terminal output are not acceptable and are hard to read. Please see [HowTo] Post command output and file content as formatted text

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