I’ve had mixed results as well just blacklisting certain drivers. I’m still testing / working to resolve this issue myself in my spare time but I do have a systemd service that I will post here that works much more reliably thus far. Ideally I’d like to work with others to patch this bug in the cros based kernel drivers themselves without having to do workarounds.
@jurti Here’s what I’ve been using lately, but YMMV. If your system uses systemd, try this systemd service instead of blacklisting those drivers on boot. At least for me, the drivers work well while the OS is running, they just need to be unloaded before entering a sleep state. This isn’t perfect, as sometimes the taptic touchpad on Redrix goes into a rapid-click type state when attempting to click on anything, though this can also be resolved by disabling and enabling the touchpad in your desktop environment. Add/remove the unloaded/reloaded drivers below as needed.
[Unit]
Description=Unload Chromebook drivers before suspend
Before=sleep.target
StopWhenUnneeded=yes
[Service]
Type=oneshot
ExecStart=/sbin/modprobe -r cros_ec_lpcs cros_ec_keyb cros_ec_typec
ExecStop=/sbin/modprobe cros_ec_lpcs
ExecStop=/sbin/modprobe cros_ec_keyb
ExecStop=/sbin/modprobe cros_ec_typec
RemainAfterExit=yes
[Install]
WantedBy=sleep.target
It works for me. Just a heads-up: you have to disconnect all USB-C peripherals before standby, otherwise it crashes. Thanks again for the script.
Works on Gimble with Fedora 43! Thanks so much for providing this script!
The two items I noticed - keyboard back-light stays off (this is ok for me) and charging seems to be disabled when suspended (charging light stays off).
@trbleshootr Try removing these lines from the service as you may not need them:
ExecStop=/sbin/modprobe cros_ec_keyb
Or:
ExecStop=/sbin/modprobe cros_ec_typec
From my experience even though the charging light is off, it still seems to charge. I’m not sure though if fast charging works while in a sleep state (or if it works at all) as I’ve only ever seen Redrix (HP Elite Dragonfly) pull 35W-40W from the factory charger or any other high power USB-C charger, though this is good enough for me at least.
Thanks for the follow up. I have the following in a “systemd” script:
#!/bin/sh
case $1/$2 in
pre/*)
\# Before suspend — unload problematic EC modules /usr/sbin/modprobe -r cros_ec_lpcs 2>/dev/null /usr/sbin/modprobe -r cros_ec_keyb 2>/dev/null /usr/sbin/modprobe -r cros_ec_typec 2>/dev/null ;;post/*)
\# After resume — reload modules /usr/sbin/modprobe cros_ec_lpcs /usr/sbin/modprobe cros_ec_keyb /usr/sbin/modprobe cros_ec_typec ;;esac
This script is working great.
You are correct, charging is working when suspended even though the charging light is off (although only drawing 10W). If i comment out the “cros_ec_typec” lines, and enter suspend, the chromebook will not wake - I have to hold the power button to recover.
The keyboard back-light stays off and cant be turned on, but this is fine with me. I am very happy to finally have a working suspend!
Same issue here on my HP Elite Dragonfly Chromebook. When I had RW_LEGACY firmware and tried to sleep the device, it would just reboot back into the You are in Developer Mode screen. After switching to full UEFI now, the device just instantly wakes up when I try clicking the sleep button on KDE 6.6.1 in Ublue Aurora, on kernel 6.18.7.
[ 7591.411330] PM: suspend entry (s2idle)
[ 7591.432447] Filesystems sync: 0.021 seconds
[ 7591.433331] Freezing user space processes
[ 7591.434492] Freezing user space processes completed (elapsed 0.001 seconds)
[ 7591.434495] OOM killer disabled.
[ 7591.434496] Freezing remaining freezable tasks
[ 7591.435491] Freezing remaining freezable tasks completed (elapsed 0.000 seconds)
[ 7591.435492] printk: Suspending console(s) (use no_console_suspend to debug)
[ 7591.493611] PM: Some devices failed to suspend, or early wake event detected
[ 7591.493803] intel-ipu6 0000:00:05.0: IPU6 in secure mode
[ 7591.580436] PM: resume devices took 0.087 seconds
[ 7591.580955] OOM killer enabled.
[ 7591.580955] Restarting tasks: Starting
[ 7591.581591] Restarting tasks: Done
[ 7591.581596] efivarfs: resyncing variable state
[ 7591.582070] efivarfs: finished resyncing variable state
[ 7591.582082] random: crng reseeded on system resumption
[ 7591.582401] PM: suspend exit
[ 7613.529356] wlp0s20f3: regulatory prevented using AP config, downgraded
Hi! Which of these drivers cros_ec_lpcs, cros_ec_keyb, or cros_ec_typec is most likely responsible for the problems, or could they all be contributing?
Today I tried disabling the modern standby mode in bios and same issue. Interestingly though, when that is disabled the camera indicator led is always lit. However the camera is still not functional in my distro even with this light finally turning on for the first time in years since I switched away from ChromeOS.