-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Gamescope won't register mouse or keyboard input correctly #6159
Comments
Perhaps related to these? |
I am not using cursor capture, actually seems to make things slightly better. It will get the cursor position correctly now, but then it won't let me click or type |
Here is it with cursor capture, half fixes it but still broken. I will keep this option in mind though might work around other issues. But does appear that the cursor lock is indeed broken since I can move it outside of the window, but this issue isn't related out.mp4 |
Here is with cursor lock and |
can you get a log of this in sway? |
Here is is! |
Just to be safe I checked the Gamescope source code and there is not mention of Sway, I was thinking maybe as for the CSD issue maybe it checks the name of the compositor and if it's unknown just enables CSDs to be safe? But no, but seems like unrelated issue likely best to get it working at all first |
are you sure you tested it both on sway and hyprland in the same conditions (lock/no-lock, same program, etc)? |
I used fullscreen with no cursor lock and it worked fine, same with windowed. I can try cursor lock if you would like |
Sway (works in all 4 cases)
Hyprland (fails in all 4 cases and had to close with key binding)
|
Do you have a first known good and last known bad? If you can find what version is last working that would be super helpful to see what broke. It would also be nice to isolate hyprland as the variable. |
I will downgrade a few commits and report back, going to Install Arch for easier testing like I said I was going to do at least 3 times |
Just got done installing Arch, on version 0.40.0 issue is not there somewhat but there is issue where cursor is offset upwards unless fullscreened also CSD still there. I will try newer version until I get the bug |
And yes able to reproduce on Arch with git version with bone stock config |
I have bad and good news, good news I found the where the issue appeared... The bad news is that it was one of the rewrite commits so it's likely hard to find The cursor offset and CSD bug was present in all versions I tested, since the CSD appear above where they should I feel like it is related to CSD perhaps? The offset seems about right. I am not sure why the CSD is present on Hyprland and not Sway to be honest, but if it is CSD we should at least get the CSD to work correctly then figure out why it's there and how to get the same behavior as in Sway |
Update, I was able to repro with I'm looking into this now. I'll try to have a PR up by tomorrow. For me gamescope is totally in major janko mode as
|
Tried running git version? I think that's a known issue already it crashing with focus change, was having it when I downgraded a few versions. I think that is fixed already, just everything else is broken As for
What GPU are you using? That sounds like your GPU is old and doesn't support some hardware or driver feature. Actually, could also be a missing file or bug. |
The hyprland logs show that the motion data is rounded to nearest integer and no axis events are sent at all. The sway logs show axis events with no values ( only source + stop ?) |
is gamescope binding wl_seat multiple times? if so, tell them to stop |
Sorry didn't have time to play with this any deeper yesterday. I'll try to make time in a bit. As for the GPU I have its a 6900XT. I agree though, the shader warns are probably just supertuxkart. I just tried that because I don't have steam on this machine rn, and because supertuxkart was able to run without gamescope and its worked with gamescope in the past. I'll look into the wl_seat binding thing when I get back to this vaxry. Just curious, is gamescope working for you guys? |
hyprland does everything it can to hint it does NOT want CSD. If an app uses them regardless, blame the developers of the app. (re: decorations) |
Did a bit of bisecting and testing but def not done yet. I just wanted to update with my findings to help anyone else messing with this.
To summarize: If I were to guess, this probably has something to do with disabling xwayland scaling (as I also have that on) along with having a non-0 or odd scale factor. My next steps: Going to continue on this tomorrow. I haven't had quite as much time to mess with this as I would like the last few days. Please update this ticket if anyone else can verify my findings or add anything here! Thanks guys! |
I should have mentioned in my issue that I have 2 monitors, one is 1920x1080 the other is 1920x1200. I will try disabling one tomorrow and see if anything happens I guess |
would be nice to bisect the CSD too |
I was replying to some other guy's comment about this issue |
Sorry I misread |
It has nothing to do with the game, other applications and games have the same issue. But no, I do not have any scaling set just the defaults, I haven't had a need for scaling |
Going to update this comment with bisect findings: So far I know that the input/mouse issue is between 0.40.0-75@60be4298 and 0.40.0-91@3fe5280c. And the CSD issue is sometime before 0.40.0-75. Sorry my notes are a mess lol I am tired. Should find the real commit tomorrow and hopefully have a fix out. Also Vaxry, I tested that big PR for wlroots that is going to be merged soon. That doesn't fix the issue in case you were wondering.
Also bonus finding, |
Lol, idk how I missed this... Thanks for finding that! It seems like you're right, struggling to build the commit before to verify that the commit before was good but that definitely lines up with where I was going. It shouldn't be too bad, I just need to look through the commits in the PR that merged that commit. Going to come back to this tomorrow though. Thanks for finding that! |
One more update on findings: This makes me wonder if the keycodes from InputManager are being clipped because they are too high? Still haven't figured out what changed that would cause that in the commit but it seems like that might be a possible culprit. |
I'm sort of blocked on this right now, sort hoping that this somehow gets fixed in the next wlroots rewrite PR. That said, for anyone who wants to take a stab at this. You can easily reproduce this with:
You will notice pretty much no input events come through except for one mouse move event when entering the window. |
some apps are legitimately braindead and bind wl_seat a bazillion times and expect the events to be sent to all of them ref #6159
should be fixed. |
some apps are legitimately braindead and bind wl_seat a bazillion times and expect the events to be sent to all of them ref #6159
Yep completely fixed for me now, works same as Sway now. No CSD, no offset, cursor works everything |
Yea, I've noticed the refresh rate messages too. I kind of just chalked that up to a red herring. My guess with those messages is that they are due to me having two different refresh rates for each monitor. The messages swapped between 60 and 120 for me. And thats the rr of my monitors. Curious if thats the same for you? |
Yes it is likely separate issue |
it is technically allowed by spec to bind |
Well still worth pointing out perhaps if it is unintended I guess and likely not ideal, good to follow spec still I'd say just for compatibility even if it's disagreeable. It would be a overstatement to call me a developer, but does seem dumb to me as well if I understand it. Is wl_seat like a listener or something that listens for events such as keyboard etc. And it's making multiple instances and expects it to be sent to all? I feel like that would result in duplicated key presses so I think I'm completely misunderstanding fundamentally probably |
Aaaaaand Gamescope is broken yet again in a new way, I am now measuring frames in minutes. Everything else seems fine but it's even more laggy with #6268 I guess I should make a new issue for this and other issues as well |
I'm on 1423707 and I still have some issues with gamescope, keyboard events work fine but the mouse events are misplaced, looks like the coords are multiplied 'cause they are kinda fine in the left-top corner but are like half screen off in the right corners. |
I came across this comment on a google search, I just started having this same issue today, but I don't use Hyprland and my gamescope version if from April (Nobara gamescope-3.14.11-4.git.20240430.c7ef7c4.fc39.x86_64). When I try Guild Wars 2, I can easily click the settings menu in the top left corner, but the further I move away, the further the mouse clicks register. Very strange! |
We have a dedicated input thread, the backend code's main Wayland queue is only polled, potentially once per frame/refresh cycle, the input thread has it's own separate queue and is waited (epoll) upon and is constantly forwarding events ASAP to the app running in Gamescope. It's not really nice to call that "legitimately braindead" or "stupid", it's incredibly normal app design. Many modern video games have a dedicated input thread doing basically the same thing. FTR, I don't care about key or motion events on the main thread at all, but unfortunately I have to register for them all if I want enter/leave, Wayland design moment. I can't just pass the state around because I need the wl_keyboard objects and wl_pointer objects on the main thread for stuff which means the compositor is going to send the events anyway. |
Excuse my tone, maybe it's been a bit overboard, but it still doesn't make much sense to me - it would make much more sense to bind wl_seat once and internally forward the events instead of binding the main compositor's wl_seat 4 times |
No, it's only bound twice. You can check this with WAYLAND_DEBUG or breaking on |
dunno man (taken from #6159 (comment)) |
I have found that downgrading to gamescope 3.14.2 fixes this for me (3.14.3 is broken) |
@vaxerski You know XWayland and other clients bind seats of Gamescope (ie. not Hyprland) right? You have to exclude clients lmao. |
oh, my bad. I am dumb. |
Hyprland Version
System/Version info
Bug or Regression?
Bug
Description
It seems Gamescope 3.14.15 is completely broken on recent versions of Hyprland, it won't take keyboard or mouse input whatsoever anymore. I suspect something got broken when rewriting something, or it might be a issue on Gamescopes side. It seemed to have started with Gamescope added CSDs which look terrible on Hyprland, I imagine GNOME can be fully to blame
How to reproduce
gamescope $app
meta + f
to fullscreen don't work that in Valves infinite wisdom usemeta
and conflictCrash reports, logs, images, videos
Video:
https://github.com/hyprwm/Hyprland/assets/45698918/ea9b01dc-22f1-42de-8fd6-824ab5595205
Running prismlauncher in Gamescope with
WAYLAND_DEBUG=1
and trying to click next then closing:https://gist.github.com/nonetrix/5b17027cdc551fc5d8d9c3e84ce48827
My configs in which this happens:
https://github.com/nonetrix/nixdots
The text was updated successfully, but these errors were encountered: