[XWayland][GLX] Euro Truck Simulator 2, American Truck Simulator: OpenGL doesn't work with Wine on Wayland
Euro Truck Simulator 2 and American Truck Simulator (Windows version) don't start with Wine/Proton when OpenGL backend is specified (using -rdevice gl
game option).
This happens only on Wayland sessions: It works on X11 sessions.
The game log (game.log.txt
) says that wglChoosePixelFormatARB()
failed to choose reasonable pixel format:
00:00:10.725 : American Truck Simulator init ver.1.42.1.9s (rev. 2c4ee2b5f423)
...
00:00:05.046 : <ERROR> [gl] wglChoosePixelFormatARB failed on pixelformat selection, continuing using fallback method
00:00:05.046 : <ERROR> [gl] Failed to choose reasonable pixelformat.
00:00:05.046 : <ERROR> [gfx] failed to initialize device! (OpenGL)
When this happens, Wine/Proton prints:
warn:wgl:X11DRV_wglChoosePixelFormatARB Compatible Pixel Format not found
The function X11DRV_wglChoosePixelFormatARB()
calls glXChooseFBConfig()
(See https://github.com/wine-mirror/wine/blob/master/dlls/winex11.drv/opengl.c) and fails only when XWayland is used.
- XWayland: 21.1.2
- Proton: 6.3-7
- glxinfo (XWayland)
- glxinfo (X11)