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

F key toggles fullscreen mode #1637

Open
3 of 6 tasks
OlegAckbar opened this issue Nov 24, 2024 · 16 comments · May be fixed by #1666
Open
3 of 6 tasks

F key toggles fullscreen mode #1637

OlegAckbar opened this issue Nov 24, 2024 · 16 comments · May be fixed by #1666

Comments

@OlegAckbar
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Are you using any gamescope patches or a forked version of gamescope?

  • The issue occurs on upstream gamescope without any modifications

Current Behavior

When I press F games in with "exclusive fullscreen" mode gamescope toggles its fullscreen mode. Just F without any modifiers.

Steps To Reproduce

  1. Launch any games that use exclusive fullscreen
  2. Press F
  3. Gamescope will turn to window mode instead of being fullscreen. No modifiers are used.

Hardware information

Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.12.1-2-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7700K CPU @ 4.20GHz
Memory: 15.6 ГиБ of RAM
Graphics Processor: AMD Radeon RX 6700 XT

Software information

- Gamescope version: 3.15.9.r22.g37a348be-1
- Gamescope launch command(s): `gamescope --mangoapp --hdr-enabled -w 2560 -h 1440 -W 2560 -H 1440 -f --force-grab-cursor --`

Which gamescope backends have the issue you are reporting?

  • Wayland (default for nested gamescope)
  • DRM (default for embedded gamescope, i.e. gamescope-session)
  • SDL
  • OpenVR

Logging, screenshots, or anything else

No response

@matte-schwartz
Copy link

Someone reported this for Stalker 2 but it worked on my machine when I tried to get it to happen. does it happen in any other particular games?

@OlegAckbar
Copy link
Author

I also had this problem in Stalker 2, but now I can't reproduce it. This also was happening in Deus Ex: Revision. I guess it only happens under some condition which is yet to be found.

@OlegAckbar
Copy link
Author

Someone encountered same problem on reddit: https://www.reddit.com/r/linux_gaming/comments/1gxn5fr/wine_wayland_woes/

@NoXPhasma
Copy link

This seems to be related to the numpad. When I turn off the numpad, the F key won't toggle fullscreen anymore.

@byndthgrve
Copy link

Turning off num-lock also solved the issue for me as well. While running gamescope and num-lock enabled, the "F" key would toggle fullscreen. I also had other keys that would be unusable such as "S" and "O". If not using gamescope and num-lock was enabled. All keys worked normally.

@matte-schwartz
Copy link

Is everyone experiencing this using Plasma, or has it happened to anyone on other DEs as well?

@byndthgrve
Copy link

I'm on Plasma 6.2.3.

@matte-schwartz
Copy link

matte-schwartz commented Nov 26, 2024

I'm on Plasma 6.2.3 on Arch and have run into the issue as well.

Initially I was trying to look for some trigger for it happening, like launching gamescope from the Steam launch options or some other program interfering, but I had it happen immediately after a reboot without Steam autostarting, simply with gamescope -f -- vkcube. I rebooted again to see if I could still reproduce the issue afterwards, but on that boot cycle the hotkeys were working perfectly again under identical circumstances.

Unless I hear otherwise, it makes me wonder if we're hitting a bug somewhere else in Plasma that's being expressed by gamescope's hotkey usage tbh. Probably won't have time to look into it myself for a few days but I do think getting some input logs out of KDE would be good to see if they line up with what I see in Gamescope when I add logging for when various "Meta + [x]" functions get called within gamescope.

EDIT: interesting... libinput debug-events look identical for when it's working correctly and not correctly

@jbellionjourdan
Copy link

Same issue here in several games.

This seems to be indeed a gamescope bug; it appears in several games i have tested and immediately vanishes when launching the same games without gamescope.

Disabling numpad works too for me as a temporary workaround but this is not convenient, hope this gets a fix.

Let me know if i can help providing logs or testing stuff.

@matte-schwartz
Copy link

@jbellionjourdan which desktop environment/session type?

~
❯ echo $XDG_CURRENT_DESKTOP 
KDE

~
❯ echo $XDG_SESSION_TYPE
wayland

@jbellionjourdan
Copy link

Wayland, KDE Plasma 6.

On Garuda linux (arch).

@matte-schwartz
Copy link

I spent around 20 minutes trying to reproduce the issue on Gnome (Wayland) but I was unable to, so I'm leaning towards this being some bug between KDE and gamescope. I will look for any related reports about hotkey issues on KDE's bug tracker and file a new issue if I don't find any.

@jbellionjourdan
Copy link

jbellionjourdan commented Dec 4, 2024

Yeah might be.

On my side it's pretty straightforward to reproduce, if numlock is on then gamescope shortcuts behave as if meta were always pressed.
If i turn off numlock then everything acts as normal (except the numpad, obviously).

Don't need to restart the game either, just pressing the numlock key instantly toggles the issue on and off.

@matte-schwartz
Copy link

matte-schwartz commented Dec 4, 2024

I see the issue with gamescope -- vkcube on KDE, just trying to narrow down sources.

@matte-schwartz
Copy link

For now I've reported the issue here: https://bugs.kde.org/show_bug.cgi?id=497050

I want to keep testing Gnome for a bit just to double-check that the issue really never happens there.

@naxil
Copy link

naxil commented Dec 7, 2024

yes KDE here same problem.. shorcuts not work on latest gamescope

matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Dec 15, 2024
…kend

Per Wayland protocol specsheet regarding keymapping:
"From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the
recipient, as MAP_SHARED may fail."

This matches up exactly with what we're seeing with this error:
[gamescope] [Error] xdg_backend: Failed to map keymap fd.

Changing MAP_SHARED to MAP_PRIVATE per the spec addresses this error.

Fixes: ValveSoftware#1658
(hopefully) fixes: ValveSoftware#1637
matte-schwartz added a commit to matte-schwartz/gamescope that referenced this issue Dec 15, 2024
Per Wayland protocol specsheet regarding keymapping:
"From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the
recipient, as MAP_SHARED may fail."

This matches up exactly with what we're seeing with this error:
[gamescope] [Error] xdg_backend: Failed to map keymap fd.

Changing MAP_SHARED to MAP_PRIVATE per the spec addresses this error.

Fixes: ValveSoftware#1658
(hopefully) fixes: ValveSoftware#1637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants