Module does not work with kernel version v4.14

Issue #32 new
crtxcr created an issue

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)

  1. ikselven

    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)))
    
  2. ikselven

    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.

  3. beelzy

    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.

  4. ikselven

    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.

  5. ikselven

    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.

  6. cremesk

    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().
    
  7. Jesse Litton

    Can confirm this evaluate change also fixed my issues getting the P950ER to work with kernel 4.17.

  8. Log in to comment