Closed JeffDess closed 2 days ago
jesus christ this is like the 7th dupe #5763
I've read this issue before filing mine, I believed it was a different issue as the solution didn't work. Switching to hyprland-git
doesn't solve this issue, quite the opposite, most windows are not registering the keyboard. I had to switch back to hyprland
in order to get it working.
if it's a regression bisect it
well that's odd. Should've mentioned it. But yea, bisect please. See https://wiki.hyprland.org/Crashes-and-Bugs/#bisecting-an-issue
Ok so I bissected all night and found the issue:
On fcitx options, I have this :
~/.config/fcitx5/conf/waylandim.conf
# Forward key event instead of commiting text if it is not handled
PreferKeyEvent=False
When set to True
, I can type normally. It's the default value and this is probably why most people don't have the issue.
However, the False
value is needed as is fixes a lot of other issues with synthetic input (programmable keyboards).
I am relabeling the issue since the focus bug seems resolved.
can you try after 8bcccf9f0f0f69986e315d4288dfdbf119dd19db
I built 56de72f3, unfortunately still unable to type on GUI applications.
The PreferKeyEvent was introduced in this commit, if that can be of any help: https://github.com/fcitx/fcitx5/commit/fbf6651f2d3b866126ad208874f6c2dcdfcb55e3
I'm having the similar issue, but not realized it's related to fcitx5 until then.
Here is my case:
terminal: foot gtk application: nautilus/firefox
follow_mouse = 2
follow_mouse = 1
. If you input any chars in step 4 or click an input area in firefox, foot will get input in step 5 . If in step 5, you do not input chars, just click firefox and click foot back, then foot will get input for such a double switch.
Once I killed fcitx5
, the input works well.
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: rt
Release: 6.8.3-gskd
Version: #1 SMP PREEMPT_DYNAMIC Thu, 04 Apr 2024 10:17:48 +0000
GPU information:
c7:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c2) (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
this is unrelated and fixed in git.
@JeffDess I set the thing:
restarted fcitx5, and I can type normally in kitty. Anything else to repro?
Yes terminal emulators work (kitty, foot...), GUI apps don't (GTK, Qt, Electron, etc). Firefox for instance doesn't work for me. Does it work for you?
If yes, are we testing with a similar setup?
local/fcitx5 5.1.9-1 (fcitx5-im)
Next generation of fcitx
local/fcitx5-gtk 5.1.3-1 (fcitx5-im)
Fcitx5 gtk im module and glib based dbus client library
local/fcitx5-qt 5.1.6-1 (fcitx5-im)
Fcitx5 Qt Library (Qt5 & Qt6 integrations)
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = CLUTTER_BACKEND,wayland
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_QPA_PLATFORMTHEME,qt5ct
env = XMODIFIERS,@im=fcitx
env = GTK_IM_MODULE,fcitx
env = QT_IM_MODULE,fcitx
env = SDL_IM_MODULE,fcitx5
env = XIM,fcitx
env = XIM_PROGRAM,fcitx
You could also try to change your config with the fcitx5-configtool
package to make sure. This option is available in Wayland Input Method Interface settings. It updates automatically without having to kill/spawn fcitx.
I've just tested more things with a3ca016d :
Last observation is odd, the keys that work on GTK are precisely the keys that didn't work in terminal before the focus fix (arrow keys and backspace). Could there be an interaction with this fix and new text-input-v3 commit?
I just updated to Gentoo's Hyprland version 0.39.1-r1 (commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759) to fix the issue where the cursor would get stuck in Firefox. It's working, but I'm seeing similar behavior to @JeffDess.
One thing I've noticed though, is that GUI apps seem to work as long as I start fcitx5 after I open the app. If fcitx5 is already running when I open discord or firefox, then it doesn't work. Just restarting fcitx with the -r option doesn't work either, I actually need to kill fcitx, then restart it. JeffDess, do you see the same behavior?
@arbyste it doesn't seem to make a difference when fcitx or the app is started, when fctix5 is running, I am having the problem.
I also tested on Plasma and Qtile and the problem doesn't happen at all with the same version of Fcitx and all... looks to be Hyprland specific.
Also another issue I am having with post-e87227 commits, when I type into Anyrun, it closes after the first character typed.
Also another issue I am having with post-e87227 commits, when I type into Anyrun, it closes after the first character typed.
That's an issue with the randr plugin. If you don't include it in the config, anyrun works.
That's an issue with the randr plugin. If you don't include it in the config, anyrun works.
@fufexan Exactly, that's is solving the issue. But then can't use the plugin anymore :man_shrugging:
Testing with 0c446ec tonight, even with no fcitx running, I am having more issues with synthetic inputs. For instance I use a macro to trigger scroll mode on my trackball and it doesn't work at all now. In order to work, it has to type numlock twice in 40ms (if I recall). Looking at wev's output, timings seem right, but no somehow it's not registering on apps.
[14: wl_keyboard] key: serial: 4532; time: 1618410; key: 77; state: 1 (pressed)
sym: Num_Lock (65407), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 16
depressed: 00000010: Mod2
latched: 00000000
locked: 00000010: Mod2
[14: wl_keyboard] key: serial: 4534; time: 1618410; key: 77; state: 0 (released)
sym: Num_Lock (65407), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 16
depressed: 00000000
latched: 00000000
locked: 00000010: Mod2
[14: wl_keyboard] key: serial: 4536; time: 1618423; key: 77; state: 1 (pressed)
sym: Num_Lock (65407), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 16
depressed: 00000010: Mod2
latched: 00000000
locked: 00000010: Mod2
[14: wl_keyboard] key: serial: 4538; time: 1618423; key: 77; state: 0 (released)
sym: Num_Lock (65407), utf8: ''
[14: wl_keyboard] modifiers: serial: 0; group: 0
depressed: 00000000
latched: 00000000
locked: 00000000
That's an issue with the randr plugin. If you don't include it in the config, anyrun works.
@fufexan Exactly, that's is solving the issue. But then can't use the plugin anymore 🤷♂️
I'll try to make a patch for it if I get the time.
Looking at wev's output, timings seem right, but no somehow it's not registering on apps.
uh-huh, that might not be a hyprland issue then? does it happen in e.g. sway?
@vaxerski Works fine on Sway, Plasma, Qtile, or Hyprland pre- 1d40af6. I've compared with the wev output on e87227e and it is identical as far as I can tell, but the keypress is actually toggling scroll mode as intended.
tried it again with ff this time and couldn't repro again. I'll need clear repro steps... maybe you're using a weird fcitx config?
I have a hard time figuring out what could be the difference. My fcitx setup is pretty bland, I think I only ever changed that PreferKeyEvent setting. I am sharing my dotfiles and the repro steps as far as can tell:
fcitx5
, fcitx5-qt
, fcitx5-gtk
and fcitx5-configtool
false
) and save.exec-once = fcitx5 -r
I thinks that's pretty much it. I will also try it myself on another computer.
Ok so I tried latest git commit on another computer and cannot reproduce in GUI apps. The scroll mode macro is broken on both computers tough.
I versioned the Hyprland config of both computers so I'll be able to compare easily. One major hardware difference is Nvidia GPU on the one I cannot type. Other than that there's not much difference, but we'll see what I can find.
I'll get back with more info when the comparison is done.
Ok so, turns out fcitx was stuck to an old version I had built some time ago. I can now reproduce on both computers, with fctix 5.9 & 5.10, repro steps are mostly ok except the second computer has a slightly different behavior. If I close/open a bunch of windows I can sometimes regain type control. But opening kitty first, closing it, then reopening firefox will always lead to the bug. I will update the previous message with repro steps accordingly.
On the second computer, I also managed to lose type control in Kitty. Closing it then opening a new terminal solved it.
can you check d7aed240db408259228bf09708986c82bdca23eb
Sadly, no change. Can I provide any logs that could help?
You can try launching a simple app that exhibits the issue (the simpler the better) with WAYLAND_DEBUG=1
and saving the output (e.g. WAYLAND_DEBUG=1 kitty |& tee ./logs.txt
) on both the bad commit and the good commit and attach both. Maybe I'll spot something off. (of course press your buttons while the app is open to gather the data xD)
fwiw, I've done all the steps you outlined and found a crash bug which I fixed shortly after, but after that my keys would register normally in firefox, chromium, kitty, etc.
Oh wait, I had a build error that I overlooked and was testing the wrong build. d7aed24 seems to have fixed it as far as I can tell! Thanks a lot! :tada:
The scroll mode with the double numlock macro is still broken. Do you prefer that I open a new issue about that one?
I dont mind either way, but please explain how your macro is supposed to work and which commit broke it
Yes, so I will investigate a little on my side and open a new issue when I have gathered all the info. Thanks!
Hi! While the bug where I could not type at all is gone, I am sorry to report that I can still reproduce the issue under very specific conditions (with 7ad9116d and Fcitx 5.1.9 & 5.1.10). The good news is I have STR 100% repro on two computers. It's pretty much what I have described before, but I have found the terminal needs to be the last window when it is closed. I have also tested more terminal emulators to make sure it wasn't linked to Kitty. Foot and Alacritty also reproduce the bug, while Konsole does not. Cannot reproduce in Sway either.
The annoying thing is, when it happens just before locking the computer (swaylock), it is not possible to enter password to unlock the system!
Here are the updated STR:
fcitx5
, fcitx5-qt
, fcitx5-gtk
and fcitx5-configtool
false
) and save.exec-once = fcitx5 -r
Please let me know if you need any other details, hopefully you'll be able to reproduce easily. (my dotfiles)
Also another issue I am having with post-e87227 commits, when I type into Anyrun, it closes after the first character typed.
A workaround https://github.com/ryan4yin/nix-config/commit/5e9f98e56dce5685f4a72b77564aebd0d3a7891a
A workaround ryan4yin/nix-config@5e9f98e
Thanks @ryan4yin, I solved this issue by removing the randr plugin which I didn't use that much, but I'll keep that in mind if I want to enable it again.
@JeffDess can you check if the latest -git fixed the issue?
Hi @sungyoonc, I just built with the latest and greatest:
> hyprctl version
Hyprland, built from branch main at commit 9b54342baa27d8de0460e1103ec4c3cc65592ed8 (Revert syncobj: wait for deadline instead of available).
Date: Tue Sep 3 08:47:34 2024
Tag: v0.42.0-113-g9b54342b, commits: 5182
So far it's everything seems to be working. I retested with the repro steps that I provided, but I have not encountered the bug.
Nice work, I appreciate it!
Hyprland Version
System/Version info
```sh 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: archlinux Release: 6.8.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Sun, 28 Apr 2024 15:59:47 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106M [GeForce RTX 2070 Mobile / Max-Q Refresh] [10de:1f14] (rev a1) (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
Hi! I updated my system yesterday night and today I am having issue when moving the focus from a window to another. After moving the focus, my I can type in the active window but most of the keystrokes wouldn't get through (arrow keys and backspace mostly).
If I open a terminal, then focus to a browser, then focus back to the terminal, I can see the text focus is on the browser address bar and some keys bindings, such as Ctrl+S would open a prompt to save the web page, even tough the active window is the terminal.
Additional observations:
I am using Fcitx v5.1.9, killing this process resolves the issue.
I tried hyprland-git but it is even worse, I cannot type on any window except a terminal (Qt, GTK and Electron apps all fail to register keystrokes).
How to reproduce
Crash reports, logs, images, videos
No response