johnfanv2 / LenovoLegionLinux

Driver and tools for controlling Lenovo Legion laptops in Linux including fan control and power mode.
https://github.com/johnfanv2/LenovoLegionLinux
GNU General Public License v2.0
1.52k stars 55 forks source link

Cannot interact with GUI on 16IAH7H gen 7 / 2022 #210

Closed elirael closed 5 months ago

elirael commented 5 months ago

EDIT: solved, I was stupid. Documenting findings and solution below.

  1. DKMS doesn't work on silverblue. I'd need to figure out a workaround to get it to work there, but instead I tried Nix again.
  2. On Nix my kernel module wasn't loading because I was missing lines in configuration.nix that needed to be there, but weren't included in the installation instructions. Including all the necessary bits I needed to get it to work:
  boot.kernelPackages = pkgs.linuxPackages_latest;

  environment.systemPackages = with pkgs; [
    pkgs.lenovo-legion
    pkgs.linuxKernel.packages.linux_latest_libre.lenovo-legion-module
  ];

  boot.extraModulePackages = with config.boot.kernelPackages;
    [ lenovo-legion-module ];

  boot.kernelModules = [ 
    "lenovo-legion-module" 
  ];

Problem Description

Has the bug occurred following steps described in the README?

What steps did you take?

What commands did you enter? find / -type d -name "LenovoLegionLinux" (couldn't find) sudo make reloadmodule (obviously did nothing, but I'd tried anyway) sudo dmesg (there was no line with legion mentioned) sudo cat /sys/kernel/debug/legion/fancurve (no such file or directory) sensors (sensors command not found)

What was the (full) error you received and what command or action did lead to it?

2024-04-26 16:24:09,337 - INFO: 
2024-04-26 16:24:09,337 - INFO: Feature LockFanController with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/lockfancontroller and path None
2024-04-26 16:24:09,337 - WARNING: Feature LockFanController does not exist. exits: 0
2024-04-26 16:24:09,337 - INFO: Feature RapidChargingFeature with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/rapidcharge and path None
2024-04-26 16:24:09,337 - WARNING: Feature RapidChargingFeature does not exist. exits: 0
2024-04-26 16:24:09,337 - INFO: Feature BatteryConservation with pattern /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode and path /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode
2024-04-26 16:24:09,338 - INFO: Feature MaximumFanSpeedFeature with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/fan_fullspeed and path None
2024-04-26 16:24:09,338 - WARNING: Feature MaximumFanSpeedFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature FnLockFeature with pattern /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/fn_lock and path /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/fn_lock
2024-04-26 16:24:09,338 - INFO: Feature WinkeyFeature with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/winkey and path None
2024-04-26 16:24:09,338 - WARNING: Feature WinkeyFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature TouchpadFeature with pattern ['/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/touchpad', '/sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/touchpad'] and path None
2024-04-26 16:24:09,338 - WARNING: Feature TouchpadFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CameraPowerFeature with pattern /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/camera_power and path /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/camera_power
2024-04-26 16:24:09,338 - INFO: Feature OverdriveFeature with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/overdrive and path None
2024-04-26 16:24:09,338 - WARNING: Feature OverdriveFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GsyncFeature with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gsync and path None
2024-04-26 16:24:09,338 - WARNING: Feature GsyncFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature PlatformProfileFeature with pattern /sys/firmware/acpi/platform_profile and path None
2024-04-26 16:24:09,338 - WARNING: Feature PlatformProfileFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature StrFileFeature with pattern /sys/firmware/acpi/platform_profile_choices and path None
2024-04-26 16:24:09,338 - WARNING: Feature StrFileFeature does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature IsOnPowerSupplyFeature with pattern /sys/class/power_supply/ADP0/online and path /sys/class/power_supply/ADP0/online
2024-04-26 16:24:09,338 - INFO: Feature AlwaysOnUSBChargingFeature with pattern /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/usb_charging and path /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/usb_charging
2024-04-26 16:24:09,338 - INFO: Feature BatteryCurrentCapacityPercentage with pattern /sys/class/power_supply/BAT0/capacity and path /sys/class/power_supply/BAT0/capacity
2024-04-26 16:24:09,338 - INFO: Feature CPUOverclock with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_oc and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUOverclock does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPULongtermPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_longterm_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPULongtermPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPUShorttermPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_shortterm_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUShorttermPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPUPeakPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_peak_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUPeakPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPUDefaultPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_default_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUDefaultPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPUCrossLoadingPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_cross_loading_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUCrossLoadingPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature CPUAPUSPPTPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/cpu_apu_sppt_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature CPUAPUSPPTPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GPUOverclock with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gpu_oc and path None
2024-04-26 16:24:09,338 - WARNING: Feature GPUOverclock does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GPUBoostClock with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gpu_boost_clock and path None
2024-04-26 16:24:09,338 - WARNING: Feature GPUBoostClock does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GPUCTGPPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gpu_ctgp_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature GPUCTGPPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GPUPPABPowerLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gpu_ppab_powerlimit and path None
2024-04-26 16:24:09,338 - WARNING: Feature GPUPPABPowerLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature GPUTemperatureLimit with pattern /sys/module/legion_laptop/drivers/platform:legion/PNP0C09:00/gpu_temperature_limit and path None
2024-04-26 16:24:09,338 - WARNING: Feature GPUTemperatureLimit does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature YLogoLight with pattern /sys/class/leds/platform::ylogo/brightness and path None
2024-04-26 16:24:09,338 - WARNING: Feature YLogoLight does not exist. exits: 0
2024-04-26 16:24:09,338 - INFO: Feature IOPortLight with pattern /sys/class/leds/platform::ioport/brightness and path None
2024-04-26 16:24:09,338 - WARNING: Feature IOPortLight does not exist. exits: 0
2024-04-26 16:24:09,339 - INFO: CommandFeature PowerProfilesDeamonService: []
2024-04-26 16:24:09,339 - WARNING: Feature PowerProfilesDeamonService does not exist. exits: 0
2024-04-26 16:24:09,339 - INFO: CommandFeature PowerProfilesDeamonService execute "systemctl status power-profiles-daemon"
2024-04-26 16:24:09,347 - INFO: CommandFeature PowerProfilesDeamonService reading with code 0: ● power-profiles-daemon.service - Power Profiles daemon
     Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Fri 2024-04-26 15:46:36 CEST; 37min ago
   Main PID: 1399 (power-profiles-)
      Tasks: 4 (limit: 38014)
     Memory: 1.5M (peak: 9.8M)
        CPU: 50ms
     CGroup: /system.slice/power-profiles-daemon.service
             └─1399 /usr/libexec/power-profiles-daemon

Apr 26 15:46:36 fedora systemd[1]: Starting power-profiles-daemon.service - Power Profiles daemon...
Apr 26 15:46:36 fedora systemd[1]: Started power-profiles-daemon.service - Power Profiles daemon.

2024-04-26 16:24:09,347 - INFO: CommandFeature LenovoLegionLaptopSupportService: []
2024-04-26 16:24:09,347 - WARNING: Feature LenovoLegionLaptopSupportService does not exist. exits: 0
2024-04-26 16:24:09,347 - INFO: CommandFeature LenovoLegionLaptopSupportService execute "systemctl status legiond.service legiond-onresume.service legiond-cpuset.service legiond-cpuset.timer"
2024-04-26 16:24:09,365 - INFO: CommandFeature LenovoLegionLaptopSupportService reading with code 3: ○ legiond.service - legiond daemon
     Loaded: loaded (/usr/lib/systemd/system/legiond.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)

○ legiond-onresume.service - Start legiond-ctl fanset on resume
     Loaded: loaded (/usr/lib/systemd/system/legiond-onresume.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)

○ legiond-cpuset.service - legiond daemon
     Loaded: loaded (/usr/lib/systemd/system/legiond-cpuset.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: inactive (dead)

○ legiond-cpuset.timer - legiond daemon
     Loaded: bad-setting (Reason: Unit legiond-cpuset.timer has a bad unit file setting.)
     Active: inactive (dead)
    Trigger: n/a
   Triggers: ● legiond-cpuset.service

Apr 26 16:20:35 fedora systemd[1]: /usr/lib/systemd/system/legiond-cpuset.timer:6: Unknown section 'Service'. Ignoring.
Apr 26 16:20:35 fedora systemd[1]: legiond-cpuset.timer: Timer unit lacks value setting. Refusing.
Apr 26 16:22:12 fedora systemd[1]: /usr/lib/systemd/system/legiond-cpuset.timer:6: Unknown section 'Service'. Ignoring.
Apr 26 16:22:12 fedora systemd[1]: legiond-cpuset.timer: Timer unit lacks value setting. Refusing.
Apr 26 16:22:12 fedora systemd[1]: /usr/lib/systemd/system/legiond-cpuset.timer:6: Unknown section 'Service'. Ignoring.
Apr 26 16:22:12 fedora systemd[1]: legiond-cpuset.timer: Timer unit lacks value setting. Refusing.
Apr 26 16:22:12 fedora systemd[1]: /usr/lib/systemd/system/legiond-cpuset.timer:6: Unknown section 'Service'. Ignoring.
Apr 26 16:22:12 fedora systemd[1]: legiond-cpuset.timer: Timer unit lacks value setting. Refusing.
Apr 26 16:24:09 fedora systemd[1]: /usr/lib/systemd/system/legiond-cpuset.timer:6: Unknown section 'Service'. Ignoring.
Apr 26 16:24:09 fedora systemd[1]: legiond-cpuset.timer: Timer unit lacks value setting. Refusing.

2024-04-26 16:24:09,365 - INFO: Feature LegionGUIAutostart with pattern /var/home/username/.config and path /var/home/username/.config
2024-04-26 16:24:09,365 - WARNING: Feature LegionGUIAutostart does not exist. exits: 0
2024-04-26 16:24:09,365 - INFO: Feature NVIDIAGPUIsRunning with pattern /sys/bus/pci/devices/0000:01:00.0/power/runtime_status and path /sys/bus/pci/devices/0000:01:00.0/power/runtime_status
2024-04-26 16:24:09,365 - INFO: Setting feature automatic_close to 0
2024-04-26 16:24:09,365 - INFO: Notifying subscribers of change
2024-04-26 16:24:09,365 - INFO: Setting feature close_to_tray to 0
2024-04-26 16:24:09,365 - INFO: Notifying subscribers of change
2024-04-26 16:24:09,365 - INFO: Setting feature open_closed_to_tray to 0
2024-04-26 16:24:09,365 - INFO: Notifying subscribers of change
2024-04-26 16:24:09,365 - INFO: Setting feature enable_gui_monitoring to 0
2024-04-26 16:24:09,365 - INFO: Notifying subscribers of change
2024-04-26 16:24:09,365 - INFO: Setting feature icon_color_mode to always-color
2024-04-26 16:24:09,365 - INFO: Notifying subscribers of change
2024-04-26 16:24:09,365 - INFO: Settings file does not exist.
2024-04-26 16:24:09,365 - INFO: Using icon_color color
2024-04-26 16:24:09,365 - INFO: Using icon legion_logo
2024-04-26 16:24:09,392 - INFO: update_view_from_feature: 0
2024-04-26 16:24:09,394 - INFO: Feature FnLockFeature reading
2024-04-26 16:24:09,394 - INFO: Feature FnLockFeature reading: 0
2024-04-26 16:24:09,394 - INFO: Feature CameraPowerFeature reading
2024-04-26 16:24:09,396 - INFO: Feature CameraPowerFeature reading: 0
2024-04-26 16:24:09,396 - INFO: Feature BatteryConservation reading
2024-04-26 16:24:09,396 - INFO: Feature BatteryConservation reading: 0
2024-04-26 16:24:09,396 - INFO: Feature AlwaysOnUSBChargingFeature reading
2024-04-26 16:24:09,397 - INFO: Feature AlwaysOnUSBChargingFeature reading: 1
2024-04-26 16:24:09,397 - INFO: update_view_from_feature: 0
2024-04-26 16:24:09,397 - INFO: CommandFeature PowerProfilesDeamonService execute "systemctl is-active power-profiles-daemon"
2024-04-26 16:24:09,402 - INFO: CommandFeature PowerProfilesDeamonService reading with code 0: active

2024-04-26 16:24:09,402 - INFO: CommandFeature LenovoLegionLaptopSupportService execute "systemctl is-active legiond.service legiond-onresume.service legiond-cpuset.service legiond-cpuset.timer"
2024-04-26 16:24:09,414 - INFO: CommandFeature LenovoLegionLaptopSupportService reading with code 3: inactive
inactive
inactive
inactive

2024-04-26 16:24:09,414 - INFO: update_view_from_feature: 0
2024-04-26 16:24:09,415 - INFO: Feature BatteryConservation reading
2024-04-26 16:24:09,415 - INFO: Feature BatteryConservation reading: 0
2024-04-26 16:24:09,416 - INFO: Feature FnLockFeature reading
2024-04-26 16:24:09,416 - INFO: Feature FnLockFeature reading: 0
2024-04-26 16:24:09,416 - INFO: Feature AlwaysOnUSBChargingFeature reading
2024-04-26 16:24:09,416 - INFO: Feature AlwaysOnUSBChargingFeature reading: 1
2024-04-26 16:24:09,416 - INFO: update_view_from_feature in EnumFeatureTrayController 
2024-04-26 16:24:09,416 - INFO: update_view_from_feature in EnumFeatureTrayController 

Model and Debug Info

Distribution: Fedora Silverblue 40 (and Nix os 23.11) Model name: Legion 5i Pro 2022 gen 7 16IAH7H CPU model: Intel i7 12700H GPU model: Nvidia 3070 Ti (140W) Keyboard backlight: RGB Light in lid or logo: no Light at IO-Ports at back: small LED indicator for power cord

Output of sudo dmidecode -t system. Please remove Serial Number and UUID for privacy:

dmidecode 3.5

Getting SMBIOS data from sysfs. SMBIOS 3.3 present.

Handle 0x0001, DMI type 1, 27 bytes System Information Manufacturer: LENOVO Product Name: 82RF Version: Legion 5 Pro 16IAH7H Serial Number: XXXX UUID: XXXX Wake-up Type: Power Switch SKU Number: LENOVO_MT_82RF_BU_idea_FM_Legion 5 Pro 16IAH7H Family: Legion 5 Pro 16IAH7H

Handle 0x0024, DMI type 12, 5 bytes System Configuration Options Option 1: ConfigOptions1 Option 2: ConfigOptions2 Option 3: ConfigOptions3

Handle 0x0027, DMI type 15, 29 bytes System Event Log Area Length: 0 bytes Header Start Offset: 0x0000 Header Length: 8192 bytes Data Start Offset: 0x2000 Access Method: General-purpose non-volatile data functions Access Address: 0x0000 Status: Valid, Not Full Change Token: 0x12345678 Header Format: OEM-specific Supported Log Type Descriptors: 3 Descriptor 1: POST memory resize Data Format 1: None Descriptor 2: POST error Data Format 2: POST results bitmap Descriptor 3: Log area reset/cleared Data Format 3: None

Handle 0x0034, DMI type 32, 11 bytes System Boot Information Status: No errors detected

Output of sudo dmidecode -t bios:

dmidecode 3.5

Getting SMBIOS data from sysfs. SMBIOS 3.3 present.

Handle 0x0000, DMI type 0, 26 bytes BIOS Information Vendor: LENOVO Version: J2CN56WW Release Date: 09/18/2023 Address: 0xE0000 Runtime Size: 128 kB ROM Size: 16 MB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported Japanese floppy for NEC 9800 1.2 MB is supported (int 13h) Japanese floppy for Toshiba 1.2 MB is supported (int 13h) 5.25"/360 kB floppy services are supported (int 13h) 5.25"/1.2 MB floppy services are supported (int 13h) 4.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) 8042 keyboard services are supported (int 9h) CGA/mono video services are supported (int 10h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 1.56 Firmware Revision: 1.56

Handle 0x0025, DMI type 13, 22 bytes BIOS Language Information Language Description Format: Long Installable Languages: 8 en|US|iso8859-1,0 fr|FR|iso8859-1,0 zh|TW|unicode,0 ja|JP|unicode,0 it|IT|iso8859-1,0 es|ES|iso8859-1,0 de|DE|iso8859-1,0 pt|PT|iso8859-1,0 Currently Installed Language: en|US|iso8859-1,0

Output of sudo cat /sys/kernel/debug/legion/fancurve: cat: /sys/kernel/debug/legion/fancurve: No such file or directory