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

Apple Silicon M1 compatibility #453

Closed
41 of 43 tasks
sebhildebrandt opened this issue Dec 16, 2020 · 6 comments
Closed
41 of 43 tasks

Apple Silicon M1 compatibility #453

sebhildebrandt opened this issue Dec 16, 2020 · 6 comments
Labels
Apple Silicon Native Apple silicon support

Comments

@sebhildebrandt
Copy link
Owner

sebhildebrandt commented Dec 16, 2020

New Apple silicon hardware (M1) just arrived 👍
I already checked compatibility and made first fixes. Here I provide a list, what is already working and what still needs to be fixed.

All tests are done with native nodejs installation

  • node -v : v15.4.0
  • os.platform(): 'darwin'
  • os.arch(): 'arm64'

Installation

  • Installation

System

  • system
  • bios
  • baseboard
  • chassis

CPU

  • cpu -- detects M1 chip but speed was shown ... fixed
  • cpuFlags ... no flags shown which is ok.
  • cpuCache
  • cpuCurrentSpeed ⚠️ always showed 0.03 ... fixed (but always returns fixed values)
  • cpuTemperature 🛑 not working. osx-temperature-sensor package does not return correct values. Needs further investigation

Memory

  • mem
  • memLayout -- was empty ... fixed

Battery

  • battery

Graphics

  • graphics: !improvement possible: detects Apple M1 chip but vramDynamic should be true ... fixed
  • displays

Operating System

  • osInfo
  • uuid
  • versions
  • shell
  • users

Processes and Services

  • currentLoad
  • fullLoad
  • processes
  • services

File System

  • diskLayout
  • blockDevices
  • disksIO
  • fsSize
  • fsOpenFiles
  • fsStats

Network / Wifi

  • networkInterfaces
  • networkInterfaceDefault
  • networkGatewayDefault
  • networkStats
  • networkConnections
  • inetChecksite
  • inetLatency
  • wifiNetworks

Docker

Testet with Tech Preview of Docker Desktop for M1 (Dec. 16, 2020)

  • dockerInfo
  • dockerContainers
  • dockerContainerProcesses
  • dockerAll

Virtual Box

  • vboxInfo 🛑 Virtual Box is currently not available for Apple Silicon M1 ARM platform. Not expecting to be able to test this soon.

Current status of System Information version 4.31.0

@2911quocanh
Copy link

Hh

@2911quocanh
Copy link

New Apple silicon hardware (M1) just arrived 👍

I already checked compatibility and made first fixes. Here I provide a list, what is already working and what still needs to be fixed.

All tests are done with native nodejs installation

  • node -v : v15.4.0

  • os.platform(): 'darwin'

  • os.arch(): 'arm64'

Installation

  • Installation

System

  • system

  • bios

  • baseboard

  • chassis

CPU

  • cpu -- detects M1 chip but speed was shown ... fixed

  • cpuFlags ... no flags shown which is ok.

  • cpuCache

  • cpuCurrentSpeed ⚠️ always showed 0.03 ... fixed (but always returns fixed values)

  • cpuTemperature 🛑 not working. osx-temperature-sensor package does not return correct values. Needs further investigation

Memory

  • mem

  • memLayout -- was empty ... fixed

Battery

  • battery

Graphics

  • graphics: !improvement possible: detects Apple M1 chip but vramDynamic should be true ... fixed

  • displays

Operating System

  • osInfo

  • uuid

  • versions

  • shell

  • users

Processes and Services

  • currentLoad

  • fullLoad

  • processes

  • services

File System

  • diskLayout

  • blockDevices

  • disksIO

  • fsSize

  • fsOpenFiles

  • fsStats

Network / Wifi

  • networkInterfaces

  • networkInterfaceDefault

  • networkGatewayDefault

  • networkStats

  • networkConnections

  • inetChecksite

  • inetLatency

  • wifiNetworks

Docker

Testet with Tech Preview of Docker Desktop for M1 (Dec. 16, 2020)

  • dockerInfo

  • dockerContainers

  • dockerContainerProcesses

  • dockerAll

Virtual Box

  • vboxInfo 🛑 Virtual Box is currently not available for Apple Silicon M1 ARM platform. Not expecting to be able to test this soon.

Current status of System Information version 4.31.0

@sebhildebrandt sebhildebrandt unpinned this issue Mar 11, 2021
@LeeCheneler
Copy link

You're right osx-temperature-sensor doesn't seem to support M1 temperature sensors. This is because it uses SMC to obtain the values and SMC is not on M1 as its an Intel thing I believe.

I could obtain them using this https://github.com/fermion-star/apple_sensors. You need to compile and run it and then It returns the values of all temperature sensors as a stream to stdout. Looking at the implementation (2 files) might be useful in supporting M1 CPU temps.

@dehydratedpotato
Copy link

dehydratedpotato commented Nov 1, 2021

@LeeCheneler @sebhildebrandt Here's an easy way it can be done with a binary...

const path = require("path")
const binary = path.join(__dirname, '/path/to/binary')
const { exec } = require("child_process");

 // containing binary call in string in case your binary needs args, like the above linked one. It's args are v (for values) and n (for names), no hyphens.
exec(`${binary}`, (error, stdout, stderr) => {
        if (stdout) {
                console.log(stdout)  //  log the stdout here or do whatever formatting you need to apply to the output
        } else {
                console.log(stderr)
                console.log(error)
        }
})

The binary from this repo is a pretty good one. It uses a modified fermion-star/apple_sensors.

Just be aware that if you want to split the binary's dirty output into an array, say using (stdout).split("_"), the last item in the array will be NaN due to a side effect from a while loop containing printf("\n"); in the source code; so if you do format your output, you'll probably want to pop() the array.

👍

@dehydratedpotato
Copy link

dehydratedpotato commented Nov 1, 2021

Also, in the osx-temperature-sensor module -- if you want to keep pulling from SMC for Intels but use a different method for Apple Silicon, you could have an if statement to check the system arch using os.arch(). If it returns x64, use the traditional SMC method. Otherwise, if it gives arm64, we know it's Apple Silicon, so then use whatever other method to grab the temp sensor values.

@bubez81
Copy link

bubez81 commented Mar 18, 2024

hello! any news about the temperature problem in M1 or M2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apple Silicon Native Apple silicon support
Projects
None yet
Development

No branches or pull requests

5 participants