aleksilassila / uebersicht-fetch

Shows stats such as system, network and weather information on your desktop. Requires Übersicht.
12 stars 3 forks source link

OS line displays wrong OS arch for Apple Silicon. #4

Closed corbin-r closed 3 years ago

corbin-r commented 3 years ago

I have an M1 MacBook Air and I noticed that the OS displays the wrong architecture for Apple Silicon. Now I've found this is very odd as in runOnce.sh it collects the architecture via calling $(uname -m) now when I run this in my terminal it does return the proper architecture:

╭─cr@cr-mba ~/git-repos/uebersicht-fetch ‹main› 
╰─$ uname -m
arm64

But when it runs inside Ubersicht it displays x86_64(Intel) and not arm64(Apple Silicon). I currently haven't found a fix for this, I'm currently working on a fix and will update this issue when I make some progress.

Screen Shot 2021-07-19 at 22 11 15

aleksilassila commented 3 years ago

I don't have M1 myself so I can't test this, but if you figure it out let me know

corbin-r commented 3 years ago

@aleksilassila my latest commit to #3 fixes this issue. 😄 It appears that Übersicht runs on top of Rosetta 2 and uname -m doesn't detect that properly so you have to dig into sysctl.proc_translated to get the status of if the current process is running through Rosetta. Little weird but it works fine now.

aleksilassila commented 3 years ago

Merged #3