bottom icon indicating copy to clipboard operation
bottom copied to clipboard

macOS M1 support

Open ClementTsang opened this issue 4 years ago • 7 comments

Describe the feature request

What is the feature of interest? Be clear and concise.

Adding support for the M1 processor is a good idea, especially if/when it becomes a tier-1 target and has better tooling to work around it.

Currently I can't exactly test for these, or need to wait for upstream support on libraries I rely on, though.

Currently not working on M1:

  • Temperatures: See https://github.com/ClementTsang/bottom/issues/371#issuecomment-753527248

ClementTsang avatar Jan 02 '21 21:01 ClementTsang

We're 1 year later, any plans on adding support for this? Would be much appreciated! Sadly enough I do not have any relevant experience to look into it myself.

wouterds avatar Jan 17 '22 15:01 wouterds

Unfortunately I don't have the hardware to develop this at the moment.

ClementTsang avatar Jan 17 '22 16:01 ClementTsang

I'd love to contribute this feature if you can offer some guidelines on how to approach it.

zannis avatar Feb 03 '22 09:02 zannis

Main thing is the data collection and testing. Normally I rely on other crates to do this and just extract the relevant data, but:

  1. The main two data libraries I use don't fully support macOS M1 as far as I'm aware.
  2. I can't test if any implementation of M1 data collection actually works, nor can I verify that my usage of any library for M1 works.

TBH the best course of action would be contributing upstream to sysinfo because that would kill two birds with one stone (as it's also stuck on the same problem I have, lack of hardware, and I think that getting M1 support there would help the most people), but I see you're already looking there, so I don't think I need to say much more in regards to that. If that's fully supported then I can just reuse my existing code and just make sure its also used when compiling for M1.

Then, the only other thing I need is someone to be able to test bottom on an M1 just to verify everything works.

For what it's worth, I do plan on buying M1 hardware myself after I graduate, but that's going to take a few months so if you would like to tackle this now I would be very grateful.

EDIT: also not sure if there will be issued with the battery crate regarding m1 support, but that might require a fork entirely as the dev seems a bit busy the last time I checked.

ClementTsang avatar Feb 03 '22 11:02 ClementTsang

Any news on this? Have the relevant third-party libs already been updated with support for Apple silicon? Cheers

wouterds avatar Jul 17 '22 23:07 wouterds

Sorry, been busy with a bunch of IRL stuff so activity on this application has been unfortunately somewhat slow (about to move to another country for work).

Putting that aside though, at a glance, I think(?) most things should(?) work fine after I move stuff over to sysinfo fully, barring some known stuff like temperature (see https://github.com/GuillaumeGomez/sysinfo/issues/456) - however, it seems like a PR came up recently!

Other than that it's really just having some M1 hardware on hand to actually test if these things work. I'm planning on buying an M1/M2 laptop after I move though so that would probably help in that regard.

ClementTsang avatar Jul 18 '22 07:07 ClementTsang

Just as a follow-up, I recently tested on an m1 max and can confirm that aside from the temperature sensors, things seem to work fine at first glance.

If it all looks good after more testing I might move the temperature thing to a separate issue and document that m1 at the very least should work fine and is unofficially supported with the temperature caveat (as well as any other issues I might find).

ClementTsang avatar Aug 09 '22 14:08 ClementTsang

More follow-up: sysinfo 0.25.3 supports m1 temperatures! However, it has a segfault issue, so I'll wait till that's fixed before moving to it.

ClementTsang avatar Aug 23 '22 17:08 ClementTsang

Awesome, looking forward! 🙌

On 23 Aug 2022, at 19:36, Clement Tsang @.***> wrote:

More follow-up: sysinfo 0.25.3 supports m1 temperatures! However, it has a segfault issue, so I'll wait till that's fixed before moving to it.

— Reply to this email directly, view it on GitHub https://github.com/ClementTsang/bottom/issues/382#issuecomment-1224427284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJHSBDQ6FSEGR7DH54GHYTV2UD2FANCNFSM4VRLBB7A. You are receiving this because you commented.

wouterds avatar Aug 23 '22 17:08 wouterds

Fwiw I came across this thing if it could you help find some learnings https://github.com/tlkh/asitop

wouterds avatar Aug 23 '22 19:08 wouterds

Any plans on supporting the temperature sensors on Apple Silicon?

Screen Shot 2022-09-16 at 10 50 29

wouterds avatar Sep 16 '22 08:09 wouterds

Any plans on supporting the temperature sensors on Apple Silicon?

Speak of the devil, I actually just merged https://github.com/ClementTsang/bottom/pull/806 which should mean temperature works now on M1 (at least, it does on my M1 MBP).

image

ClementTsang avatar Sep 16 '22 09:09 ClementTsang