joshuagrisham / samsung-galaxybook-extras

Samsung Galaxybook Linux platform driver and accompanying utilities.
116 stars 15 forks source link

Failure to completely load the driver after failing to initialize kbd_backlight on the Galaxybook2 #36

Open enkiros opened 3 weeks ago

enkiros commented 3 weeks ago

After updating the driver a couple weeks ago, I noticed the battery threshold feature wasn't working, and there was no device attribute created named charge_control_end_threshold.

Reading the error message: failure initializing kbd_backlight I figured disabling it would get me something. The battery threshold feature worked after setting up the kernel parameter to disable kbd_backlight.

Output of inxi -Fz

  Kernel: 6.11.0-061100daily20240916-generic arch: x86_64 bits: 64
  Desktop: Hyprland v: 0.41.2 Distro: Ubuntu 24.10 (Oracular Oriole)
Machine:
  Type: Laptop System: SAMSUNG product: 750XED v: P14CFG
    serial: <superuser required>
  Mobo: SAMSUNG model: NP750XED-KC3CL v: SAMSUNG_SW_REVISION_12345+0.0.0000
    serial: <superuser required> UEFI: American Megatrends LLC.
    v: P14CFG.040.231120.HQ date: 11/20/2023
Battery:
  ID-1: BAT1 charge: 21.5 Wh (43.4%) condition: 49.5/54.4 Wh (91.0%)
CPU:
  Info: 10-core (2-mt/8-st) model: 12th Gen Intel Core i5-1235U bits: 64
    type: MST AMCP cache: L2: 6.5 MiB
  Speed (MHz): avg: 678 min/max: 400/4400:3300 cores: 1: 620 2: 400 3: 1124
    4: 400 5: 400 6: 1520 7: 1062 8: 1016 9: 400 10: 400 11: 400 12: 400
Graphics:
  Device-1: Intel Alder Lake-UP3 GT2 [Iris Xe Graphics] driver: i915 v: kernel
  Device-2: SunplusIT 720p HD Camera driver: uvcvideo type: USB
  Display: wayland server: X.Org v: 24.1.2 with: Xwayland v: 24.1.2
    compositor: Hyprland v: 0.41.2 driver: dri: iris gpu: i915
    resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: iris,swrast
    platforms: gbm,wayland,x11,surfaceless,device
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.3-1ubuntu1
    renderer: Mesa Intel Graphics (ADL GT2)
  API: Vulkan v: 1.3.290 drivers: N/A surfaces: xcb,xlib,wayland
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio
    driver: sof-audio-pci-intel-tgl
  API: ALSA v: k6.11.0-061100daily20240916-generic status: kernel-api
  Server-1: PipeWire v: 1.2.4 status: active
Network:
  Device-1: Intel Alder Lake-P PCH CNVi WiFi driver: iwlwifi
  IF: wlo1 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb type: USB
  Report: hciconfig ID: hci0 rfk-id: 1 state: down
    bt-service: enabled,running rfk-block: hardware: no software: yes
    address: <filter>
Drives:
  Local Storage: total: 238.47 GiB used: 74.69 GiB (31.3%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLQ256HBJD-00B
    size: 238.47 GiB
Partition:
  ID-1: / size: 230.65 GiB used: 74.4 GiB (32.3%) fs: ext4 dev: /dev/dm-1
  ID-2: /boot size: 1.9 GiB used: 294.8 MiB (15.1%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 1.05 GiB used: 6.1 MiB (0.6%) fs: vfat
    dev: /dev/nvme0n1p1
Swap:
  ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) file: /swap.img
Sensors:
  Src: /sys System Temperatures: cpu: 33.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 8 GiB available: 6.96 GiB used: 2.13 GiB (30.6%)
  Processes: 299 Uptime: 9m Shell: Zsh inxi: 3.3.35

Platform in /sys/devices/platform is SAM0429:00

Output of sudo rmmod samsung_galaxybook; sudo modprobe samsung-galaxybook debug=true; sudo dmesg | grep "samsung"

[   17.028831] samsung_galaxybook: loading out-of-tree module taints kernel.
[   17.028842] samsung_galaxybook: module verification failed: signature and/or required key missing - tainting kernel
[   17.055513] samsung_galaxybook: loading driver
[   17.055776] samsung_galaxybook: initializing ACPI device
[   17.057249] samsung_galaxybook: initializing platform device
[   17.063671] samsung_galaxybook: initializing performance mode and platform profile
[   17.065148] samsung_galaxybook: will support profile 'performance' with performance mode value 0x15
[   17.065151] samsung_galaxybook: unmapped performance mode value 0x14 will be ignored
[   17.065153] samsung_galaxybook: will support profile 'low-power' with performance mode value 0xb
[   17.065154] samsung_galaxybook: will support profile 'quiet' with performance mode value 0xa
[   17.065155] samsung_galaxybook: will support profile 'balanced' with performance mode value 0x2
[   17.065156] samsung_galaxybook: unmapped performance mode value 0x1 will be ignored
[   17.065157] samsung_galaxybook: unmapped performance mode value 0x0 will be ignored
[   17.066537] samsung_galaxybook: initial performance mode value is not supported by device; setting to default
[   17.272195] samsung_galaxybook: set platform profile to 'balanced' (performance mode 0x02)
[   17.272200] samsung_galaxybook: initializing kbd_backlight
[   17.272741] samsung_galaxybook: failure initializing kbd_backlight
[   17.272825] samsung_galaxybook: driver successfully loaded
[   17.605861] Modules linked in: snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec iwlmvm(+) snd_hda_core snd_hwdep x86_pkg_temp_thermal i915(+) snd_pcm intel_powerclamp snd_seq_midi snd_seq_midi_event mac80211 coretemp snd_rawmidi cmdlinepart kvm_intel snd_seq processor_thermal_device_pci mei_pxp drm_buddy spi_nor mei_hdcp processor_thermal_device ttm snd_seq_device processor_thermal_wt_hint mtd kvm intel_rapl_msr libarc4 rapl intel_cstate iwlwifi snd_timer processor_thermal_rfim drm_display_helper i2c_i801 processor_thermal_rapl mei_me cec snd spi_intel_pci i2c_mux intel_rapl_common rc_core samsung_galaxybook(OE) cfg80211 mei wmi_bmof i2c_smbus soundcore spi_intel processor_thermal_wt_req platform_profile processor_thermal_power_floor i2c_algo_bit sparse_keymap processor_thermal_mbox igen6_edac intel_pmc_core int3403_thermal int340x_thermal_zone intel_vsec int3400_thermal pmt_telemetry acpi_thermal_rel pmt_class acpi_pad acpi_tad joydev input_leds mac_hid serio_raw sch_fq_codel msr parport_pc ppdev lp parport
[   34.624119] samsung_galaxybook: removing driver
[   34.652807] samsung_galaxybook: driver successfully removed
[   44.224420] samsung_galaxybook: loading driver
[   44.224566] samsung_galaxybook: initializing ACPI device
[   44.224595] samsung_galaxybook: [DEBUG] enabling ACPI feature
[   44.224597] samsung_galaxybook: [DEBUG]     43 58 7a 00 00 bb aa 00 00 00 00 00 00 00 00 00
[   44.224598] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.225385] samsung_galaxybook: [DEBUG] response was:
[   44.225387] samsung_galaxybook: [DEBUG]     43 58 7a 00 aa dd cc 00 00 00 00 00 00 00 00 00
[   44.225388] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.225389] samsung_galaxybook: [DEBUG] enabling ACPI feature
[   44.225390] samsung_galaxybook: [DEBUG]     43 58 8a 00 00 bb aa 00 00 00 00 00 00 00 00 00
[   44.225390] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.226084] samsung_galaxybook: [DEBUG] response was:
[   44.226086] samsung_galaxybook: [DEBUG]     43 58 8a 00 aa dd cc 00 00 00 00 00 00 00 00 00
[   44.226087] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.226087] samsung_galaxybook: initializing platform device
[   44.226133] samsung_galaxybook: initializing performance mode and platform profile
[   44.226134] samsung_galaxybook: [DEBUG] get supported performance modes
[   44.226135] samsung_galaxybook: [DEBUG]     43 58 91 00 00 8d 02 46 82 ca 8b 55 4a ba 0f 6f
[   44.226136] samsung_galaxybook: [DEBUG]     1e 6b 92 1b 8f 51 01 00 00 00 00 00 00 00 00 00
[   44.226137] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226137] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226138] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226139] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226140] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226140] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226141] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226142] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226142] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226143] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226144] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226145] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226145] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.226146] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227083] samsung_galaxybook: [DEBUG] response was:
[   44.227085] samsung_galaxybook: [DEBUG]     43 58 91 00 aa 8d 02 46 82 ca 8b 55 4a ba 0f 6f
[   44.227086] samsung_galaxybook: [DEBUG]     1e 6b 92 1b 8f 51 01 07 00 01 02 0a 0b 14 15 00
[   44.227087] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227087] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227088] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227088] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227089] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227089] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227090] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227090] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227090] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227091] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227091] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227092] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227092] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227093] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227093] samsung_galaxybook: will support profile 'performance' with performance mode value 0x15
[   44.227094] samsung_galaxybook: unmapped performance mode value 0x14 will be ignored
[   44.227095] samsung_galaxybook: will support profile 'low-power' with performance mode value 0xb
[   44.227095] samsung_galaxybook: will support profile 'quiet' with performance mode value 0xa
[   44.227096] samsung_galaxybook: will support profile 'balanced' with performance mode value 0x2
[   44.227096] samsung_galaxybook: unmapped performance mode value 0x1 will be ignored
[   44.227097] samsung_galaxybook: unmapped performance mode value 0x0 will be ignored
[   44.227100] samsung_galaxybook: [DEBUG] getting performance_mode
[   44.227101] samsung_galaxybook: [DEBUG]     43 58 91 00 00 8d 02 46 82 ca 8b 55 4a ba 0f 6f
[   44.227101] samsung_galaxybook: [DEBUG]     1e 6b 92 1b 8f 51 02 00 00 00 00 00 00 00 00 00
[   44.227102] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227102] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227103] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227103] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227103] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227104] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227104] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227105] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227105] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227106] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227106] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227106] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227107] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227107] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227591] samsung_galaxybook: [DEBUG] response was:
[   44.227592] samsung_galaxybook: [DEBUG]     43 58 91 00 aa 8d 02 46 82 ca 8b 55 4a ba 0f 6f
[   44.227592] samsung_galaxybook: [DEBUG]     1e 6b 92 1b 8f 51 02 02 00 00 00 00 00 00 00 00
[   44.227593] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227593] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227594] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227594] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227595] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227595] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227596] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227596] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227597] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227597] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227598] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227598] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227598] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227599] samsung_galaxybook: [DEBUG]     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.227599] samsung_galaxybook: initializing kbd_backlight
[   44.227600] samsung_galaxybook: [DEBUG] enabling ACPI feature
[   44.227600] samsung_galaxybook: [DEBUG]     43 58 78 00 00 bb aa 00 00 00 00 00 00 00 00 00
[   44.227601] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.228085] samsung_galaxybook: [DEBUG] response was:
[   44.228086] samsung_galaxybook: [DEBUG]     43 58 78 00 aa ff 00 00 00 00 00 00 00 00 00 00
[   44.228087] samsung_galaxybook: [DEBUG]     00 00 00 00 00
[   44.228087] samsung_galaxybook: failure initializing kbd_backlight
[   44.228127] samsung_galaxybook: driver successfully loaded

Loading the driver with sudo modprobe samsung-galaxybook kbd_backlight=false gives me this:

[  844.767566] samsung_galaxybook: parameter 'kbd_backlight' has been overridden; if your device needs this in order to function properly, please create a new issue at https://github.com/joshuagrisham/samsung-galaxybook-extras/issues
[  844.767633] samsung_galaxybook: loading driver
[  844.767745] samsung_galaxybook: initializing ACPI device
[  844.769511] samsung_galaxybook: initializing platform device
[  844.769597] samsung_galaxybook: initializing performance mode and platform profile
[  844.770786] samsung_galaxybook: will support profile 'performance' with performance mode value 0x15
[  844.770790] samsung_galaxybook: unmapped performance mode value 0x14 will be ignored
[  844.770791] samsung_galaxybook: will support profile 'low-power' with performance mode value 0xb
[  844.770792] samsung_galaxybook: will support profile 'quiet' with performance mode value 0xa
[  844.770793] samsung_galaxybook: will support profile 'balanced' with performance mode value 0x2
[  844.770794] samsung_galaxybook: unmapped performance mode value 0x1 will be ignored
[  844.770794] samsung_galaxybook: unmapped performance mode value 0x0 will be ignored
[  844.771425] samsung_galaxybook: kbd_backlight is disabled
[  844.771427] samsung_galaxybook: initializing battery charge threshold control
[  844.771436] samsung_galaxybook: installing i8402 key filter to capture hotkey input
[  844.771437] samsung_galaxybook: initializing fan speed
[  844.771736] samsung_galaxybook: Failed to read fan speed list
[  844.771739] samsung_galaxybook: Unable to get list of fan speeds
[  844.771740] samsung_galaxybook: initializing hwmon device
[  844.771771] samsung_galaxybook: enabling ACPI notifications
[  844.774237] samsung_galaxybook: initializing hotkey input device
[  844.774315] input: Samsung Galaxy Book extra buttons as /devices/platform/samsung-galaxybook/input/input16
[  844.774438] samsung_galaxybook: enabling WMI notifications
[  844.774448] samsung_galaxybook: installing WMI notify handler
[  844.774497] samsung_galaxybook: driver successfully loaded

My model at least (NP750XED-KC3CL) doesn't have keyboard backlight, but a quick google search shows some retailers list other variants as having keyboard backlight, particularly on the higher i7 models, so I don't know if disabling it the feature completely for every 750XED would be the best way to proceed.

joshuagrisham commented 2 weeks ago

Hi @enkiros can you please test if the latest in the branch https://github.com/joshuagrisham/samsung-galaxybook-extras/tree/no-quirks-test-before-enable (I pinged you also in https://github.com/joshuagrisham/samsung-galaxybook-extras/pull/40 ) seems to fix this for you? My hope is that your kbd_backlight will be automatically disabled (and possibly other features as well) without you needing to set any parameters