Lenovo Legion 5 Laptop - nvidia VRAM Bug?

Guten Morgen.
Ersmal vorab, ich bin leider ein sehr sehr unerfahrener Linux User und habe meine ersten sehr groben Erfahrungen nur mit dem Steam Deck gemacht und jetzt erst seit wenigen Wochen auf meinem Laptop.

Mein Problem ist wol nicht unbekannt, aber troz tagelangem recherchieren und herumprobieren bekomm ich das Problem nicht in den Griff, und selbst der kürzlich erschienene Treiber 560.31.02 brachte keine abhilfe.

Wie im Topic zu lesen, habe ich einen Lenovo Laptop 82JU (Legion 5 15ACH6H).
Verbaut ist ein Ryzen 5 5600H und eine dedizierte RTX 3060 Mobile mit 6GB VRAM . Die iGPU habe ich im Bios deaktiviert da ich sie nicht brauche.

Das Problem scheint wol an der VRAM speichernutzung zu liegen, denn sobald ein Spiel (.z.B Icarus oder ECO) an die 6GB grenze kommt, bricht die performance brutal ein, von ~79fps bei ECO auf unter 8 FPS. Unter Windows, gleiche Szene, +60FPS bleiben auch bei erreichen des vollen VRAM.

Da sowol mein Englisch leider sehr schwach ist, als auch meine nutzungskentnisse mit konsolenbefehlen etc sehr gering sind, bin ich bisher auf kein grünen Zweig gelangt.

Einzige was ich erreichen konnte, aber leider kein stück brachte, war das einfügen in Grub “GRUB_CMDLINE_LINUX_DEFAULT=‘quiet loglevel=3 nvidia_drm.modeset=1 nvidia_drm.fbdev=1’”
und dieses dann mit “sudo update-grub” finalisieren.

Es gibt noch mehrere sachen bezüglich “mkinitcpio”, diversen *.conf dateien und “Optimus” aber da versteh ich nur Bahnhof.

Wenn mir da Jemand helfen könnte wäre das wirklich super, da ich mich , ohne ein neues system kaufen zu müssen, gerne komplett auf Linux umgewöhnen möchte, bzw kein Windows mehr mit meinem oder zukünftigen Systemen verwenden mag.

Hier noch die daten aus dem Infozentrum:

Betriebssystem: Garuda Linux
KDE-Plasma-Version: 6.1.3
KDE-Frameworks-Version: 6.4.0
Qt-Version: 6.7.2
Kernel-Version: 6.10.3-zen1-2-zen (64-bit)
Grafik-Plattform: X11
Prozessoren: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Speicher: 62,7 GiB Arbeitsspeicher
Grafikprozessor: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2
Hersteller: LENOVO
Produktname: 82JU
Systemversion: Legion 5 15ACH6H

Leider muss ich auch anmerken das ich nicht sehr häufig hier reinschauen kann da ich sehr viel unterwegs bin, aber so ab frühen vormittag sollte ich heute ein paar stunden daheim sein, andernfalls ab nächste woche montag ein par tage.
Notfalls würde ich sogar einen Profi von euch per fernadministration bzw displayspiegellung zugriff erteilen falls ich selbst an den Feinheiten scheitern sollte, sofern sich das Problem überhaupt in meiner Konstellation lösbar ist.

Schonmal lieben dank an euch!

Please first post the output of garuda-inxi

  • Are you certain you are on the latest BIOS update?
  • How have you been launching the applications in question?
  • What is the output of nvidia-smi, especially as the limit is reached?
  • What other configuration files have you altered?
1 Like

All BIOS are up to date, System and GPU.
I start the games over Steam and with Proton Experimental and Proton GE 9-11
No configs are altered
and here is the output of nvidia-smi , dont know how to past it as txt file or so, just copy paste:

Wed Aug  7 08:29:33 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 560.31.02              Driver Version: 560.31.02      CUDA Version: 12.6     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 3060 ...    Off |   00000000:01:00.0  On |                  N/A |
| N/A   52C    P0             60W /   80W |    5595MiB /   6144MiB |    100%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      2471      G   /usr/lib/Xorg                                 270MiB |
|    0   N/A  N/A      3251      G   /usr/bin/kwalletd6                              2MiB |
|    0   N/A  N/A      3456      G   /usr/bin/ksmserver                              2MiB |
|    0   N/A  N/A      3458      G   /usr/bin/kded6                                  2MiB |
|    0   N/A  N/A      3459      G   /usr/bin/kwin_x11                             103MiB |
|    0   N/A  N/A      3599      G   /usr/bin/plasmashell                           82MiB |
|    0   N/A  N/A      3713      G   /usr/lib/kactivitymanagerd                      2MiB |
|    0   N/A  N/A      3718      G   ...b/polkit-kde-authentication-agent-1          2MiB |
|    0   N/A  N/A      3719      G   /usr/lib/org_kde_powerdevil                     2MiB |
|    0   N/A  N/A      3720      G   /usr/lib/xdg-desktop-portal-kde                 2MiB |
|    0   N/A  N/A      3836      G   kdeconnectd                                     2MiB |
|    0   N/A  N/A      3878      G   /usr/bin/garuda-system-maintenance              2MiB |
|    0   N/A  N/A      3909      G   /usr/bin/kaccess                                2MiB |
|    0   N/A  N/A    111612      G   /usr/lib/baloorunner                            2MiB |
|    0   N/A  N/A    293913      G   /usr/lib/firedragon/firedragon                114MiB |
|    0   N/A  N/A    294060      G   ...bin/plasma-browser-integration-host          2MiB |
|    0   N/A  N/A    295889      G   /usr/bin/konsole                                2MiB |
|    0   N/A  N/A    298313      G   ./steamwebhelper                                3MiB |
|    0   N/A  N/A    307312    C+G   ...ibrary\steamapps\common\Eco\Eco.exe       4759MiB |
+-----------------------------------------------------------------------------------------+

at this point i have 5FPS in the game

i notice that you have version 560.31.02 CUDA, of the NVIDIA drivers. Have you tried other versions, or do you need this one for your laptop?

One way to check between drivers is installing nvidia-all drivers. This fixed all my issues with my RTX 4080.

#Here are the commands installing the nvidia-all drivers.
git clone https://github.com/Frogging-Family/nvidia-all.git
cd nvidia-all
makepkg -si
#select either open source or proprietary drivers, and the version you want to try.
sudo dracut-rebuild
sudo grub-mkconfig -o /boot/grub/grub.cfg

Thank you very much for the help, i try it at the moment and will see if it works.

The driver i have tested so far are 525.x 550.x 555.x and the 560.x and installed it over the (bauh) GUI , the 525 driver was the only one which “only” drops to around 20fps instead of under 8fps in this case when the vram limit was reached, but also the same problem. Driver versions 550.x and higher always insanely drops under 8fps in this case.
My Sensor details of “total video memory” say i have 14GB of VRAM, so 8GB of it must be virtual VRAM, but my senso never shows more than 6GB VRAM usage.

Sorry, i have forgotten to post the garuda-inxi lines. here they are:

System:
Kernel: 6.10.3-zen1-2-zen arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
clocksource: hpet avail: acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=a2ee1189-b4b2-4eed-a094-38e5c4171aa9 rw rootflags=subvol=@
quiet loglevel=3 nvidia_drm.modeset=1 nvidia_drm.fbdev=1 ibt=off
Desktop: KDE Plasma v: 6.1.3 tk: Qt v: N/A info: frameworks v: 6.4.0
wm: kwin_x11 vt: 2 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 82JU v: Legion 5 15ACH6H
serial: <superuser required> Chassis: type: 10 v: Legion 5 15ACH6H
serial: <superuser required>
Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
part-nu: LENOVO_MT_82JU_BU_idea_FM_Legion 5 15ACH6H
uuid: <superuser required> UEFI: LENOVO v: GKCN65WW date: 01/16/2024
Battery:
ID-1: BAT0 charge: 46.0 Wh (56.0%) condition: 82.1/80.0 Wh (102.6%)
volts: 15.7 min: 15.4 model: Celxpert L20C4PC1 type: Li-poly
serial: <filter> status: not charging cycles: 9
CPU:
Info: model: AMD Ryzen 5 5600H with Radeon Graphics bits: 64 type: MT MCP
arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
microcode: 0xA50000F
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
L3: 16 MiB desc: 1x16 MiB
Speed (MHz): avg: 1475 high: 2396 min/max: 400/4280 scaling:
driver: amd-pstate-epp governor: powersave cores: 1: 2394 2: 400 3: 2395
4: 2231 5: 1914 6: 400 7: 2395 8: 2396 9: 1986 10: 400 11: 400 12: 400
bogomips: 79052
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities: <filter>
Graphics:
Device-1: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
driver: nvidia v: 560.31.02 alternate: nouveau,nvidia_drm non-free: 550.xx+
status: current (as of 2024-06; EOL~2026-12-xx) arch: Ampere code: GAxxx
process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 3 speed: 8 GT/s
lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 ports: active: none
off: HDMI-A-1,eDP-1 empty: DP-1,DP-2 bus-ID: 01:00.0 chip-ID: 10de:2560
class-ID: 0300
Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.1
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x1080 s-dpi: 143 s-size: 682x191mm (26.85x7.52")
s-diag: 708mm (27.88")
Monitor-1: not-matched mapped: DP-4 pos: left res: 1920x1080 hz: 120
dpi: 142 size: 344x193mm (13.54x7.6") diag: 394mm (15.53") modes: N/A
Monitor-2: not-matched mapped: HDMI-0 pos: primary,right res: 1920x1080
dpi: 82 size: 597x336mm (23.5x13.23") diag: 685mm (26.97") modes: N/A
API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
inactive: wayland,device-1
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 560.31.02
glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3060 Laptop
GPU/PCIe/SSE2 memory: 5.86 GiB
API: Vulkan v: 1.3.279 layers: 12 device: 0 type: discrete-gpu name: NVIDIA
GeForce RTX 3060 Laptop GPU driver: nvidia v: 560.31.02
device-ID: 10de:2560 surfaces: xcb,xlib
Audio:
Device-1: NVIDIA GA106 High Definition Audio driver: snd_hda_intel v: kernel
pcie: gen: 3 speed: 8 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s
lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228e class-ID: 0403
Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo driver: N/A
alternate: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x,
snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir,
snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63 pcie: gen: 3
speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 06: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: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
speed: 16 GT/s bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
Device-4: Dell PROFESSIONAL SOUND BAR AE515
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 1-1.2:5 chip-ID: 413c:a506 class-ID: 0300
API: ALSA v: k6.10.3-zen1-2-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 1.2.2 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: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: 2000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Realtek RTL8852AE 802.11ax PCIe Wireless Network Adapter
vendor: Lenovo driver: rtw89_8852ae v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: 1000 bus-ID: 04:00.0 chip-ID: 10ec:8852 class-ID: 0280
IF: wlp4s0 state: down mac: <filter>
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-4:2 chip-ID: 0bda:4852
class-ID: e001 serial: <filter>
Report: btmgmt ID: hci0 rfk-id: 2 state: up address: <filter> bt-v: 5.2
lmp-v: 11 status: discoverable: no pairing: no class-ID: 6c010c
Drives:
Local Storage: total: 1.38 TiB used: 857.28 GiB (60.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN530
SDBPMPZ-512G-1101 size: 476.94 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 21160001 temp: 49.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:6 vendor: Western Digital
model: WDS100T3X0C-00SJG0 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: 111130WD temp: 49.9 C scheme: GPT
Partition:
ID-1: / raw-size: 256.01 GiB size: 256.01 GiB (100.00%)
used: 105.7 GiB (41.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
used: 44.1 MiB (45.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 256.01 GiB size: 256.01 GiB (100.00%)
used: 105.7 GiB (41.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
ID-4: /var/log raw-size: 256.01 GiB size: 256.01 GiB (100.00%)
used: 105.7 GiB (41.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
ID-5: /var/tmp raw-size: 256.01 GiB size: 256.01 GiB (100.00%)
used: 105.7 GiB (41.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 62.65 GiB used: 78.8 MiB (0.1%)
priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 12
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 58.6 C mobo: N/A gpu: nvidia temp: 44 C
Fan Speeds (rpm): N/A
Info:
Memory: total: 64 GiB note: est. available: 62.65 GiB used: 4.71 GiB (7.5%)
Processes: 359 Power: uptime: 14m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 25.03 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
tool: systemctl
Packages: pm: pacman pkgs: 1929 libs: 549 tools: octopi,pamac,paru
Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: garuda-inxi default: fish
v: 3.7.1 running-in: konsole inxi: 3.3.35
Garuda (2.6.26-1):
System install date:     2024-08-06
Last full system update: 2024-08-07
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:

@ Jeshu
I have installed the 560 driver with your lines, but also no effect, drops to worse FPS.
And when i choose a version, it ask for:
1.dkms (recommended)
2.regular

i took the dkms, cause of the recommended, but then it shows:
WARNUNG: IT ONLY OFFERS SUPPORT FOR TURING AND NEWER, AND DOESN’T OFFER ALL THE FEATURES OF THE PROPRIETARY ONE.
==> WARNUNG: SLI, G-Sync on notebooks and virtual GPU support are notably missing.
Do you want to use it instead of the proprietary one?

N/y :

i choose Yes. maybe it is wrong for me?

Ah one thing, i choose X11 instead of Wayland, cause with wayland my whole steam client and desktop crashes after few minutes when my VRAM is full

Please, edit your post.

  • Format terminal output (including your garuda-inxi) as a code block by clicking the preformatted text button (</>) , or put three tildes (~) above and below the text.

Not sure what the trouble could be.

i thinkl you only need dkms if you have more than one kernel, so you could trying without if you are running just one kernel, and see it this makes a difference.

i found this discussion, about problems running this model computer with a 3060 and G-Sync on, that might help you fix this.

https://www.reddit.com/r/Lenovo/comments/kbgprp/legion_5_freesync_a_huge_misunderstanding/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

Nope, this has nothing to do with my problem, but thank you for your research. i have testet in several constelations. only laptop display, only my gaming monitor (which is my only device with freesynch and g-synch) over HDMI and USB-C on 60, 120, 144hz , an only another Monitor without any features, or with my old 3D TV and also my projector. Always the same problem. if the 6GB VRAM reached, the game breakes down to horrible FPS. I also hat testet several other distributions of Linux, as Nobara, EndavoursOS and Pop_OS . always the same problem, only Windows runs without any problems if the 6GB VRAM is full, but i dont want to fall back to windows. Garuda is the most interesting distribution for me so far i have testet, easy to use, nice look, many tools and gaming programs, nearly GUIs for everything, love it! Just this problem, i hope it will be solved (maybe nvidia will find this problem and fix it with an new driver?)
If i had the money, or the possibility to buy a new desktop PC (cause it looks lit it is only a laptop/mobile problem) i would do this, but the fact that I am often out of the house and need a mobile system rules this out.

But thank you very much for the help you have given me so far, I have already been able to learn a few things from you, thank you!

Niemand mehr eine Idee? Ansonsten kann ich wol nur hoffen das nvidia bald einen treiber raus bringt der dieses problem von haus aus behebt.

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