gamescope icon indicating copy to clipboard operation
gamescope copied to clipboard

‘LIBINPUT_SWITCH_KEYPAD_SLIDE’ not handled in switch

Open Sir-Ace-git opened this issue 8 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

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

  • [x] The issue occurs on upstream gamescope without any modifications

Current Behavior

Including the meson setup output, and compiler error:

root@comet:/usr/src/gamescope# meson setup build/ --wipe Build type: native build Project name: gamescope Project version: undefined C compiler for the host machine: /usr/bin/ccache cc (gcc 15.2.0 "cc (GCC) 15.2.0") C linker for the host machine: cc ld.bfd 2.46-slack151 C++ compiler for the host machine: /usr/bin/ccache c++ (gcc 15.2.0 "c++ (GCC) 15.2.0") C++ linker for the host machine: c++ ld.bfd 2.46-slack151 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C++ supports arguments -Wno-unused-parameter: YES Compiler for C++ supports arguments -Wno-missing-field-initializers: YES Compiler for C++ supports arguments -Wno-c99-designator: NO Compiler for C++ supports arguments -Wno-invalid-offsetof: YES Compiler for C++ supports arguments -Wno-unused-const-variable: YES Compiler for C++ supports arguments -Wno-volatile: YES Compiler for C++ supports arguments -Wno-deprecated-volatile: NO Compiler for C++ supports arguments -Wno-ignored-qualifiers: YES Compiler for C++ supports arguments -Wno-missing-braces: YES Compiler for C++ supports arguments -fno-exceptions: YES Compiler for C++ supports arguments -ffast-math: YES Found pkg-config: YES (/usr/bin/pkg-config) 2.5.1 Run-time dependency libpipewire-0.3 found: YES 1.6.1 Library rt found: YES Run-time dependency hwdata found: YES 0.405 Run-time dependency x11 found: YES 1.8.13 Run-time dependency wayland-client found: YES 1.24.0 Run-time dependency vulkan found: YES 1.4.341

Executing subproject glm

glm| Project name: glm glm| Project version: 1.0.1 glm| C++ compiler for the host machine: /usr/bin/ccache c++ (gcc 15.2.0 "c++ (GCC) 15.2.0") glm| C++ linker for the host machine: c++ ld.bfd 2.46-slack151 glm| Build targets in project: 0 glm| Subproject glm finished.

Executing subproject stb

stb| Project name: stb stb| Project version: 0.1.0 stb| C compiler for the host machine: /usr/bin/ccache cc (gcc 15.2.0 "cc (GCC) 15.2.0") stb| C linker for the host machine: cc ld.bfd 2.46-slack151 stb| Build targets in project: 0 stb| Subproject stb finished.

Run-time dependency openvr found: YES 2.12.14 Check usable header "vulkan/vulkan.h" with dependency vulkan: YES Build-time dependency wayland-scanner found: YES 1.24.0 Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner) Run-time dependency wayland-protocols found: YES 1.47 Looking for a fallback subproject for the dependency vkroots because: Use of fallback dependencies is forced.

Executing subproject vkroots

vkroots| Project name: vkroots vkroots| Project version: undefined vkroots| C++ compiler for the host machine: /usr/bin/ccache c++ (gcc 15.2.0 "c++ (GCC) 15.2.0") vkroots| C++ linker for the host machine: c++ ld.bfd 2.46-slack151 vkroots| Found pkg-config: YES (/usr/bin/pkg-config) 2.5.1 vkroots| Build targets in project: 66 vkroots| Subproject vkroots finished.

Dependency vkroots found: YES undefined (overridden) Run-time dependency xcb found: YES 1.17.0 Run-time dependency x11-xcb found: YES 1.8.13 Dependency wayland-client found: YES 1.24.0 (cached) Configuring VkLayer_FROG_gamescope_wsi.x86_64.json using configuration Run-time dependency xdamage found: YES 1.1.7 Run-time dependency xcomposite found: YES 0.4.7 Run-time dependency xcursor found: YES 1.2.3 Run-time dependency xrender found: YES 0.9.12 Run-time dependency xext found: YES 1.3.7 Run-time dependency xfixes found: YES 6.0.2 Run-time dependency xxf86vm found: YES 1.1.7 Run-time dependency xtst found: YES 1.2.5 Run-time dependency xres found: YES 1.2.3 Run-time dependency xmu found: YES 1.3.1 Run-time dependency xi found: YES 1.8.2 Run-time dependency libdrm found: YES 2.4.131 Run-time dependency libeis-1.0 found: YES 1.5.0 Run-time dependency wayland-server found: YES 1.24.0 Dependency wayland-protocols found: YES 1.47 (cached) Run-time dependency xkbcommon found: YES 1.13.1 Run-time dependency threads found: YES Run-time dependency libcap found: YES 2.77 Found CMake: /usr/bin/cmake (4.2.3) Run-time dependency epoll-shim found: NO (tried pkgconfig and cmake) Run-time dependency sdl2 found: YES 2.32.10 Run-time dependency libavif found: NO (tried pkgconfig and cmake) Run-time dependency pixman-1 found: YES 0.46.4 Run-time dependency libudev found: YES 251 Looking for a fallback subproject for the dependency wlroots-0.18 because: Use of fallback dependencies is forced.

Executing subproject wlroots

wlroots| Project name: wlroots wlroots| Project version: 0.18.0 wlroots| C compiler for the host machine: /usr/bin/ccache cc (gcc 15.2.0 "cc (GCC) 15.2.0") wlroots| C linker for the host machine: cc ld.bfd 2.46-slack151 wlroots| Compiler for C supports arguments -Wundef: YES wlroots| Compiler for C supports arguments -Wlogical-op: YES wlroots| Compiler for C supports arguments -Wmissing-include-dirs: YES wlroots| Compiler for C supports arguments -Wold-style-definition: YES wlroots| Compiler for C supports arguments -Wpointer-arith: YES wlroots| Compiler for C supports arguments -Winit-self: YES wlroots| Compiler for C supports arguments -Wstrict-prototypes: YES wlroots| Compiler for C supports arguments -Wimplicit-fallthrough=2: YES wlroots| Compiler for C supports arguments -Wendif-labels: YES wlroots| Compiler for C supports arguments -Wstrict-aliasing=2: YES wlroots| Compiler for C supports arguments -Woverflow: YES wlroots| Compiler for C supports arguments -Wmissing-prototypes: YES wlroots| Compiler for C supports arguments -Walloca: YES wlroots| Compiler for C supports arguments -Wno-missing-braces: YES wlroots| Compiler for C supports arguments -Wno-missing-field-initializers: YES wlroots| Compiler for C supports arguments -Wno-unused-parameter: YES wlroots| Compiler for C supports arguments -fmacro-prefix-map=/prefix/to/hide=: YES wlroots| Dependency wayland-server found: YES 1.24.0 (cached) wlroots| Dependency libdrm found: YES 2.4.131 (cached) wlroots| Dependency xkbcommon found: YES 1.13.1 (cached) wlroots| Dependency pixman-1 found: YES 0.46.4 (cached) wlroots| Library m found: YES wlroots| Library rt found: YES wlroots| Dependency wayland-protocols found: YES 1.47 (cached) wlroots| Dependency wayland-scanner found: YES 1.24.0 (cached) wlroots| Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner) wlroots| Has header "linux/dma-buf.h" : YES wlroots| Has header "sys/eventfd.h" : YES wlroots| Dependency pixman-1 found: YES 0.46.4 (cached) wlroots| Run-time dependency lcms2 found: YES 2.18 wlroots| Dependency libudev found: YES 251 (cached) wlroots| Run-time dependency libseat found: YES 0.9.3 wlroots| Run-time dependency libinput found: YES 1.31.0 wlroots| Dependency wayland-client found: YES 1.24.0 (cached) wlroots| Run-time dependency xwayland found: YES 24.1.9 wlroots| Dependency xcb found: YES 1.17.0 (cached) wlroots| Run-time dependency xcb-composite found: YES 1.17.0 wlroots| Run-time dependency xcb-ewmh found: YES 0.4.2 wlroots| Run-time dependency xcb-icccm found: YES 0.4.2 wlroots| Run-time dependency xcb-render found: YES 1.17.0 wlroots| Run-time dependency xcb-res found: YES 1.17.0 wlroots| Run-time dependency xcb-xfixes found: YES 1.17.0 wlroots| Run-time dependency xcb-errors found: YES 1.0.1 wlroots| Checking for function "xcb_xfixes_set_client_disconnect_mode" with dependencies xcb, xcb-composite, xcb-ewmh, xcb-icccm, xcb-render, xcb-res, xcb-xfixes, xcb-errors: YES wlroots| Configuring config.h using configuration wlroots| Configuring version.h using configuration wlroots| Configuring config.h using configuration wlroots| Build targets in project: 203 wlroots| Subproject wlroots finished.

Dependency wlroots-0.18 found: YES 0.18.0 (overridden) Run-time dependency libdisplay-info found: YES 0.3.0 Run-time dependency libdecor-0 found: YES 0.1.0 Program glslang found: YES (/usr/bin/glslang) Run-time dependency luajit found: YES 2.1.1765228720 Dependency libinput found: YES 1.31.0 (cached) Looking for a fallback subproject for the dependency libliftoff because: Use of fallback dependencies is forced.

Executing subproject libliftoff

libliftoff| Project name: libliftoff libliftoff| Project version: 0.5.0 libliftoff| C compiler for the host machine: /usr/bin/ccache cc (gcc 15.2.0 "cc (GCC) 15.2.0") libliftoff| C linker for the host machine: cc ld.bfd 2.46-slack151 libliftoff| Compiler for C supports arguments -Wundef: YES (cached) libliftoff| Compiler for C supports arguments -Wmissing-prototypes: YES (cached) libliftoff| Compiler for C supports arguments -Walloca: YES (cached) libliftoff| Compiler for C supports arguments -Wdeclaration-after-statement: YES libliftoff| Compiler for C supports arguments -Wfloat-conversion: YES libliftoff| Compiler for C supports arguments -Wsign-conversion: YES libliftoff| Compiler for C supports arguments -Wno-missing-braces: YES (cached) libliftoff| Compiler for C supports arguments -Wno-unused-parameter: YES (cached) libliftoff| Dependency libdrm found: YES 2.4.131 (cached) libliftoff| Build targets in project: 216 libliftoff| Subproject libliftoff finished.

Dependency libliftoff found: YES 0.5.0 (overridden) Configuring GamescopeVersion.h using configuration Run-time dependency benchmark found: NO (tried pkgconfig and cmake) Build targets in project: 223

wlroots 0.18.0 drm-backend : NO x11-backend : NO libinput-backend: YES xwayland : YES gles2-renderer : NO vulkan-renderer : NO gbm-allocator : NO session : YES color-management: YES xcb-errors : YES egl : NO libliftoff : NO

gamescope undefined

Subprojects glm : YES libliftoff: YES stb : YES vkroots : YES wlroots : YES

Found ninja-1.13.2 at /usr/bin/ninja

root@comet:/usr/src/gamescope# ninja -C build/ ninja: Entering directory `build/' [234/620] Compiling C object subprojects/wlroots/libwlroots-0.18.a.p/backend_libinput_switch.c.o FAILED: [code=1] subprojects/wlroots/libwlroots-0.18.a.p/backend_libinput_switch.c.o /usr/bin/ccache cc -Isubprojects/wlroots/libwlroots-0.18.a.p -Isubprojects/wlroots -I../subprojects/wlroots -Isubprojects/wlroots/include -I../subprojects/wlroots/include -Isubprojects/wlroots/protocol -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/elogind -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O0 -g -D_POSIX_C_SOURCE=200809L -DWLR_USE_UNSTABLE -DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../subprojects/wlroots/= -fPIC -MD -MQ subprojects/wlroots/libwlroots-0.18.a.p/backend_libinput_switch.c.o -MF subprojects/wlroots/libwlroots-0.18.a.p/backend_libinput_switch.c.o.d -o subprojects/wlroots/libwlroots-0.18.a.p/backend_libinput_switch.c.o -c ../subprojects/wlroots/backend/libinput/switch.c ../subprojects/wlroots/backend/libinput/switch.c: In function ‘handle_switch_toggle’: ../subprojects/wlroots/backend/libinput/switch.c:32:9: error: enumeration value ‘LIBINPUT_SWITCH_KEYPAD_SLIDE’ not handled in switch [-Werror=switch] 32 | switch (libinput_event_switch_get_switch(sevent)) { | ^~~~~~ cc1: all warnings being treated as errors [251/620] Compiling C object subprojects/wlroots/libwlroots-0.18.a.p/backend_wayland_output.c.o ninja: build stopped: subcommand failed.

Steps To Reproduce

git clone https://github.com/ValveSoftware/gamescope cd gamescope git submodule update --init meson setup build/ --wipe ninja -C build/

Hardware information

- Distro: Slackware x86_64
- CPU: AMD Ryzen 7 7800X3D 8-Core Processor
- GPU: Radeon VII (Vega 20)
- Driver Version: Mesa 26.0.2 (LLVM 22.1.1)

Software information

- Desktop environment: KDE 5.27.12
- Session type: 
- Gamescope version: N/A
- Gamescope launch command(s): N/A

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

Sir-Ace-git avatar Mar 14 '26 20:03 Sir-Ace-git

Looks like it is caused by libinput 1.31 https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/5261

back-porting the MR to wlroots solve the build issue.

I formatted the patch here.

git format-patch c1452d88114710f5772662b1d8efb9c71edaa34c~..3676ab4df0e7b31efd9c72f543fd8e6326af95cc --stdout > wlroots-5261.patch

https://gist.github.com/Billli11/d9e45819b87dbe82469fe2492492aff7

Apply with

git -C subprojects/wlroots/ apply -- wlroots-5261.patch

Billli11 avatar Mar 23 '26 19:03 Billli11

Sorry for my issue, I had somehow missed this one, @Billli11's code looks good to me if we can get misyltoad to accept this as a PR to fix the issue.

davidawesome02-backup avatar Mar 23 '26 22:03 davidawesome02-backup

I submitted misyltoad/wlroots#5 to cherry-pick the relevant two commits in the branch that's being used as a gamescope submodule.

oSoMoN avatar Apr 22 '26 09:04 oSoMoN