Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the second AMD APU code value to Steam Deck detection #3434

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/backend/utils/systeminfo/steamDeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ type SteamDeckInfo =
| { isDeck: false; model?: undefined }

function getSteamDeckInfo(cpus: CpuInfo[], gpus: GPUInfo[]): SteamDeckInfo {
if (cpus[0]?.model !== 'AMD Custom APU 0405') return { isDeck: false }
if (
cpus[0]?.model !== 'AMD Custom APU 0405' &&
cpus[0]?.model !== 'AMD Custom APU 0932'
)
return { isDeck: false }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm checking on my steamdeck and it looks like we have a HOSTNAME env variable with the value steamdeck, maybe we can just use that info for this instead? I imagine it's more future proof

what do you think @CommandMC ?

We have other variables like:

HOME=/home/deck
LOGNAME=deck

and many env variables including /home/deck or steamdeck

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOSTNAME is changable from the steam ui itself and I haven't checked how multi users are handled on the deck (may have different HOME?).

Problem I see with the environment variables is that anyone running steamos image on their machine would have the same set, and hardware ID is harder to spoof. (If someone did it, then he had his purpose)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked how multi users are handled on the deck

As far as I can tell, they aren't, you're always the deck user account

Regardless, I agree, we should only look at things definitively proving we're on the Steam Deck hardware, not just SteamOS or something that's very similar to what the Deck might look like


const primaryGpu = gpus.at(0)
if (!primaryGpu || primaryGpu.vendorId !== '1002') return { isDeck: false }
Expand Down