firmware-open icon indicating copy to clipboard operation
firmware-open copied to clipboard

Darter Pro (darp8) Keyboard backlight turns on after suspend

Open DrymarchonShaun opened this issue 1 year ago • 24 comments

  • Model: darp8
  • BIOS version: 2022-11-21_b337ac6
  • EC version: 2022-11-21_b337ac6
  • OS: Arch Linux
  • Kernel: 6.2.7-arch1-1

Right after suspending (closing lid, fn + f12, systemctl suspend) the screen and keyboard backlight turn off, but after a moment the keyboard backlight turns back on.

Steps to reproduce

Step 1 - Set backlight brightness to something other than 0 (issue occurs when the backlight is off, but on suspend you can't see it turn off before it turns back on) echo "255" | sudo tee /sys/class/leds/system76_acpi::kbd_backlight/brightness Step 2 - Suspend systemctl suspend Step 3 - Backlight will turn off for a few seconds, then it will turn back on Step 4 - Resume, backlight will turn back off.

Expected behavior

On suspend, keyboard backlight should turn off and stay off.

Actual behavior

On suspend, keyboard backlight turns off for a few second, then turns back on, while the device stays suspended, (green light is flashing.)

Additional info

This has already been reported on Pop!_OS as well - https://www.reddit.com/r/System76/comments/11hl1sx/darterpro_keyboard_backlight_turns_on_after/

DrymarchonShaun avatar Mar 21 '23 19:03 DrymarchonShaun

Did this just suddenly start? I'm unable to replicate this behavior on my lab unit.

leviport avatar Mar 21 '23 19:03 leviport

I only just noticed it within the past days, I'm not sure if it started recently or not.

DrymarchonShaun avatar Mar 21 '23 20:03 DrymarchonShaun

It might be good to open a support ticket for this issue: https://support.system76.com/

How long have you had the machine?

leviport avatar Mar 21 '23 20:03 leviport

fyi I reported this here as well: https://github.com/system76/firmware-open/issues/404

uSpike avatar Mar 21 '23 21:03 uSpike

@uSpike I'm pretty sure that's a different issue. In that one, the color reverts to white when resuming from suspend. In this one, the keyboard backlight is turning on while the machine is suspended. Also, that other bug is not specific to darp8.

leviport avatar Mar 21 '23 21:03 leviport

Ah I see, well then I misspoke in https://github.com/system76/firmware-open/issues/404 - what I see is the issue documented here. I see the backlight turn on when suspended, and off when woken. It is not white but instead the color which was last set.

uSpike avatar Mar 21 '23 22:03 uSpike

@uSpike did this start happening all of a sudden, and if so, when?

leviport avatar Mar 21 '23 22:03 leviport

How long have you had the machine?

got it sometime around October 2022

DrymarchonShaun avatar Mar 21 '23 22:03 DrymarchonShaun

@uSpike did this start happening all of a sudden, and if so, when?

Pretty sure since I've bought it in January. Didn't notice at first since I usually suspend by closing the lid covering the keyboard. But then I bought a dock and leave the lid open so I can see the keyboard light on. I thought this was intended behavior until I saw these related issues.

uSpike avatar Mar 22 '23 02:03 uSpike

I'm now seeing this happen on my lab unit. I suspect it's related to the newer kernel. Now that I can reproduce the bug, we'll work on a fix.

leviport avatar Mar 22 '23 17:03 leviport

Does it still happen on 6.2.8?

crawfxrd avatar Mar 29 '23 14:03 crawfxrd

Seems fixed on 6.2.8-arch1-1

DrymarchonShaun avatar Mar 29 '23 21:03 DrymarchonShaun

Since Pop now is on 6.4.6, I'm assuming that this can be closed.

leviport avatar Aug 23 '23 14:08 leviport

I still have the same issue on the linux 6.4.12.arch1-1. The rest of the system (BIOS/EC) is the same as in the original thicket. Every time I suspend the system keyboard backlight turns initially off and after a few second it goes on. It is restored to original level after resuming from suspend.

rkintzi avatar Sep 10 '23 05:09 rkintzi

@rkintzi I'm currently on 6.5.1 with no issues. Is there any particular reason you're still on 6.4.12?

DrymarchonShaun avatar Sep 10 '23 06:09 DrymarchonShaun

6.5.2 doesn't solve the problem for me. I don't have 6.5.1 at hand, but will try to build later.

My experience is that darp8 is very unstable (or maybe I should say that Linux kernel is very unstable on darp8), so I tend to keep a working kernel release. I didn't notice the problem until yesterday's evening.

rkintzi avatar Sep 10 '23 07:09 rkintzi

I'm on NixOS now, so I can't properly confirm if It's started happening again on Arch. If 6.5.2 isn't working, there's probably no point building 6.5.1.

DrymarchonShaun avatar Sep 11 '23 01:09 DrymarchonShaun

@rkintzi I take back what I said, I just noticed my laptop has started doing this again.

@leviport probably need to reopen this.

May be unrelated, but I did update to kernel version 6.5.2. Same BIOS version as the original bug report.

DrymarchonShaun avatar Sep 15 '23 04:09 DrymarchonShaun

May be unrelated, but I did update to kernel version 6.5.2.

I think the last time this happened, it was resolved by a Linux update. If I'm correct about that, then that's probably not unrelated at all.

leviport avatar Sep 15 '23 15:09 leviport

I switched back to 6.5.1 and it's still occurring. I'm not sure what happened, maybe it has been doing it and I just hadn't noticed.

DrymarchonShaun avatar Sep 15 '23 18:09 DrymarchonShaun

So I'm honestly not sure what's happening anymore. Somewhere between NixOS/nixpkgs@e5f018cf150e29aac26c61dac0790ea023c46b24 and NixOS/nixpkgs@5d017a8822e0907fb96f7700a319f9fe2434de02 ~~My darp8 started to seemingly not fully suspend, the green light that should be flashing is staying solid. For a good while when i was trying to figure out what that was about, I thought this issue may have been related as at one point when using the older e5f018cf150e29aac26c61dac0790ea023c46b24 revision, the backlight actually did stay off while properly entering sleep, (the green light started flashing.) But later on, having changed nothing, I tried again, and the backlight turned off and then turned back on, while the green light started flashing. So this original issue is seemingly being inconsistent, and now there seems to be a regression in something that's stopping my system from properly sleeping.~~

Ok, after further testing:

NixOS/nixpkgs@e5f018cf150e29aac26c61dac0790ea023c46b24

  • 6.1.52
    • First suspend doesn't work as expected, after running systemctl suspend the display and backlight turn off immediately, but the green light stays solid for a second or two. Eventually, the green light starts blinking, and that's when the keyboard backlight turns back on.
  • 6.4.15
    • First suspend after boot works as expected, after running systemctl suspend the display turns off, the green light starts flashing immediately, and the keyboard backlight stays off.
    • Any subsequent suspend no longer works as expected, after running systemctl suspend the display and backlight turn off immediately, but the green light stays solid for a second or two. Eventually, the green light starts blinking, and that's when the keyboard backlight turns back on.
  • 6.5.2
    • First suspend doesn't work as expected, after running systemctl suspend the display and backlight turn off immediately, but the green light stays solid for a second or two. Eventually, the green light starts blinking, and that's when the keyboard backlight turns back on.

NixOS/nixpkgs@5d017a8822e0907fb96f7700a319f9fe2434de02

  • 6.1.55
    • First suspend doesn't work as expected, after running systemctl suspend the display and backlight turn off immediately. After a second or two, the keyboard backlight turns back on, but the green light stays solid.
  • 6.4.16
    • First suspend doesn't work as expected, after running systemctl suspend the display and backlight turn off immediately. After a second or two, the keyboard backlight turns back on, but the green light stays solid.
  • 6.5.5
    • First suspend doesn't work as expected, after running systemctl suspend the display and backlight turn off immediately. After a second or two, the keyboard backlight turns back on, but the green light stays solid.
    • I grabbed 20230930-12-38-s0ix-output.log while on 6.5.5

I know this is getting beyond the scope of this issue, but it's all so tangled together, It's hard to tell what's one issue and what's another.

DrymarchonShaun avatar Sep 30 '23 18:09 DrymarchonShaun

Potentially of note: I noticed my system does seem to be reaching C10

root@natrix ~# cat /sys/kernel/debug/pmc_core/package_cstate_show -pp                         
Package C2 : 16372577488
Package C3 : 10295
Package C6 : 66017
Package C7 : 0
Package C8 : 29237
Package C9 : 0
Package C10 : 98057701786

I don't fully understand s0ix and c-states, but from what I gather, isn't C10 a state beyond s0ix? Does that mean it is actually going to sleep properly, and just not being picked up correctly by whatever controls the backlight and power LED?

DrymarchonShaun avatar Oct 02 '23 14:10 DrymarchonShaun

The problem with s0ix and darp8 is know issue (I reported it back in 2022): #384

rkintzi avatar Oct 02 '23 16:10 rkintzi

The problem with s0ix and darp8 is know issue (I reported it back in 2022): #384

I saw that, but for the longest time it wasn't an issue, and just recently started back up.

EDIT: That said, looking closer at your issue, it may very well be the same issue. @leviport I'll leave it up to you to decide what goes where.

DrymarchonShaun avatar Oct 02 '23 21:10 DrymarchonShaun