Introduction
This article aims to provide a solution to an issue where Wine games on Linux kernel 5.15 automatically change the screen resolution and ask the user to accept the default resolution. We will explore the reasons behind this behavior and discuss possible workarounds.
Background
Wine is a compatibility layer that allows running Windows applications on Linux and other Unix-like operating systems. It emulates the Windows API and provides a compatibility layer for running Windows executables. Wine has been around for decades and has become a popular choice for running Windows games on Linux.
Linux kernel 5.15 is the latest stable release of the Linux kernel as of February 2023. It brings several new features and improvements, including better support for Wayland and improved graphics performance. However, some users have reported an issue where Wine games automatically change the screen resolution and ask the user to accept the default resolution.
Cause
The root cause of this issue is a change in the Linux kernel's graphics stack that affects Wine's ability to correctly handle screen resolutions. Specifically, the change affects the way Wine communicates with the graphics driver to set the screen resolution.
When running a Wine game on Linux kernel 5.15, the game may request a screen resolution that is not supported by the graphics driver or the display. In such cases, the graphics driver may automatically adjust the screen resolution to the nearest supported value. Wine, however, may not be aware of this change and may continue to request the original resolution, leading to a loop where the screen resolution keeps changing.
Solution
There are a few workarounds to this issue:
-
Set the screen resolution manually before running the Wine game:You can set the screen resolution manually using the display settings in your Linux desktop environment or the terminal. For example, on Ubuntu, you can use the
xrandrcommand to set the screen resolution:xrandr --output VGA1 --mode 1366x768 -
Use a compatibility layer like Proton:Proton is a compatibility layer developed by Valve Corporation that is designed to improve the performance and compatibility of Wine games on Linux. Proton includes various optimizations and improvements that can help resolve screen resolution issues. To use Proton, you need to install it through the Steam client and then run the game through Steam.
-
Update the graphics driver:Sometimes, outdated graphics drivers can cause compatibility issues with Wine games. Updating the graphics driver to the latest version can help resolve the screen resolution issue.
In this article, we explored the issue where Wine games on Linux kernel 5.15 automatically change the screen resolution and discussed possible workarounds. We covered the cause of the issue and provided a few solutions, including setting the screen resolution manually, using a compatibility layer like Proton, and updating the graphics driver.