-
Notifications
You must be signed in to change notification settings - Fork 270
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
v1.6.2 crashes and quits in Macbook Air with M1 chip and Big Sur #235
Comments
Can you check if this one does work: https://github.com/raspberrypi/rpi-imager/releases/tag/v1.5 That did run on their developer transition kit. |
That version certainly worked before... Will ask Apple dev support what the "attachment of code code signature supplement failed: 1" message means exactly.
There do are other similar reports for other applications, e.g.: https://www.fantasygrounds.com/forums/showthread.php?68503-FGU-crashing |
Ok cool thank you for looking into this. Yes indeed I'm running 11.4. |
Yes, that may be helpful, as support said they cannot reproduce the issue on their side (with Imager v1.6.2 and OS X 11.3 and 11.4) And would also like any other logs that may be relevant (in "finder" -> "applications" -> utilities -> "console" you can find some. Can right click on say "system.log", and select "show in finder" to access file and copy). |
You know what, an idea came to my mind. I think i did not install rosetta 2, maybe i skipped it when i got the prompt one day, dont remember. But i installed now manually and then re-installed the imager and voila, it works! maybe its somehow related... |
On a related note, we are seeing a similar problem with one the most popular applications we use for Internet-in-a-Box, kiwix-serve, on Macs with an M1 chip. We've tested with a number of VMs on the M1 Mac and can't get kiwix-serve to start on Ubuntu 20.04 ARM64: iiab/iiab#3039 |
Does anybody know how complicated it would be to recompile Raspberry Pi Imager for M1 Mac CPU's ? |
Recall M1 is only officially supported on Qt version 6, and we use 5 currently. No idea how well Imager compiles against Qt 6. Question do would be, what would you gain by building natively for M1? |
@maxnet wrote:
I did not know that! Which kind of emulation is recommended on M1 Macs to allow Raspberry Pi Imager to run, if you know? |
Rosetta 2 You should be prompted for installation automatically on first Imager use, but if you accidentally declined there is a report it does not ask again. |
Rosetta can be manually installed (if you declined earlier) from terminal with:
Video instructions: https://www.youtube.com/watch?v=fQ0xVOVmiLs |
@maxnet THANK YOU SO MUCH!!!!! That worked. 🎉 |
Manually install rosetta for M1 Macs to provide compatability. Thank you @maxnet! |
Does anybody know why the above sometimes runs 100X more slowly to flash microSD cards? The result is that Rosetta 2 on an M1 Mac somehow causes Raspberry Pi Imager to take many hours to flash a simple image to a microSD card. As @avni (above) has confirmed. This painfully intermittent pattern is baffling. Does anybody have suggestions for how to monitor/resolve intermittent bugs like this? |
Did you test that with the exact same USB SD card reader and SD card as on an Intel Mac? While I do not have any production M1 gear to test on, when I borrowed Apple pre-release hardware earlier, it used to run at around same speed as on Intel. And you mention sometimes. Does it matter if the image is being downloaded from the Internet, or are you using locally stored ones? And you do are comparing the speed between Mac OS on Intel and on M1, right?
Tested what way exactly? I don't know what column is CPU usage in the partial screenshot in the post above (is it 4,20% ?), but since none is anywhere near 100%, I don't think it is short on processing power. |
Yes. Sometimes it runs full speed. Other times (with the very same .img.zip), the writing-to-microSD phase runs at a glacial pace (about 100X more slowly than it should, on any other machine) taking many hours to complete. Almost as if the underlying (In any case, Baffling Indeed: one of those very annoying intermittent bugs that are hard to diagnose for sure!)
Good question. I'll ask @avni if she has time in the coming week to try to monitor & try to better understand this painfully unpredictable 😖 pattern! |
@avni can hopefully clarify the exact make & model of the SD card reader she used, as she struggled to understand why on earth this was happening (over the past 2+ weeks). It's extremely time-consuming to test over many hours. (So if there are other ways to help her debug this more efficiently, she would greatly appreciate that!) |
I am afraid there is no easy way to pinpoint problems like that. Naturally, you do can use standard unix tools like "iostat" on the terminal to show at what speed it is writing to card exactly. As for what write speed is being normal:
On an Intel Mac Mini if you let "iostat 10" print out the average speed over the last 10 seconds, it shows read/write speeds between 61 and 65 MB/sec
That is slightly slower than Imager on Linux where the same card writes at a more steady 66 MB/sec.
And verifies at 86 MB/sec.
Also if you start Imager from the command-line, it will print to console the number of seconds it took to write the image.
Again, if it is slower in your case, I am afraid that will only confirm that things are slow, but not tell you why it is slow.... |
@maxnet those debugging suggestions are incredibly helpful, Thank You !! Somehow this will be solved in coming months... |
If you really believe the issues are caused by the emulation (which I have my doubts about), here is a native build, you can try.
But I have NOT tested if it actually runs at all on arm64, as I do not have M1 gear...
|
Please give a Nobel Prize to @maxnet so https://Internet-in-a-Box.org installs (and similar school/clinic grassroots empowerment) can accelerate across the developing world. I do not ask why all the Fancy Pants people professing to fight poverty have the fanciest M1 computers & iPhones imaginable — but that's obviously the warped world we live in — so let's make it happen... @avni do you have the phone number for the Nobel Committee ? |
Thanks @maxnet and @holta! And thanks @maxnet for the universal build and debugging tips!
Test 1: M1 Mac Remote File
iostat 10 (disk4 is the SD card) much slower than @maxnet's:
Test 2: M1 Mac Local File
iostat 10 (disk4 is the SD card) still much slower than @maxnet's:
Will do a remote and local file test on an Intel Mac with the same reader and card next. I suspect too it is not the emulation and something else. I did several rounds of Test #1 on the M1 and am not able to reproduce the use case where the write took ~4 hours that happened the first 1-2 tests on the M1. One other thought, could an empty vs non-empty SD card make a difference? Thanks so much for your help! No connection to a Nobel committee but can provide emoticons - does that count? |
Test 3: Intel Mac Remote File
iostat 10 (disk2 is the SD card):
Test 4: Intel Mac Local File
iostat 10 (disk2 is the SD card)
There does not seem to be a material difference between remote vs local file on either the Intel or M1 Mac. Given these results, thinking the culprit may be the reader or the SD card that was causing the glacial write to the SD Card the first couple of times on the M1 Mac? |
This seems to have fixed it for me, including some pesky verification issue that comes up. My setup |
I know very little about Macs, and it'd obviously be a bit of a hacky solution, but would it be possible to build a universal binary where the x86_64 part is compiled against Qt5 and the arm64 part is compiled against Qt6? 🤷♂️ |
I know too little about the Mac specific internals to pull that off easily. Current universal build experiment was a matter of:
And CMake/Xcode takes care of compiling for the two architectures itself. Also don't know if the native M1 build brings any advantage, other than that it then also works if the user declined installation of Rosetta |
I don't think putting UNTESTED stuff on the release page is a good idea.
Well, I don't feel the urgency to replace the Mac Mini I bought in 2018, and that would normally not be written off until 2023. And think I am not the only freelance developer that feels that way. |
Beta is beta, I am using it now on an M1 Mac and it is working perfectly |
Is there a more later version of Imager that is universal? Would be very appreciated |
Just wanted to post that I use this weekly and it's never crashed. It works perfect on the latest macOS build too (as of typing this macOS Ventura 13.2.1). It really should be officially released and put on the software download page (https://www.raspberrypi.com/software/). IMHO the only reason we don't have an official build is because some people dislike Apple and frankly that is silly and obtuse. Anyway, thank you @maxnet ! |
If you want a newer universal build to test: Imager 1.7.4.1.dmg With Qt 6.4 and the M1 stuff the size of the application did grow to 350 MB (uncompressed). |
I've seen issue #202 and tried the version from that post but it also crashes as soon as i try to open it.
I guess its not compatible with Apple Silicon? Thanks.
The text was updated successfully, but these errors were encountered: