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

language onevent with error #5923

Closed
coffebar opened this issue May 7, 2024 · 3 comments · Fixed by #5925
Closed

language onevent with error #5923

coffebar opened this issue May 7, 2024 · 3 comments · Fixed by #5925
Labels
bug Something isn't working

Comments

@coffebar
Copy link
Contributor

coffebar commented May 7, 2024

Hyprland Version

System/Version info
Hyprland, built from branch  at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759  (props: bump version to 0.39.1).
Date: Tue Apr 16 16:01:03 2024
Tag: v0.39.1, commits: 4460

flags: (if any)


System Information:
System name: Linux
Node name: crab
Release: 6.8.7-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000


GPU information:
00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:

Bug or Regression?

Bug

Description

Hyprland is sending errors to the IPC sometimes:

hyprland language onevent with error

in result, Waybar shows empty layout

Here is log from the Waybar:

[2024-05-06 18:51:55.642] [debug] hyprland language onevent with English (US)
[2024-05-06 18:51:55.648] [debug] hyprland language onevent with English (US)
[2024-05-06 18:51:55.649] [debug] hyprland IPC received activelayout>>wlr_virtual_keyboard_v1,English (US)
[2024-05-06 18:51:55.655] [debug] hyprland language onevent with English (US)
[2024-05-06 18:51:55.661] [debug] hyprland language onevent with English (US)
[2024-05-06 18:51:55.662] [debug] hyprland IPC received activelayout>>wlr_virtual_keyboard_v1,error
[2024-05-06 18:51:55.667] [debug] hyprland language didn't find matching layout
[2024-05-06 18:51:55.667] [debug] hyprland language onevent with error
[2024-05-06 18:51:55.675] [debug] hyprland language didn't find matching layout
[2024-05-06 18:51:55.675] [debug] hyprland language onevent with error

related with issue

How to reproduce

Didn't figure out how to reproduce, maybe it's required to go into suspend mode.
Will do my best if I can help with debugging, but don't know where to start with this.

Crash reports, logs, images, videos

No response

@coffebar coffebar added the bug Something isn't working label May 7, 2024
@vaxerski
Copy link
Member

vaxerski commented May 7, 2024

that would be an xkb bug I'd say

@coffebar
Copy link
Contributor Author

coffebar commented May 7, 2024

xkb is part of xorg, isn't it?
What part does it take in it?

@vaxerski
Copy link
Member

vaxerski commented May 7, 2024

it's a part of xorg but it works and as such we still use it in wayland. It handles your keyboard layouts. It's a hunk of code for "human" stuff which nobody wants to rewrite cuz it works and is horribly complicated...

Generally I ask xkb for the layout and return whatever it says:

std::string IKeyboard::getActiveLayout() {
const auto WLRKB = wlr();
const auto KEYMAP = WLRKB->keymap;
const auto STATE = WLRKB->xkb_state;
const auto LAYOUTSNUM = xkb_keymap_num_layouts(KEYMAP);
for (uint32_t i = 0; i < LAYOUTSNUM; ++i) {
if (xkb_state_layout_index_is_active(STATE, i, XKB_STATE_LAYOUT_EFFECTIVE)) {
const auto LAYOUTNAME = xkb_keymap_layout_get_name(KEYMAP, i);
if (LAYOUTNAME)
return std::string(LAYOUTNAME);
return "error";
}
}
return "none";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants