Prime is not working

The Prime Select tray thing says “Prime is not working”. How to fix? Framerate on the 2560x1440 desktop is somewhat slow.

Command prime-run glxspheres64 seems to run ok.

Output of nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   44C    P8    16W /  N/A |     56MiB /  7982MiB |     16%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1421      G   /usr/lib/Xorg                      55MiB |
+-----------------------------------------------------------------------------+

Output of mhwd -li:

> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.11.04               false            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

Output of mhwd-gpu --status:

:
: status
  xorg configuration file: '/etc/X11/mhwd.d/nvidia.conf'

Output of cat /etc/X11/mhwd.d/nvidia.conf:

##
## Generated by mhwd - Manjaro Hardware Detection
##

Output of inxi --admin --verbosity=7 --filter --no-host --width:

System:
  Kernel: 5.15.6-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=4c590cac-36b7-4237-aac2-058cf52176ee rw apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Avell High Performance product: C65 MOB v: Standard
    serial: <superuser required>
  Mobo: Avell High Performance model: Avell C65 MOB v: Standard
    serial: <superuser required> UEFI: American Megatrends LLC. v: N.1.07AVE00
    date: 07/23/2021
Battery:
  ID-1: BAT0 charge: 91.6 Wh (100.0%) condition: 91.6/91.6 Wh (100.0%)
    volts: 13.1 min: 11.6 model: standard type: Li-ion serial: <filter>
    status: Full
Memory:
  RAM: total: 15.37 GiB used: 3.93 GiB (25.5%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake family: 6 model-id: 0x8D (141) stepping: 1 microcode: 0x34
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 640 KiB desc: d-8x48 KiB; i-8x32 KiB L2: 10 MiB desc: 8x1.2 MiB
    L3: 24 MiB desc: 1x24 MiB
  Speed (MHz): avg: 1078 high: 1198 min/max: 800/4600 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1198 2: 1152 3: 977
    4: 1069 5: 1156 6: 1100 7: 1185 8: 1120 9: 1078 10: 1122 11: 960 12: 801
    13: 1162 14: 1058 15: 1150 16: 974 bogomips: 73744
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 avx512_bitalg avx512_vbmi2
    avx512_vnni avx512_vp2intersect avx512_vpopcntdq avx512bw avx512cd
    avx512dq avx512f avx512ifma avx512vbmi avx512vl bmi1 bmi2 bts cat_l2
    cdp_l2 clflush clflushopt clwb cmov constant_tsc cpuid cpuid_fault cx16
    cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
    flush_l1d fma fpu fsgsbase fsrm fxsr gfni ht hwp hwp_act_window hwp_epp
    hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe movdir64b
    movdiri msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdpid rdrand rdseed
    rdt_a rdtscp rep_good sdbg sep sha_ni smap smep split_lock_detect ss ssbd
    sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc
    tsc_adjust tsc_deadline_timer tsc_known_freq umip vaes vme vmx vnmi
    vpclmulqdq vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  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: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics]
    vendor: Tongfang Hongkong Limited driver: i915 v: kernel bus-ID: 00:02.0
    chip-ID: 8086:9a60 class-ID: 0300
  Device-2: NVIDIA GA104M [GeForce RTX 3070 Mobile / Max-Q]
    vendor: Tongfang Hongkong Limited driver: nvidia v: 495.44
    alternate: nouveau,nvidia_drm bus-ID: 01:00.0 chip-ID: 10de:249d
    class-ID: 0300
  Device-3: Chicony HD Webcam type: USB driver: uvcvideo bus-ID: 3-13:8
    chip-ID: 04f2:b71a class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver:
    loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 4480x1440 s-dpi: 96 s-size: 1185x381mm (46.7x15.0")
    s-diag: 1245mm (49")
  Monitor-1: eDP-1 res: 2560x1440 hz: 165 dpi: 171
    size: 381x214mm (15.0x8.4") diag: 437mm (17.2")
  Monitor-2: HDMI-1-0 res: 1920x1080 hz: 60 dpi: 305
    size: 160x90mm (6.3x3.5") diag: 184mm (7.2")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Tongfang Hongkong Limited
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:43c8 class-ID: 0403
  Device-2: NVIDIA GA104 High Definition Audio
    vendor: Tongfang Hongkong Limited driver: snd_hda_intel v: kernel
    bus-ID: 01:00.1 chip-ID: 10de:228b class-ID: 0403
  Sound Server-1: ALSA v: k5.15.6-2-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.19 running: no
  Sound Server-4: PulseAudio v: 15.0 running: no
  Sound Server-5: PipeWire v: 0.3.40 running: yes
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:43f0 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8125 2.5GbE vendor: Tongfang Hongkong Limited
    driver: r8169 v: kernel port: 3000 bus-ID: 2d:00.0 chip-ID: 10ec:8125
    class-ID: 0200
  IF: enp45s0 state: down mac: <filter>
  Device-3: Realtek RTL8152 Fast Ethernet Adapter type: USB driver: r8152
    bus-ID: 3-5.2:7 chip-ID: 0bda:8152 class-ID: 0000 serial: <filter>
  IF: enp0s20f0u5u2 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 3-14:10 chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 2.31 TiB used: 1.35 TiB (58.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: A-Data model: IM2P33F8BR2-1TB
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: T0214B0L temp: 32.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: KingSpec model: KingSpec
    size: 476.94 GiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 1508 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  ID-3: /dev/sdc maj-min: 8:32 type: USB vendor: Seagate model: Expansion
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B type: N/A
    serial: <filter> rev: 0710 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 234.13 GiB size: 229.38 GiB (97.97%)
    used: 94.67 GiB (41.3%) fs: ext4 dev: /dev/nvme0n1p6 maj-min: 259:6
    label: N/A uuid: 4c590cac-36b7-4237-aac2-058cf52176ee
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 25.3 MiB (26.3%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: N/A uuid: 40B5-B561
  ID-3: /run/media/dandrea/dandrea_1GB raw-size: 931.51 GiB
    size: 931.51 GiB (100.00%) used: 925.24 GiB (99.3%) fs: ntfs dev: /dev/sdc1
    maj-min: 8:33 label: dandrea_1GB uuid: 42BE39BFBE39AC73
  ID-4: /run/timeshift/backup raw-size: 476.93 GiB size: 468.38 GiB (98.21%)
    used: 366.72 GiB (78.3%) fs: ext4 dev: /dev/sda1 maj-min: 8:1
    label: z3_dandrea_000 uuid: 280f54d3-7232-481f-a7c3-a4cd3fa37321
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required>
    label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 703.13 GiB fs: ntfs
    label: Windows uuid: 8CBCB814BCB7F6B4
  ID-3: /dev/nvme0n1p4 maj-min: 259:4 size: 508 MiB fs: ntfs label: N/A
    uuid: 9A6C04036C03D8C1
  ID-4: /dev/nvme0n1p5 maj-min: 259:5 size: 16 GiB fs: ntfs label: Drivers
    uuid: CCB058B3B058A62C
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 2-1:2 info: Genesys Logic USB3.1 Hub ports: 4 rev: 3.1
    speed: 5 Gb/s chip-ID: 05e3:0626 class-ID: 0900
  Hub-4: 3-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-2:2 info: Microsoft Nano Transceiver 1.1
    type: Keyboard,HID,Mouse driver: hid-generic,usbhid interfaces: 3 rev: 2.0
    speed: 12 Mb/s power: 100mA chip-ID: 045e:07fd class-ID: 0301
  Hub-5: 3-5:3 info: Genesys Logic Hub ports: 4 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 05e3:0610 class-ID: 0900
  Device-1: 3-5.1:5 info: Lenovo Traditional USB Keyboard type: Keyboard
    driver: hid-generic,usbhid interfaces: 1 rev: 1.1 speed: 1.5 Mb/s
    power: 98mA chip-ID: 17ef:6099 class-ID: 0301
  Device-2: 3-5.2:7 info: Realtek RTL8152 Fast Ethernet Adapter
    type: Network driver: r8152 interfaces: 1 rev: 2.1 speed: 480 Mb/s
    power: 100mA chip-ID: 0bda:8152 class-ID: 0000 serial: <filter>
  Device-3: 3-5.4:9 info: Intrinsix KingSpec type: Mass Storage driver: uas
    interfaces: 1 rev: 2.1 speed: 480 Mb/s power: 500mA chip-ID: 0578:0578
    class-ID: 0806 serial: <filter>
  Device-4: 3-11:4 info: Integrated Express ITE Device(8291)
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s power: 100mA chip-ID: 048d:ce00 class-ID: 0300
  Device-5: 3-12:6 info: Integrated Express ITE Device(8291)
    type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 2.0
    speed: 12 Mb/s power: 100mA chip-ID: 048d:6005 class-ID: 0300
  Device-6: 3-13:8 info: Chicony HD Webcam type: Video driver: uvcvideo
    interfaces: 4 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 04f2:b71a
    class-ID: 0e02 serial: <filter>
  Device-7: 3-14:10 info: Intel AX201 Bluetooth type: Bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 8087:0026 class-ID: e001
  Hub-6: 4-0:1 info: Super-speed hub ports: 8 rev: 3.1 speed: 20 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Device-1: 4-3:2 info: Realtek Card Reader type: Mass Storage
    driver: usb-storage interfaces: 1 rev: 3.0 speed: 5 Gb/s power: 800mA
    chip-ID: 0bda:0316 class-ID: 0806 serial: <filter>
  Device-2: 4-4:3 info: Seagate RSS LLC Expansion Portable
    type: Mass Storage driver: uas interfaces: 1 rev: 3.0 speed: 5 Gb/s
    power: 896mA chip-ID: 0bc2:231a class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 51.0 C mobo: 51.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 374 Uptime: 2h 2m wakeups: 3 Init: systemd v: 249 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: apt: 0 pacman: 1508 lib: 373
  flatpak: 0 Shell: fish v: 3.3.1 default: Bash v: 5.1.12 running-in: konsole
  inxi: 3.3.10