diff --git a/src/uniwill_keyboard.h b/src/uniwill_keyboard.h index 2e9a257..e2810c0 100644 --- a/src/uniwill_keyboard.h +++ b/src/uniwill_keyboard.h @@ -386,11 +386,16 @@ void uniwill_event_callb(u32 code) // Refresh keyboard state and charging profile on cable switch event case UNIWILL_OSD_DC_ADAPTER_CHANGE: uniwill_write_kbd_bl_state(); - uw_charging_profile_write_state(); - uw_charging_priority_write_state(); break; } } + + switch (code) { + case UNIWILL_OSD_DC_ADAPTER_CHANGE: + msleep(50); + uw_charging_priority_write_state(); + break; + } } static ssize_t uw_brightness_show(struct device *child,