System variable detection causing game confusion

Hello good people on the internet.
As some of you already know, there has been an issue with the set of available resolution options in the game settings when playing on Linux.
The workaround for this issue was to simply use a launch option argument before starting the game(SteamDeck=0) which works alright for most systems, but there are still some that doesn’t receive the same treatment.

It seems like, apart from the SteamDeck variable detection, there’s an additional check being made by the game’s code.

The same issue happened on a brand new Steam Machine with SteamOS 3.8.
A user on Git was able to fix the issue by doing some claude coding. It basically edits some device metadata file in the il2cpp_data/ folder of the No Rest for the Wicked game. IL2CPP looks like some backend used by Unity, and in this particular case, used by the game’s runtime to detect the device model via a SystemInfo lib (?)
Both Steam deck and Steam Machine have names with (Valve) in them, which triggers the custom detection code in the game’s runtime to force handheld resolutions in the graphics options, which is wrong, and should not happen.

Proof that the issue was fixed after the above edits:

Here’s an AI generated summary of the root cause and how to fix it :

Environment

  • Hardware: Valve Steam Machine (Fremont, HawkPoint APU), SteamOS 3.8.x, Desktop Mode
  • Game: No Rest for the Wicked (appid 1371980), Unity 6000.1.15 IL2CPP, Proton
  • SystemInfo.deviceModel = Fremont (Valve)

Root cause

The IL2CPP metadata contains the handheld-detection fields:
s_deviceModelContainsValve
s_deviceModelContainsRogAlly
s_processorIsSteamDeckOledModel
IsRunningOnHandheld / RunningOnSteamDeck / m_isSteamDeck

and the comparison string literal is (Valve) (7 chars). The check is effectively:
s_deviceModelContainsValve = SystemInfo.deviceModel.Contains("(Valve)");

Steam Deck reports Jupiter (Valve) / Galileo (Valve)
Steam Machine reports Fremont (Valve)

All contain the (Valve) suffix, so the Steam Machine is misclassified as a handheld.

The game then re-applies handheld graphics defaults at runtime, overwriting any user setting (confirmed: it resets DeviceSettings to 1368×768, DRSEnabled=true, DRSTargetFPS=30, RenderScaleFSR=0.667 on the menu→game transition).

A potential hotfix should be considered for the currently available EA build, as it may also help with the proper functionality of 1.0 when it comes out.

Link to the original git page where the issue was discovered:

2 Likes