detect-gpu icon indicating copy to clipboard operation
detect-gpu copied to clipboard

Safari desktop always returns Tier 1 apple gpu

Open connorward93 opened this issue 2 years ago • 5 comments

Using Safari on a desktop machine always returns the following:

{ 
  device: undefined,
  fps: undefined,
  gpu: "apple gpu",
  isMobile: false,
  tier: 1,
  type: "FALLBACK"
}

Tested on a 2015 MBP and a 2020 MBP (M1).

connorward93 avatar Jan 20 '23 14:01 connorward93

Seeing this as well on a M1 Mac

robertlong avatar Mar 01 '23 01:03 robertlong

At some point this started to happen for me as well. Maybe Apple made it more complicated to retrieve GPU information.

filipinascimento avatar Apr 06 '23 19:04 filipinascimento

I've also been seeing this issue on my M1 Mac

sam-bunger avatar Apr 08 '23 22:04 sam-bunger

I prefer to solve the problem with code like the one below.

const isMacARM = async () => {
  try {
    const agentData = await navigator.userAgentData.getHighEntropyValues([
      "architecture",
    ]);
    return agentData.platform === "macOS" && agentData.architecture === "arm";
  } catch (e) {
    return false;
  }
};

hmmhmmhm avatar Apr 12 '23 00:04 hmmhmmhm

I prefer to solve the problem with code like the one below.

const isMacARM = async () => {
  try {
    const agentData = await navigator.userAgentData.getHighEntropyValues([
      "architecture",
    ]);
    return agentData.platform === "macOS" && agentData.architecture === "arm";
  } catch (e) {
    return false;
  }
};

This does not work on Safari M2.

katiasmet-93 avatar Oct 31 '23 08:10 katiasmet-93