Crashing Issues on Lenovo Legion Pro 7i (16", Gen 9)

Hi EndeavourOS people,

I have purchased a Lenovo Legion Pro 7i laptop and installed EndeavourOS on it.
I’m familiar with having issues with new hardware and Linux. Linux is worth it so I push through the issues typically.

This time is HARD. My laptop is unstable.

Current known issues:

  • It will never shutdown. If I use the Gnome menu to shutdown the laptop, it will always require me to hold the power button down to kill it.
  • Randomly crashes throughout the day up to 5 times or 8 times. The screen locks up and I have to hold the power button down to force a shutdown.
  • Due to the above two issues, I have had to re-install EndeavourOS 5 times in the last few weeks because something gets corrupted and the system boots to a white screen of death.

This is my work device and it is impacting my ability to function.

I can’t do pacman updates from the desktop. I have to reboot to terminal (user mode 3) to do updates because the system often hangs causing a forced reboot and reinstall.

I complained to Lenovo through x.com and to my surprise, the contacted me but couldn’t help because Linux is not supported on the device.

I highly suspect the cause of the issue is the Hybrid graphics. I initially installed optimus-manager with a custom GDM, then tried optimus-switch, now I’m just doing a “nvindia-inst” and leaving it at that.

I never ran Windows on this device so I am hoping the instabilities are related to Linux and hardware support and not faulty hardware.

I don’t really expect too much from posting this, but you never know and it might help someone else.

Running inxi -Fxxzc0 give this:

System:
  Kernel: 6.9.10-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.1.1
  Desktop: GNOME v: 46.3.1 tk: GTK v: 3.24.43 wm: gnome-shell dm: GDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 83DE v: Legion Pro 7 16IRX9H
    serial: <filter> Chassis: type: 10 v: Legion Pro 7 16IRX9H serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76461 WIN serial: <filter>
    part-nu: LENOVO_MT_83DE_BU_idea_FM_Legion Pro 7 16IRX9H UEFI: LENOVO
    v: N2CN21WW date: 03/15/2024
Battery:
  ID-1: BAT0 charge: 99.9 Wh (100.0%) condition: 99.9/99.9 Wh (100.0%)
    volts: 17.3 min: 15.5 model: SMP L22M4PC1 serial: <filter> status: full
CPU:
  Info: 24-core (8-mt/16-st) model: Intel Core i9-14900HX bits: 64
    type: MST AMCP arch: Raptor Lake rev: 1 cache: L1: 2.1 MiB L2: 32 MiB
    L3: 36 MiB
  Speed (MHz): avg: 879 high: 1108 min/max: 800/5600:5800:4100 cores: 1: 932
    2: 1067 3: 1019 4: 800 5: 971 6: 800 7: 986 8: 800 9: 871 10: 800 11: 800
    12: 800 13: 916 14: 800 15: 800 16: 800 17: 1108 18: 800 19: 1074 20: 1046
    21: 800 22: 800 23: 800 24: 800 25: 800 26: 800 27: 800 28: 800 29: 1078
    30: 800 31: 800 32: 1078 bogomips: 154880
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Raptor Lake-S UHD Graphics vendor: Lenovo driver: i915
    v: kernel arch: Gen-13 ports: active: eDP-2 empty: none bus-ID: 00:02.0
    chip-ID: 8086:a788
  Device-2: NVIDIA AD104M [GeForce RTX 4080 Max-Q / Mobile] vendor: Lenovo
    driver: nvidia v: 555.58.02 arch: Lovelace pcie: speed: 2.5 GT/s lanes: 16
    ports: active: none off: DP-1,DP-5 empty: DP-2, DP-3, DP-4, HDMI-A-1,
    eDP-1 bus-ID: 01:00.0 chip-ID: 10de:27e0
  Device-3: Luxvisions Innotech Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-11:3 chip-ID: 30c9:00ac
  Device-4: Logitech C922 Pro Stream Webcam driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-1.4.4:9
    chip-ID: 046d:085c
  Display: unspecified server: X.Org v: 21.1.13 with: Xwayland v: 24.1.1
    compositor: gnome-shell driver: X: loaded: modesetting,nvidia
    alternate: fbdev,intel,nouveau,nv,vesa dri: iris
    gpu: i915,nvidia,nvidia-nvswitch display-ID: :1 screens: 1
  Screen-1: 0 s-res: 7040x2025 s-dpi: 96
  Monitor-1: not-matched mapped: DP-1-2 pos: middle-r res: 1920x1080 dpi: 93
    diag: 604mm (23.8")
  Monitor-2: not-matched mapped: DP-1-3.2.1 pos: primary,top-center
    res: 2560x1440 dpi: 109 diag: 685mm (26.97")
  Monitor-3: eDP-2 pos: bottom-l model: BOE Display 0x0c8b res: 2560x1600
    dpi: 188 diag: 407mm (16")
  API: EGL v: 1.5 platforms: device: 0 drv: nvidia device: 2 drv: iris
    device: 3 drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11:
    drv: iris inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.1.4-arch1.2
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel Graphics (RPL-S)
    device-ID: 8086:a788
Audio:
  Device-1: Intel Raptor Lake High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:7a50
  Device-2: NVIDIA AD104 High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:22bc
  Device-3: Realtek USB Audio driver: hid-generic,snd-usb-audio,usbhid
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-1.3.4:8
    chip-ID: 0bda:493b
  Device-4: Logitech C922 Pro Stream Webcam driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 3-1.4.4:9
    chip-ID: 046d:085c
  API: ALSA v: k6.9.10-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.2.1 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
Network:
  Device-1: Intel Raptor Lake-S PCH CNVi WiFi vendor: Rivet Networks
    driver: iwlwifi v: kernel bus-ID: 00:14.3 chip-ID: 8086:7a70
  IF: wlan0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 4000 bus-ID: 76:00.0 chip-ID: 10ec:8168
  IF: enp118s0 state: down mac: <filter>
  Device-3: Realtek RTL8153 Gigabit Ethernet Adapter driver: r8152 type: USB
    rev: 3.0 speed: 5 Gb/s lanes: 1 bus-ID: 4-1.3.3:6 chip-ID: 0bda:8153
  IF: enp12s0u1u3u3 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel AX211 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-14:4 chip-ID: 8087:0033
  Report: btmgmt ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.3 lmp-v: 12
Drives:
  Local Storage: total: 2.75 TiB used: 812.68 GiB (28.9%)
  ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS001TEJ9X115N
    size: 953.87 GiB speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 49.9 C
  ID-2: /dev/nvme1n1 vendor: Kingston model: SNV2S2000G size: 1.82 TiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 50.9 C
Partition:
  ID-1: / size: 936.83 GiB used: 22.44 GiB (2.4%) fs: ext4 dev: /dev/nvme0n1p2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 48.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 32 GiB available: 31.07 GiB used: 17.04 GiB (54.9%)
    igpu: 60 MiB
  Processes: 561 Power: uptime: 7h 2m wakeups: 1 Init: systemd v: 256
    default: graphical
  Packages: 1149 pm: pacman pkgs: 1142 pm: flatpak pkgs: 7 Compilers:
    gcc: 14.1.1 Shell: Sudo v: 1.9.15p5 running-in: gnome-terminal inxi: 3.3.35

Oh, I should mention that I used this page to help initially:
https://wiki.archlinux.org/title/Lenovo_Legion_7i

I am not an Nvidia user so I cannot be of much help to you. However I do notice an “anomaly” in the output of inxi you have posted.

This shows on my end:

Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1

Perhaps your combo Wayland plus Nvidia would need some tweaks.

Please stand by for other users experienced with Nvidia to chime in.

In the meantime, for the sake of testing, you could perhaps try an X session to see if you still experience some of the issues you mentioned above.

Switch to hybrid mode from the UEFI and try running on the iGPU. Install the open branch drivers via nvidia-inst -o and install the lenovolegionlinux-dkms-git package. These fixed all my problems on my Legion Slim 7i Gen 8. And also, use supergfxctl instead of optimus-manager since it’s just a lot more stable on Legion devices at least in my experience.

I have an older model 5/amd/rtx3070/plasma and am finding the mainline kernel buggy, but the lts is a lot better. The 550 drivers were better for me… This is a new install on 555 drivers, I may yet downgrade.

Interesting, will try this later. How do you run steam games using this?

I don’t game on linux but PRIME should help with gaming on Hybrid mode. If you switch to your dGPU via your laptop’s MUX switch then use an X11 session and don’t worry about it.

thinkbook 16p gen4 owner here, also had the same problems with random hanging at reboot/shutdown, when running pacman, and at random times every few hours. Switched to nvidia-open-dkms and have been stable ever since - i did run into problems with nvidia-inst -o flatly ignoring my request to use the open driver and installing nvidia-dkms anyway so had to put it on separately

one thing to be aware of, as i understand it the “open” drivers are missing support for CUDA which may or may not be a problem for your use case

Thanks for the replies.
I have installed the lenovolegionlinux-dkms-git package and I feel it is a little more stable. I tried the nvidia-inst -o and it installed, but my favourite game “Beyond All Reason (BAR)” reported issues and hung once. I’ve switched back to the nvidia driver for now.

I didn’t know about the lenovolegionlinux packages so thanks @lg28litermicrowave for sharing.

For anyone reading, I installed nvidia-prime to use “prime-run” to launch BAR, but found I didn’t need it. BAR reports if you are using an integrated video card and simply running the game worked on the Nvidia card. This was using the supergfxctl package that @lg28litermicrowave suggested.

My laptop now shuts down without needing a forced power off, so that’s a good start. I’ll need a few days of use to see how stable it is.

Thanks again everyone. Great information.

PS: I’ve started recording the details alongside my EndeavourOS notes. Early days though.

1 Like

As to the driver situation, from version 560 onwards everything should become open source, so there won’t be a separate nvidia-open-dkms package. One can only hope that BAR doesn’t have any issues with that as well.

1 Like

Update:

  • The laptop worked all day yesterday during my work hours, but didn’t shutdown correctly.
  • I switched back over to the open nvidia drivers
  • Did some more research into my application of the LenovoLegionLinux drivers
  • Installed LenovoLegionLinux drivers with the forcemodulereload option which worked
  • Installed the LenovoLegionLimux drivers with make install
  • With the open nvidia drivers, BAR crashed twice :frowning:
  • Added references to my documentation

Maybe the forcemodulereload option is the cause of all this? If you still have windows, could you set your laptop’s GPU power mode to Hybrid and not Hybrid-iGPU or Hybrid-Auto? And try supergfxctl to replace this functionality on Linux.

Update:

  • Switching back to the Nvidia Open drivers improved stability for business use. My laptop doesn’t crash at all now.
  • BAR locks the screen when joining a game. Interestingly, CTRL+ALT+F1 takes me back to the Gnome login screen, I login, and BAR is fixed and I’m in the game. So workable but…
  • I just did updates and have to make install on the LenovoLegionLinux package. The dmesg output didn’t show the legion_laptop module loading so I ran a make forcereloadmodule.

Thanks for the reply @lg28litermicrowave. Windows didn’t boot once and I wiped that virus of my SSD with the EndeavourOS install. I’ve got the supergfxctl installed. I’m hoping the stability continues. The GPU is in Hybrid mode I believe.

To make sure that it’s on normal Hybrid mode you could always switch to dGPU then back to Hybrid with LenovoLegionLinux’s GUI (sudo legion_gui --use_legion_cli_to_write). As for the forcereloadmodule thing, if it works then great. I can’t help you with BAR since I don’t game on Linux, but hopefully the NVIDIA situation improves from 560 onwards and we get completely open source NVIDIA drivers (that’s not nouveau).

I tried that command to switch to Hybrid but got this:

INFO:legion_linux.legion:update_view_from_feature: 0
INFO:legion_linux.legion:Feature BatteryConservation reading
INFO:legion_linux.legion:Feature BatteryConservation reading: 1
INFO:legion_linux.legion:Feature FnLockFeature reading
INFO:legion_linux.legion:Feature FnLockFeature reading: 0
INFO:legion_linux.legion:Feature AlwaysOnUSBChargingFeature reading
INFO:legion_linux.legion:Feature AlwaysOnUSBChargingFeature reading: 1
INFO:legion_linux.legion:update_view_from_feature in EnumFeatureTrayController 
Error occured cannot access local variable 'values' where it is not associated with a value
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/legion_linux/legion_gui.py", line 397, in update_view_from_feature
    if i< len(values):
              ^^^^^^
UnboundLocalError: cannot access local variable 'values' where it is not associated with a value

INFO:legion_linux.legion:update_view_from_feature in EnumFeatureTrayController 
Error occured cannot access local variable 'values' where it is not associated with a value
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/legion_linux/legion_gui.py", line 397, in update_view_from_feature
    if i< len(values):
              ^^^^^^
UnboundLocalError: cannot access local variable 'values' where it is not associated with a value

INFO:legion_linux.legion:Click on UI Activate element for GsyncFeature
INFO:legion_linux.legion:FileFeature GsyncFeature execute "['pkexec', 'legion_cli', 'set-feature', 'GsyncFeature', '1']"
INFO:legion_linux.legion:FileFeature GsyncFeature executed with code 1: ; Traceback (most recent call last):
  File "/usr/bin/legion_cli", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/legion_linux/legion_cli.py", line 464, in main
    legion = LegionModelFacade(expect_hwmon=not args.donotexpecthwmon)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/legion_linux/legion.py", line 1375, in __init__
    self.fancurve_io = FanCurveIO(expect_hwmon=expect_hwmon)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/legion_linux/legion.py", line 753, in __init__
    raise Exception("hwmon dir not found")
Exception: hwmon dir not found

INFO:legion_linux.legion:Stopping monitoring
INFO:legion_linux.legion:Received close event
INFO:legion_linux.legion:Accept close event and close.
INFO:legion_linux.legion:Stopping monitoring

I don’t have time to debug it now.

I imagine it is because of this:

❯ sudo dmesg | rg legion
[    1.613666] legion_laptop: Loading legion_laptop
[    1.613716] legion PNP0C09:00: legion_laptop platform driver probing
[    1.613718] legion PNP0C09:00: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 83DE; DMI_BIOS_VERSION:N2CN21WW
[    1.613719] legion_laptop: Read identifying information: DMI_SYS_VENDOR: LENOVO; DMI_PRODUCT_NAME: 83DE; DMI_BIOS_VERSION:N2CN21WW
[    1.613722] legion PNP0C09:00: is_denied: 0; is_allowed: 0; do_load_by_list: 0; do_load: 0
[    1.613723] legion PNP0C09:00: Module not usable for this laptop because it is not in allowlist. Notify the maintainer if you want to add your device or force load with param force.
[    1.613724] legion PNP0C09:00: legion_laptop not loaded for this device
[    1.614394] legion PNP0C09:00: probe with driver legion failed with error -12

As for BAR, it is rather unstable still. I’ve gotten to the point of booting to terminal, installing nvidia proper, having a game, booting to terminal, installing nvidia open, working. And do you know what? I still love Linux :slight_smile:

I’ll send an x.com post to Lenovo and see if they can send some dev resources to the LenovoLegionLinux repo. They should be helping their community.

Thanks again. My device is useable for work now due to the feedback from here :slight_smile:

Update:

  • It still crashes, not as often now though
  • I think most of the issues are related to my Thunderbolt dock and Hybrid Graphics
  • BAR will not run at all with the dock connected
  • BAR runs fine and allows me to exit and shutdown if just using the laptop screen
  • I boot to runlevel 3 to install updates
  • After updates, I make, make install the LenovoLegionLinux kernal module

New NVIDIA driver release:

Release notes:

  • Fixed a bug that caused widespread crashing with Xwayland games.
  • Fixed a race condition involving modeset ownership which could lead to flip event timeout errors when enabling the ‘fbdev’ kernel module parameter in nvidia-drm.
  • Fixed a regression that caused nvidia-powerd to exit when nvidia-dbus.conf was not present in the /etc/dbus-1/system.d/ directory.
  • Fixed a bug that could cause memory corruption while handling ACPI events on some notebooks.
  • Fixed a bug that could cause external displays to become frozen until the next modeset when using PRIME Display Offloading with the NVIDIA dGPU acting as the display offload sink.

Sounds promising.

Update:

  • Currently on NVIDIA open drivers v560.35.03
  • Updating almost daily
  • Highly unstable right now
  • Usage: Thunderbolt dock with Ethernet/Mouse/Keyboard/2 x external monitors
  • On average 4 x day external monitors freeze. Often when using MS Teams (:poop:)
  • Have to reboot every time
  • When the monitors freeze, desktop is still active and the laptop monitor works
  • I have a terminal open on my laptop display so I can reboot gracefully

Basically, Linux support on this Lenovo Legion device right now makes me recommend not to buy one.

I’ve X posted to Lenovo Legion to get some love over to the https://github.com/johnfanv2/LenovoLegionLinux repo with no response.

If you have an X.com account, please send a message to @LenovoLegion (https://x.com/LenovoLegion):

Hey @LenovoLegion, please send some love to this repo to support your Linux users:
https://github.com/johnfanv2/LenovoLegionLinux

Right now, people are recommending not to get your devices for Linux use:
https://forum.endeavouros.com/t/crashing-issues-on-lenovo-legion-pro-7i-16-gen-9/58375/16

Quote me if you like: @grantcarthew

Hi @grantcarthew

Same pain and issues around here with a Lenovo Yoga Pro7 laptop and NOBARA Linux OS. It also happened when using Zorin OS. So sad.

My setup:

OS: Nobara Linux 40 (GNOME Edition) x86_64
HW: 83AU (Lenovo Yoga Pro 7 14ARP8)
Kernel: Linux 6.11.0-200.fsync.fc40.x86_64
DE: GNOME 46.4
WM: Mutter (Wayland)
CPU: AMD Ryzen 7 7735HS (16) @ 4.83 GHz
GPU 1: NVIDIA GeForce RTX 3050 6GB Laptop GPU [Discrete]
GPU 2: AMD Radeon 680M [Integrated]
Memory: 4.91 GiB / 14.80 GiB (33%)
Swap: 0 B / 16.80 GiB (0%)
NVIDIA Driver Version: 560.35.03

The computer freezes randomly regardless if I’m working, Internet browsing, gaming, etc. There is not a pattern.

And just like you said, I’m still love Linux and Lenovo HW (top notch quality)… but Linux support on this Lenovo device right now makes me recommend not to buy one.

1 Like

Thanks @njaure1980 for the feedback. It’s good to know I’m not alone. Sorry for your troubles though :frowning:

Restarts yesterday while at work: 4
Restarts today (13:30): 2

I’m in the habit now of moving all my windows to the laptop screen when having Teams meetings.