Sheepshaver won't open on M1 Pro Mac (version 12.0)

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Ronald P. Regensburg »

MetalSnake wrote: Sun May 29, 2022 8:44 amThis is the weirdest thing to try to solve the first problem, and even more weirdly it worked. :shock:

I'm now able to double click the .app to start SheepShaver. Thank you.
This is a security feature in macOS that quarantines an application that may not be intentionally installed by the user. It can happen when the application is not moved by the user to a different location before it is launched the first time.

But the problem with OS8 only booting every 2nd time. And adding more than the boot disk never working persists.

edit:
I use ROM with CRC32 2f6572b4 to boot OS8
I then tried to boot OS 7.6 which needed a different ROM with CRC32 74a3badf
That one booted fine every time with the same sheepshaver_prefs (besides ROM path and boot disc path)
And it even allowed to add more than just the boot disk.

I guess something is faulty with the OS8 installation or with the ROM?
Both OS 8 and OS 7.6 should run fine with the Old World 4mb ROM downloaded from Redundant Robot.

What is the extra disk (image) you add?
You know that you need to completely shut down/quit SheepShaver after any change saved in preferences?
MetalSnake
Granny Smith
Posts: 120
Joined: Fri Nov 09, 2007 5:42 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by MetalSnake »

Ronald P. Regensburg wrote: Sun May 29, 2022 9:53 am Both OS 8 and OS 7.6 should run fine with the Old World 4mb ROM downloaded from Redundant Robot.

What is the extra disk (image) you add?
You know that you need to completely shut down/quit SheepShaver after any change saved in preferences?
For OS 8 I used the New World PPC ROM which is "best for SheepShaver" according to Redundant Robot. I used the Old World ROM now, now it works much better.
It boots almost everytime now, and I can add disks (images).

Thank you.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Ronald P. Regensburg »

As noted in the setup manual, the old world rom file can be used for System 7.5.3 through MacOS 9.0.4, while the new world rom file can be used for MacOS 8.5 through MacOS 9.0.4 and is best for MacOS 8.6 through MacOS 9.0.4.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

Hello.
I have the same problem when running on Monterey 12.4, it will not start unless Rosetta is checked.
The same thing happens if I download & extract the App again after deleting it.
Basilisk II is running Arm native in the same environment.
Mac is a 2020 M1 MacBook Air 8core/8gpu 8gb model.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

Running the SheepShaver inside the App from the terminal also produces the following error
SheepShaver V2.5 by Christian Bauer and Mar "c" Hellwig
ERROR: Cannot create SHM segment for Kernel Data: Cannot allocate memory.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by emendelson »

Hiro.Fuji wrote: Thu Jun 02, 2022 9:54 pm Hello.
I have the same problem when running on Monterey 12.4, it will not start unless Rosetta is checked.
The same thing happens if I download & extract the App again after deleting it.
Basilisk II is running Arm native in the same environment.
Mac is a 2020 M1 MacBook Air 8core/8gpu 8gb model.
Possibly you are using an older version. The current version of SheepShaver runs perfectly well (without Rosetta) on an M1 Mac running Monterey.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

The version I am using is the environment here which I believe is the latest version.
https://www.emaculation.com/sheepshaver ... 220124.zip
Strangely enough, it works when Rosetta is checked.
Could there be a problem with the uploaded binaries?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by emendelson »

Maybe something is wrong with your system. No one else has reported any problem with M1 Macs and the current version.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

If you get the following error when executing directly from the terminal, there must be something wrong with the way shared memory is used.
>Cannot create SHM segment for Kernel Data: Cannot allocate memory.
The shared memory is not set very large in the normal macOS settings, and it seems to occur if that setting is not changed from normal.
If you do not change any settings for development, this error should occur elsewhere.
The person who actually started the thread has not been able to resolve it.
And most importantly, Basilisk II is running in the same environment.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Cat_7 »

Hi,

This issue pops up on the forum every now and then. We don´t have a real solution for it. We believe it has something to do with SheepShaver trying to use memory space already in use by some other program. But it might also be a permissions issue.
So you can try to run SheepShaver after a fresh boot of your host, try to decrease the amount of memory allocated to SheepShaver.

Best,
Cat_7
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Ronald P. Regensburg »

The issue must be on the host or in your SheepShaver setup. Things to try:

1. Quit all applications running on your MacBook, then restart your MacBook and launch SheepShaver without first starting other applications.

2. In SheepShaver preferences set Ram Size to 256 or 512 (MB)
(Note that after any change saved in SheepShaver preferences, SheepShaver needs to be completely shutdown/quit.)

3. Try
- Copy SheepShaver, only the application, to a different location, for instance to your desktop.
- Trash the original application
- Put the copy back to where the original was

4. If it still does not work as expected, please post here the contents of your prefs file:
Launch Terminal (in /Application/Utilities/) and type at the prompt

Code: Select all

open ~/.sheepshaver_prefs
followed by a return.
The file will open in your default text editor. Select all content and copy and paste it here in your reply.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

What we have tried so far.
A set of steps as instructed in the thread.
Multiple shutdowns and reboots including macOS.
All of these steps with Arm binary failed to boot.

I tried safeboot because it said "start first without starting other programs", but by mistake I started recovery, and when I rebooted without execute recovery (and without safebooting), it started with Arm binary.

The mysterious event that Basilisk II was booted while Sheepshaver was not booted is still a mystery.

Thank you.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by adespoton »

Which OS localization are you using?

I'm curious if this is being seen only on specific language localizations and not on others -- I've had zero issues moving to the January ARM build on my EN-US system that already had SheepShaver installed. I have SIP enabled, and all the regular security checks in place, and ran this build of SheepShaver the first time by right clicking it and selecting Open (although it's notarized, so this shouldn't be necessary). I use 512MB RAM.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by kanjitalk755 »

Hiro.Fuji wrote: Fri Jun 03, 2022 3:34 pm The mysterious event that Basilisk II was booted while Sheepshaver was not booted is still a mystery.
Basilisk II doesn't use shared memory.

SheepShaver can run without shared memory, but slows down a little.

https://github.com/kanjitalk755/macemu/tree/wo_shm
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

It seems the same thing happened when you moved to xcode8.
What was written there read "I didn't understand why the code was written this way, so I left it as it was.
When we had similar problems with other apps, they took a different approach because macOS does not allow for a lot of shared memory.

Thank you.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by kanjitalk755 »

On Apple Silicon Mac, the shared memory that SheepShaver tries to get is always 16KiB.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

I found that I could avoid the crash by setting up shared memory.
In macOS (OSX), shared memory can only be allocated up to 4MB by default.
If you need 16MB, you need to change the system settings by entering the following command in the terminal.

sudo sysctl -w kern.sysv.shmmax=16777216
sudo sysctl -w kern.sysv.shmall=4096

The standard settings are as follows.
kern.sysv.shmmax=4194304
kern.sysv.shmall=1024

The shmmax setting value must be a positive multiple of 4MB (4194304).
shmall sets a value of 4KB/page, so set the shmmax value divided by 4096.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

Operation was confirmed on the current macOS Sonoma.
Even after a crash, with this setting I was able to start SheepShaver without rebooting.
This setting returns to the initial value after rebooting.
To enable it permanently, you need to write the settings in the rc file or sysctl.conf (the rewriting location differs depending on the macOS version).
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by adespoton »

Thank you! Sounds like maybe we should include a script to run for people running into issues.
User avatar
Hiro.Fuji
Student Driver
Posts: 11
Joined: Thu Jun 02, 2022 9:44 pm

Re: Sheepshaver won't open on M1 Pro Mac (version 12.0)

Post by Hiro.Fuji »

On macOS (including the latest version 14.4), memory leaks tend to occur related to shared memory, and if you do not restart for a long time, sheep shaver may not start due to a shared memory error even if you set it to 16MB.
In this case, it seems that it will not be possible to start unless you further increase the shared memory settings or restart the OS.
Post Reply