4JX / L5P-Keyboard-RGB

Cross platform software to control the RGB/lighting of the 4 zone keyboard included in the 2020, 2021, 2022 and 2023 lineup of the Lenovo Legion laptops. Works on Windows and Linux.
GNU General Public License v3.0
332 stars 41 forks source link

Effects relying on laptop hardware crash #162

Open 4JX opened 5 months ago

4JX commented 5 months ago

Having the same issue here on Hyprland, on the Legion 5 Pro 16ARX8. Can't open gui with the same error, but also (this might be related) trying to set the AmbientLight, Fade or Ripple effect from the terminal also crashes, and just sets the keyboard rgb to off. RUST_BACKTRACE=full doas legion-kb-rgb set --effect Fade

doas (rabaimor@legion) password: 
Authorization required, but no authorization protocol specified

The application panicked (crashed).
Message:  Could not connect to a X display
Location: /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/device_query-1.1.3/src/device_state/linux/mod.rs:38

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Any { .. }
Location: app/src/effects/mod.rs:151

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Originally posted by @rabaimorp in https://github.com/4JX/L5P-Keyboard-RGB/issues/152#issuecomment-2182346981

4JX commented 5 months ago

CC @rabaimorp, is it only those three?

Fade/Ripple need to access to keyboard input events which I just haven't found a way to gracefully handle yet on wayland. There's a library I previously tested but didn't quite like.

Should at least hide those for wayland users in the meantime though. Although for me it doesn't outright crash on GNOME, but rather just stops responding to input events if I don't focus the app.

Hyprland Could not connect to a X display

Are you maybe running the program through XWayland? It may be having some trouble there.

4JX commented 3 months ago

Closing due to lack of responses from OP

rabaimorp commented 3 months ago

Closing due to lack of responses from OP

Sorry, haven't got notified the first time. I tried it on x11 as well, same issue. I'll try to replicate it in any enviroment you want, to see if it could work

4JX commented 3 months ago

Sorry, haven't got notified the first time

Weird, I assumed the pings would reach you.

I tried it on x11 as well, same issue

Still crashes with that same error on X11? What DE/WM? Can you provide logs for both with RUST_BACKTRACE=full?

rabaimorp commented 3 months ago

Sorry, haven't got notified the first time

Weird, I assumed the pings would reach you.

I tried it on x11 as well, same issue

Still crashes with that same error on X11? What DE/WM? Can you provide logs for both with RUST_BACKTRACE=full?

Yes, the same error. I used x11 on kde plasma.