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:

Has this error been rectified?

Continuing the discussion from System variable detection causing game confusion:

you should be able to specify the string’s value of the check to match the exact system you are on, if steam machine:

s_deviceModelContainsValve = SystemInfo.deviceModel.Contain("Fremont (Valve)");

please note the " " ^ above may throw a syntax error and require moving, the "quote is to prevent the compositor from reading the open and close parenthesis as its unique assigned variable in bash. you can also use \'s in replacement for your delemeters.

edit 1)

an easier way should just be assigning your own environment variable to the steam machine for the hardware to detect by itself with ini formatting in your .profile equivalent file of your $USER directory

I appreciate the manual fix, but I don’t think it should be necessary for us to have to alter our devices for something the developers can rectify in what appears to be a couple lines of code.

I’ll continue patiently waiting as best I can.

no doubt! im sure it’s coming

but its always fun to puzzle stuff out like this yourself too if its your cup of tea