Note: This is an upstream bug reported to Wine as well (#52831). I am reporting this Issue here as well in hopes of requesting Valve's assistance as this bug affects the Steam Deck particularly. Sample code and possible root cause analysis are both available in the ticket on Wine's side.
Currently, the Steam Deck appears to have an incompatibility with Wine 7.6's implementation of Kernel32's GetSystemPowerStatus API call. The Steam Deck exposes its battery information at BAT1 and its AC line status at ACAD in /sys/class/power_supply:
(deck@okami ~)$ ls /sys/class/power_supply/
ACAD BAT1
Wine (and Proton, for that matter) only read battery information from /sys/class/power_supply/AC and /sys/class/power_supply/BAT0. This causes requests to GetSystemPowerStatus to return invalid or incomplete data.
Certain games make use of this API to determine if the device is running on battery to display heads-up notifications to users or to change graphical/power settings on-the-fly (e.g. in response to low power events to preserve playtime). While titles that do this still (mostly) work under the Deck, this is a minor compatibility flaw with Wine/Proton that just happens to manifest most severely on the Deck given its battery-driven nature. Games that leverage battery-aware features would benefit from having this state exposed to them, especially on handheld gaming devices.
Note: This is an upstream bug reported to Wine as well (#52831). I am reporting this Issue here as well in hopes of requesting Valve's assistance as this bug affects the Steam Deck particularly. Sample code and possible root cause analysis are both available in the ticket on Wine's side.
Currently, the Steam Deck appears to have an incompatibility with Wine 7.6's implementation of Kernel32's
GetSystemPowerStatusAPI call. The Steam Deck exposes its battery information atBAT1and its AC line status atACADin/sys/class/power_supply:Wine (and Proton, for that matter) only read battery information from
/sys/class/power_supply/ACand/sys/class/power_supply/BAT0. This causes requests toGetSystemPowerStatusto return invalid or incomplete data.Certain games make use of this API to determine if the device is running on battery to display heads-up notifications to users or to change graphical/power settings on-the-fly (e.g. in response to low power events to preserve playtime). While titles that do this still (mostly) work under the Deck, this is a minor compatibility flaw with Wine/Proton that just happens to manifest most severely on the Deck given its battery-driven nature. Games that leverage battery-aware features would benefit from having this state exposed to them, especially on handheld gaming devices.