Nvidia RTX A500 GPU works very poorly in Linux

Hello, I have a laptop with dual graphics card, integrated and nvidia RTX A500. When I test my integrated GPU (which is supposed to be weak) with glmark2 I get a score of 10000. and with my nvidia GPU only 5000. my nvidia Driver Version: 560.28.03 And when doing things that require powerful GPU rendering the nvidia GPU is also very slow. I use this command to use specifically the nvidia card in an application: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia I use MX linux AHS, and you will have all system and hardware info below, if you need anything else just ask.

  Kernel: 6.9.12-2-liquorix-amd64 [6.9-12~mx23ahs] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 parameters: audit=0
    intel_pstate=disable BOOT_IMAGE=/boot/vmlinuz-6.9.12-2-liquorix-amd64 root=UUID=<filter> ro
    quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm v: 4.18.0 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23.3_ahs_x64 Libretto May 19  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Laptop System: LENOVO product: 21FECTO1WW v: ThinkPad P16v Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 21FECTO1WW v: SDK0T76461 WIN serial: <superuser required> UEFI: LENOVO
    v: N3VET52W (1.52 ) date: 05/09/2024
Battery:
  ID-1: BAT0 charge: 82.4 Wh (97.2%) condition: 84.8/90.1 Wh (94.2%) volts: 17.1 min: 15.5
    model: SMP 5B11H56373 type: Li-poly serial: <filter> status: discharging cycles: 186
CPU:
  Info: model: AMD Ryzen 7 PRO 7840HS w/ Radeon 780M Graphics bits: 64 type: MT MCP arch: Zen 4
    gen: 5 level: v4 note: check built: 2022+ process: TSMC n5 (5nm) family: 0x19 (25)
    model-id: 0x74 (116) stepping: 1 microcode: 0xA704104
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 8 MiB desc: 8x1024 KiB L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 1993 high: 4666 min/max: 400/5137 scaling: driver: amd-pstate-epp
    governor: performance cores: 1: 4664 2: 400 3: 4666 4: 400 5: 4023 6: 400 7: 3731 8: 400 9: 3736
    10: 400 11: 3742 12: 400 13: 3731 14: 400 15: 400 16: 400 bogomips: 121379
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced / Automatic IBRS; IBPB: conditional; STIBP: always-on;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA107GLM [RTX A500 Laptop GPU] vendor: Lenovo driver: nvidia v: 560.28.03
    alternate: nouveau, nvidia_current_drm, nvidia_current non-free: N/A status: unknown device ID
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
    chip-ID: 10de:25bd class-ID: 0302
  Device-2: AMD Phoenix1 vendor: Lenovo Phoenix driver: amdgpu v: kernel arch: RDNA-3
    code: Phoenix process: TSMC n4 (4nm) built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
    active: eDP-1 empty: DP-1, DP-2, DP-3, DP-4, DP-5, DP-6, HDMI-A-1, Writeback-1 bus-ID: c5:00.0
    chip-ID: 1002:15bf class-ID: 0300 temp: 42.0 C
  Device-3: Luxvisions Innotech Integrated Camera type: USB driver: uvcvideo bus-ID: 3-1:2
    chip-ID: 30c9:00ad class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.18.0 driver: X:
    loaded: amdgpu,nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: nv dri: radeonsi
    gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x318mm (20.00x12.52") s-diag: 599mm (23.6")
  Monitor-1: eDP-1 mapped: eDP model: BOE Display 0x0b22 built: 2022 res: 1920x1200 hz: 60
    dpi: 142 gamma: 1.2 size: 344x215mm (13.54x8.46") diag: 406mm (16") ratio: 16:10 modes:
    max: 3840x2400 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: AMD Radeon Graphics (gfx1103_r1 LLVM 15.0.6
    DRM 3.57 6.9.12-2-liquorix-amd64) direct-render: Yes
Audio:
  Device-1: AMD Rembrandt Radeon High Definition Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: c5:00.1 chip-ID: 1002:1640 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: snd_pci_ps v: kernel
    alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci,
    snd_rpl_pci_acp6x, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh,
    snd_sof_amd_acp63 pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: c5:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 16 bus-ID: c5:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.9.12-2-liquorix-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Qualcomm QCNFA765 Wireless Network Adapter vendor: Lenovo driver: ath11k_pci v: kernel
    modules: wl pcie: gen: 2 speed: 5 GT/s lanes: 1 link-max: gen: 3 speed: 8 GT/s bus-ID: 02:00.0
    chip-ID: 17cb:1103 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
Bluetooth:
  Device-1: USI type: USB driver: btusb v: 0.8 bus-ID: 1-3:3 chip-ID: 10ab:9309 class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter>
  Info: acl-mtu: 1024:7 sco-mtu: 240:8 link-policy: rswitch hold sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 476.94 GiB used: 75.79 GiB (15.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVL4512HBLU-00BLL size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: CL2QHXC7 temp: 35.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.69 GiB size: 468.13 GiB (98.21%) used: 75.79 GiB (16.2%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 5 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
Sensors:
  System Temperatures: cpu: 41.0 C mobo: N/A gpu: amdgpu temp: 41.0 C
  Fan Speeds (RPM): fan-1: 2383 fan-2: 2088
Repos:
  Packages: pm: dpkg pkgs: 3132 libs: 1606 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mono-official-stable.list
    1: deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://ftp.lip6.fr/pub/linux/distributions/mxlinux/packages/mx/repo/ bookworm main non-free
    2: deb http://ftp.lip6.fr/pub/linux/distributions/mxlinux/packages/mx/repo/ bookworm ahs
Info:
  Processes: 426 Uptime: 2h 11m wakeups: 17473 Memory: 30 GiB used: 4.22 GiB (14.1%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI[/CODE]```