Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when opening laptop lid #837

Open
gro-david opened this issue Nov 29, 2024 · 11 comments
Open

Problems when opening laptop lid #837

gro-david opened this issue Nov 29, 2024 · 11 comments
Labels
bug Something isn't working question Further information is requested

Comments

@gro-david
Copy link

When I open the laptop lid the display turns on, then freezes and turns off again. After pressing any input the display either just turns on and it works from then on, or the behavior above repeats multiple times. Sometimes the same thing happens when I put the system to sleep (either with systemctl suspend or with systemctl hybrid-sleep), or sometimes when I just simply lock the laptop.

The whole bug seems very random and does not occur every time or every time the same way.

Here is my log in journalctl (in this case the display froze and turned off one time after I opened the lid, and after the first input it turned back on and worked from then.)

Nov 29 09:53:02 gro-david-dell niri[1344]: 2024-11-29T08:53:02.184394Z DEBUG niri::input: lid switch closed
Nov 29 10:08:49 gro-david-dell niri[1344]: 2024-11-29T09:08:49.007447Z DEBUG niri::input: lid switch opened
Nov 29 10:08:49 gro-david-dell niri[1344]: 2024-11-29T09:08:49.061089Z DEBUG niri::backend::tty: device changed: 57857
Nov 29 10:08:52 gro-david-dell niri[1344]: 2024-11-29T09:08:52.312423Z DEBUG niri::backend::tty: device changed: 57857

System Information

  • niri version: niri 0.1.10-1 (unknown commit)
  • Distro: Arch Linux, 6.6.63-1-lts
  • GPU: Radeon 780M (Integrated Laptop GPU)
  • CPU: AMD Ryzen 7 8840U w/ Radeon 780M Graphics
@gro-david gro-david added the bug Something isn't working label Nov 29, 2024
@YaLTeR
Copy link
Owner

YaLTeR commented Nov 29, 2024

I guess this is another case of libinput delaying the lid open event until the first input for some reason. Though, I'm not sure why it would also delay lid close. You can try to put this into the niri config as a workaround:

debug {
    keep-laptop-panel-on-when-lid-is-closed
}

@gro-david
Copy link
Author

I did try that, but it unfortunately does not change anything. The panel still turns on, then freezes, turns off and finally (after an input) turns back on again, this time responsively.

@YaLTeR
Copy link
Owner

YaLTeR commented Nov 29, 2024

Huh. I'm not sure what it could be then. Maybe swayidle with power-off-monitors on lock? I've seen it misfire after resume from sleep on my laptop.

Does it happen on other compositors?

@gro-david
Copy link
Author

gro-david commented Nov 29, 2024

I have tried a few more things, jut for testing. If I let the laptop go to sleep through swayidle (spawn-at-startup "swayidle" "-w" "timeout" "120" "niri" "msg" "action" "power-off-monitors" "resume" "swaylock -p") then it also does the same thing by turning on, then stopping to revceive input and then restarting the display.

Other compositors I have not yet go around to testing but will do asap.

@gro-david
Copy link
Author

So, I did some investigating. It only happens with niri, and it is not because of swaylock or swayidle. I tried with both of them disabled, so it seems to be something with the way niri wakes from this display off state.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 3, 2024

Thanks for testing. Weird. Not sure what it could be caused by.

@gro-david
Copy link
Author

trim.7B78210A-EAEA-409F-91DB-826EF4C7B372.MOV

Thought I might share how it looks. The start is cut off a bit unfortunately but when opening the lid basically the same happens.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 4, 2024

Does it actually turn off and on repeatedly, or just once?

@gro-david
Copy link
Author

Repeatedly, like on the video. Its uncut and not looping or anything, so this really happens. Sometimes more sometimes less.

@YaLTeR
Copy link
Owner

YaLTeR commented Dec 4, 2024

That is very strange.

@gro-david
Copy link
Author

Its definitely not a deal breaker, just a bit annoying. Otherwise I really love the work you put in.

@YaLTeR YaLTeR added the question Further information is requested label Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants