Mesa breaking Mono games?

I have a very interesting problem related to Vintage Story — being the only game I have which uses it — where anything past version 23.0.3-1 is causing the game to cease function when window loses focus in any way, or when I toggle full screen.

Is anybody else having this trouble? Lenovo IdeaPad S340-15API for those wondering about my hardware in question.

So I found out the problem isn’t happening for people with Intel graphics. Just my luck it probably has a hardware-specific issue.

Here’s my inxi:

System:
  Kernel: 6.3.5-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-linux
    root=UUID=bdd89610-94b0-456e-b66c-c0de072fb2f3 rw nowatchdog nvme_load=YES
    loglevel=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 vt: 7 dm: LightDM v: 1.32.0 Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 81NC v: Lenovo IdeaPad S340-15API
    serial: <superuser required> Chassis: type: 10 v: Lenovo IdeaPad S340-15API
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN
    serial: <superuser required> UEFI: LENOVO v: AMCN29WW(V1.12) date: 01/27/2021
Battery:
  ID-1: BAT1 charge: 50.3 Wh (94.9%) condition: 53.0/52.5 Wh (101.0%)
    volts: 12.5 min: 11.3 model: 0x4C 0x47 0x43 0x00 0x32 0x30 0x31 0x38 0x4C
    0x31 0x38 0x33 0x50 0x46 type: Li-ion serial: <filter> status: not charging
    cycles: 24
  Device-1: hid-77:12:23:15:03:7f-battery model: Anker A7726 serial: N/A
    charge: N/A status: discharging
  Device-2: ps-controller-battery-88:03:4c:5c:2e:ca model: N/A serial: N/A
    charge: N/A status: full
CPU:
  Info: model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx bits: 64
    type: MT MCP arch: Zen/Zen+ note: check gen: 1 level: v3 note: check
    built: 2019 process: GF 12nm family: 0x17 (23) model-id: 0x18 (24)
    stepping: 1 microcode: 0x8108109
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 384 KiB desc: d-4x32 KiB; i-4x64 KiB L2: 2 MiB desc: 4x512 KiB L3: 4 MiB
    desc: 1x4 MiB
  Speed (MHz): avg: 1461 high: 2100 min/max: 1400/2100 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1367 2: 1400
    3: 1400 4: 1400 5: 1223 6: 1400 7: 2100 8: 1400 bogomips: 33550
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT vulnerable
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series]
    vendor: Lenovo driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 03:00.0 chip-ID: 1002:15d8
    class-ID: 0300 temp: 59.0 C
  Device-2: IMC Networks Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4:6 chip-ID: 13d3:56b2
    class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.8 compositor: xfwm v: 4.18.0 driver: X:
    loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1440x810 s-dpi: 96 s-size: 380x213mm (14.96x8.39")
    s-diag: 436mm (17.15")
  Monitor-1: eDP-1 mapped: eDP model: ChiMei InnoLux 0x15f5 built: 2017
    res: 1440x810 hz: 60 dpi: 106 gamma: 1.2 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: AMD Radeon Vega 8 Graphics (raven
    LLVM 15.0.7 DRM 3.52 6.3.5-arch1-1) direct-render: Yes
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 03:00.1 chip-ID: 1002:15de class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_pci_acp3x v: kernel alternate: snd_rn_pci_acp3x, snd_pci_acp5x,
    snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps,
    snd_sof_amd_renoir, snd_sof_amd_rembrandt pcie: gen: 3 speed: 8 GT/s
    lanes: 16 bus-ID: 03:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 03:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  Device-4: Sony DualSense wireless controller (PS5)
    driver: playstation,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-2.4.3:10 chip-ID: 054c:0ce6 class-ID: 0300
  API: ALSA v: k6.3.5-arch1-1 status: kernel-api
    tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.71 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
    vendor: Lenovo driver: ath10k_pci v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 bus-ID: 02:00.0 chip-ID: 168c:0042 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  Device-2: Sony DualSense wireless controller (PS5)
    driver: playstation,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-2.4.3:10 chip-ID: 054c:0ce6 class-ID: 0300
Bluetooth:
  Device-1: Qualcomm Atheros driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 3-2:2 chip-ID: 0cf3:e500
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
  Local Storage: total: 942.71 GiB used: 593.21 GiB (62.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10SPZX-24Z10
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 5400 serial: <filter> fw-rev: 1A04 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: DataTraveler 2.0
    size: 3.74 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 2.0
    spd: 480 Mb/s lanes: 1 mode: 2.0 tech: N/A serial: <filter> fw-rev: 1.00
    scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  ID-3: /dev/sdc maj-min: 8:32 vendor: SanDisk model: Cruzer size: 7.45 GiB
    block-size: physical: 512 B logical: 512 B type: USB rev: 2.0 spd: 480 Mb/s
    lanes: 1 mode: 2.0 tech: N/A serial: <filter> fw-rev: 1.18 scheme: GPT
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 32 GiB size: 31.2 GiB (97.50%) used: 15.26 GiB (48.9%)
    fs: ext4 dev: /dev/sda7 maj-min: 8:7
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 25.3 MiB (26.4%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 32 GiB size: 31.33 GiB (97.89%)
    used: 12.29 GiB (39.2%) fs: ext4 dev: /dev/sda8 maj-min: 8:8
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda6 maj-min: 8:6
Sensors:
  System Temperatures: cpu: 57.9 C mobo: N/A gpu: amdgpu temp: 57.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 287 Uptime: 6h 42m wakeups: 4 Memory: available: 5.73 GiB
  used: 2.53 GiB (44.1%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 13.1.1 Packages: pm: pacman pkgs: 1004
  libs: 279 tools: pamac,yay Shell: Bash v: 5.1.16 running-in: terminator
  inxi: 3.3.27

You can attempt to use gamescope and run the game through it, I don’t think it sends any focus events to the game after it started running even if you will switch gamescope’s window focus.

You can do something like gamescope -f -w 1920 -h 1080 – %command% then it will start in fullscreen 1080p.

I am not a fan of this solution. This was not a problem until 23.1.0-1. Sommething happened between 23.0.3 and 23.1.0. But because this isn’t a game-breaking issue for everybody like the Steam xlip issue was, it’s receiving neat-to-nothing for attention.

What’s not happy with my AMD hardware in the mesa package? This isn’t a “Spacebar heater” issue, this is legitimately making it impossible to use the content I legally paid for because the game gets broken the moment I go full-screen or switch windows. This is going to happen for everybody who fulfills the hardware requirements for reproducing the problem.

Do you run the game via Steam?
If yes, please try to use Proton Experimental Bleeding Edge.

Recently there were changes in dxvk regarding alt-tabbing and fullscreen issues.

Maybe your issue is fixed.