igo95862 / bubblejail

Bubblewrap based sandboxing for desktop applications
261 stars 17 forks source link

bubblejail and gamescope #128

Closed odomingao closed 2 months ago

odomingao commented 2 months ago

Output of bubblejail --version

0.9.2

Your distro name and version

Arch

Description

gamescope doesn't launch inside the sandbox (foot):

[user@host ~]$ gamescope
[gamescope] [Info]  console: gamescope version 3.15.5
No CAP_SYS_NICE, falling back to regular-priority compute and threads.
Performance will be affected.

(gamescope:13): dbind-WARNING **: 15:38:55.566: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
ATTENTION: default value of option vk_khr_present_wait overridden by environment.
WARNING: radv is not a conformant Vulkan implementation, testing use only.
[gamescope] [Info]  vulkan: selecting physical device 'AMD Radeon R7 360 Series (RADV BONAIRE)': queue family 1 (general queue family 0)
[gamescope] [Info]  vulkan: physical device does not support DRM format modifiers
[gamescope] [Info]  wlserver: [backend/headless/backend.c:67] Creating headless backend
[gamescope] [Info]  xdg_backend: Seat name: Hyprland
[gamescope] [Info]  vulkan: supported DRM formats for sampling usage:
[gamescope] [Info]  vulkan:   AR24 (0x34325241)
[gamescope] [Info]  vulkan:   XR24 (0x34325258)
[gamescope] [Info]  vulkan:   AB24 (0x34324241)
[gamescope] [Info]  vulkan:   XB24 (0x34324258)
[gamescope] [Info]  vulkan:   RG16 (0x36314752)
[gamescope] [Info]  vulkan:   NV12 (0x3231564E)
[gamescope] [Info]  vulkan:   AB4H (0x48344241)
[gamescope] [Info]  vulkan:   XB4H (0x48344258)
[gamescope] [Info]  vulkan:   AB48 (0x38344241)
[gamescope] [Info]  vulkan:   XB48 (0x38344258)
[gamescope] [Info]  vulkan:   AB30 (0x30334241)
[gamescope] [Info]  vulkan:   XB30 (0x30334258)
[gamescope] [Info]  vulkan:   AR30 (0x30335241)
[gamescope] [Info]  vulkan:   XR30 (0x30335258)
[gamescope] [Info]  wlserver: Using explicit sync when available
[gamescope] [Info]  wlserver: Running compositor on wayland display 'gamescope-0'
[gamescope] [Info]  wlserver: [backend/headless/backend.c:17] Starting headless backend
[gamescope] [Info]  wlserver: Successfully initialized libei for input emulation!
[gamescope] [Error] wlserver: [xwayland/sockets.c:64] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use
[gamescope] [Info]  wlserver: [xwayland/server.c:107] Starting Xwayland on :1
sh: line 1: /usr/bin/xkbcomp: Operation not permitted
sh: line 1: /usr/bin/xkbcomp: Operation not permitted
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE) 
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE) 
[gamescope] [Error] wlserver: [xwayland/server.c:269] Xwayland startup failed, not setting up xwm

Outside of the sandbox, it seems to work fine (no errors). This bubble has [wayland] and [x11] permissions, as well as [direct_rendering].

igo95862 commented 2 months ago

Hello @odomingao

I tested it on my machine by running the gamescope -- glxgears command inside sandbox and it seems to work fine.

It did also print some warnings about xkbcomp but it seems to run fine anyway:

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
odomingao commented 2 months ago

Hmmm. This also only seems to happen with the system version of gamescope (arch package). I tested with Bottles and Steam and their gamescope works, but launching gamescope directly doesn't.

odomingao commented 2 months ago

My bad, this was an issue with apparmor.