Module does not work with kernel version v4.14
This module doesn't seem to work with kernel version 4.14. It gets loaded, but it's not possible to change colours, nor to deactivate keyboard backlight.
root /sys/devices/platform/clevo_xsm_wmi $ cat kb_state
0
root /sys/devices/platform/clevo_xsm_wmi $ echo -n 1 > kb_state
root /sys/devices/platform/clevo_xsm_wmi $ cat kb_state
0
dmesg:
$ dmesg | grep -i clevo
[ 26.738716] clevo_xsm_wmi: loading out-of-tree module taints kernel.
[ 26.738963] clevo_xsm_wmi: Model Clevo N850HJ found
[ 26.744368] input: Clevo Airplane-Mode Hotkey as /devices/platform/clevo_xsm_wmi/input/input22
[ 26.752018] clevo_xsm_wmi: Polling thread started (PID: 1206), polling at 5 Hz
[ 26.753028] clevo_xsm_wmi clevo_xsm_wmi: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
It works fine on v4.13.12
Comments (12)
-
-
I did a bit of debugging around, and the problem appears to be with a recent change in wmi_evaluate_method:
https://github.com/torvalds/linux/commit/6afa1e2a32f4bd28df4cbe75454fde837dad4c09
As it says in the comments, the check starts at 0 instead of 1, so it should probably be okay to replace the second parameter of wmi_evaluate_method with 0x00 on lline 434 from this module and build it from source.
-
What changes were made in other WMI modules to make them still working? Maybe there is an answer?
-
I don't know, but that's all I needed to do to get it to work. For more context about instance_count, see this thread: https://lkml.org/lkml/2017/8/12/41
-
Can confirm that the fix suggested above works for me. Patchfile for convenience:
--- a/module/clevo-xsm-wmi.c +++ b/module/clevo-xsm-wmi.c @@ -431,7 +431,7 @@ static int clevo_xsm_wmi_evaluate_wmbb_method(u32 method_id, u32 arg, CLEVO_XSM_DEBUG("%0#4x IN : %0#6x\n", method_id, arg); - status = wmi_evaluate_method(CLEVO_GET_GUID, 0x01, + status = wmi_evaluate_method(CLEVO_GET_GUID, 0x00, method_id, &in, &out); if (unlikely(ACPI_FAILURE(status)))
-
Even with the fix above, some problems remain. After booting my laptop, none of the special keys for keyboard backlight work. Running
$ sudo modprobe -r clevo_xsm_wmi && sudo modprobe clevo_xsm_wmi
directly after booting to unload and reload the driver fixes this—but only until shutdown.
-
Hmm, it works fine for me. Are you sure this issue only happens in 4.14? The only function from the kernel related to the special keys appears to be wmi_install_notify_handler, and I didn't see any changes for it between 4.14 and 4.13.
Might be a good place to start though if it only works in 4.13 for you. You can turn on debugging by uncommenting that line in Makefile.
-
Up until 4.13, I had been able to turn off the backlight as soon as the kernel loaded the module during boot. Thanks for the hint about debugging, I'll check it out later and report back.
-
I've just had an update to kernel 4.14.7 and, with the fix from above, the driver works again like it used to do on previous kernels - no reinsertion necessary anymore after boot.
-
not worked for me since kernel 4.14.x
# modinfo clevo-xsm-wmi filename: /lib/modules/4.14.7-300.fc27.x86_64/extra/clevo-xsm-wmi.ko version: 0.1.1 license: GPL description: Clevo SM series laptop driver. author: TUXEDO Computer GmbH <tux@tuxedocomputers.com> srcversion: DE5D287CE6647014F2F601C alias: dmi*:svn*ECT*:rn*P750ZM*: alias: dmi*:pn*P5Pro*: alias: dmi*:pn*P5ProSE*: alias: dmi*:pn*Deimos/Phobos1x15S*: alias: dmi*:pn*N85_N87,HJ,HJ1,HK1*: alias: dmi*:pn*N85_N87*: alias: dmi*:pn*P775DM3(-G)*: alias: dmi*:pn*N85_N87*: alias: dmi*:pn*P95_HP,HR,HQ*: alias: dmi*:pn*P7xxDM2(-G)*: alias: dmi*:pn*P15xEMx*: alias: dmi*:pn*P65xRP*: alias: dmi*:pn*P65_67RSRP*: alias: dmi*:pn*P150EM*: alias: dmi*:pn*P15SM*: alias: dmi*:pn*P17SM*: alias: dmi*:pn*P15SM-A*: alias: dmi*:pn*P15SM1-A*: alias: dmi*:pn*P17SM-A*: alias: dmi*:pn*P370SM-A*: alias: dmi*:pn*P750ZM*: alias: dmi*:pn*P7xxDM(-G)*: alias: dmi*:pn*P870DM*: depends: rfkill,wmi name: clevo_xsm_wmi vermagic: 4.14.7-300.fc27.x86_64 SMP mod_unload parm: kb_color:Set the color(s) of the keyboard (sections) (array of kb_color) parm: kb_brightness:Set the brightness of the keyboard backlight (kb_brightness) parm: kb_off:Switch keyboard backlight off (bool) parm: kb_cycle_colors:Cycle colors rather than modes (bool) parm: poll_freq:Set polling frequency (poll_freq) parm: led_invert:Invert airplane mode LED state. (bool) parm: rfkill:Enable WWAN-RFKILL capability. (bool) # dmesg | grep clevo [ 11.935305] clevo_xsm_wmi: Model Clevo N850HJ found [ 11.936535] input: Clevo Airplane-Mode Hotkey as /devices/platform/clevo_xsm_wmi/input/input15 [ 11.936599] clevo_xsm_wmi: Polling thread started (PID: 743), polling at 5 Hz [ 11.938421] clevo_xsm_wmi clevo_xsm_wmi: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). [ 24.815431] Modules linked in: bnep uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media btusb btrtl snd_hda_codec_hdmi snd_hda_codec_realtek arc4 snd_hda_codec_generic iTCO_wdt iTCO_vendor_support snd_hda_intel intel_rapl snd_hda_codec x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm kvm_intel snd_hda_core snd_hwdep snd_seq kvm mac80211 snd_seq_device snd_pcm irqbypass iwlwifi intel_cstate snd_timer snd intel_uncore soundcore intel_rapl_perf cfg80211 joydev i2c_i801 r8169 hci_uart rtsx_pci_ms memstick mei_me btbcm mii mei tpm_tis btqca tpm_tis_core btintel intel_pch_thermal shpchp tpm bluetooth pinctrl_sunrisepoint pinctrl_intel intel_lpss_acpi intel_lpss ecdh_generic acpi_pad clevo_xsm_wmi(OE) rfkill auth_rpcgss sunrpc binfmt_misc xfs dm_thin_pool dm_persistent_data [ 3278.979790] clevo_xsm_wmi: Polling thread exiting [ 3304.044710] clevo_xsm_wmi: Model Clevo N850HJ found [ 3304.046402] input: Clevo Airplane-Mode Hotkey as /devices/platform/clevo_xsm_wmi/input/input26 [ 3304.046431] clevo_xsm_wmi: Polling thread started (PID: 9898), polling at 5 Hz [ 3304.048126] clevo_xsm_wmi clevo_xsm_wmi: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). [ 3352.713827] clevo_xsm_wmi: Polling thread exiting [ 3367.784037] clevo_xsm_wmi: Model Clevo N850HJ found [ 3367.785225] input: Clevo Airplane-Mode Hotkey as /devices/platform/clevo_xsm_wmi/input/input27 [ 3367.785493] clevo_xsm_wmi: Polling thread started (PID: 12042), polling at 5 Hz [ 3367.787785] clevo_xsm_wmi clevo_xsm_wmi: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
-
@ikselven - I can also confirm that the code change works for kernel 4.14.15 as well.
-
Can confirm this evaluate change also fixed my issues getting the P950ER to work with kernel 4.17.
- Log in to comment
I confirm this. Any chance to get this fixed soon?