LaunchDaemon not loading after Sonoma update

I updated my computer to Sonoma, and now my LaunchDaemon will not load.

I have the following setup :

File in /Library/LaunchDaemons/com.startup.plist

like this :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.startup</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/bin/bash</string>
		<string>/Library/Scripts/Startup/startup.sh</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StandardErrorPath</key>
	<string>/tmp/com.startup.stderr</string>
	<key>StandardOutPath</key>
	<string>/tmp/com.startup.stdout</string>
</dict>
</plist>


File in File in /Library/Scripts/Startup/startup.sh

#!/bin/zsh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup
#Load modules for Fuse
/Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse
/usr/sbin/sysctl -w vfs.generic.macfuse.tunables.allow_other=1
#Connect to XXXXXX_net
/bin/sleep 28
myip=0
while [ $myip = 0 ]
do
/bin/sleep 3
myip=$(ifconfig -l | xargs -n1 ipconfig getifaddr)
done
/usr/local/bin/sshfs XXXX@XXXXXX.net: /Volumes/XXXXXX.net -o local,auto_cache,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,ConnectTimeout=5,daemon_timeout=60,iosize=2097152,volname=XXXXXX.net,allow_other,defer_permissions,async_read,Ciphers=aes128-gcm@openssh.com,Cipher=aes128-gcm@openssh.com,compression=no

And then we need some commands to be run as root user during boot :

/private/etc/sudoers.d/startup-script-nopasswd

username ALL = (root) NOPASSWD: /usr/sbin/sysctl
username ALL = (root) NOPASSWD: /usr/local/bin/sshfs

As of now, I cant even get the /Library/LaunchDaemons/com.startup.plist

to run after i updated the macOS to Sonoma ….

In situations like this I recommend that you start small. If you replace startup.sh with a test script, do you see it load?

A good way to check that is to write a message to the system log like so:

% log emit --subsystem "com.startup" --category "default" "My message"

That makes it easy to find in the load by searching for the subsystem and category. See Your Friend the System Log for advice on that front.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi I put your command line in startup.sh

So the "startup.sh" now looks like this :

#!/bin/zsh
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup
#Load modules for Fuse
log emit --subsystem "com.startup" --category "default" "Message from Tormod"

The message does NOT appeat in the system log.

I am also having some "kernel panic" at boot time.

Log from boot attached.

{\rtf1\ansi\ansicpg1252\cocoartf2761
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww23840\viewh18560\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 panic(cpu 2 caller 0xffffff800bcb1fa3): watchdog timeout: no checkins from watchdogd in 147 seconds (71 totalcheckins since monitoring last enabled), shutdown in progress, vfs shutdown in progress, last vfs completion time: 125 seconds ago\
Panicked task 0xffffff8ffedfb1d8: 248 threads: pid 0: kernel_task\
Backtrace (CPU 2), panicked thread: 0xffffff8b32e2cb30, Frame : Return Address\
0xffffff803c69bb40 : 0xffffff80090265a1 \
0xffffff803c69bb90 : 0xffffff800918bcd0 \
0xffffff803c69bbd0 : 0xffffff800917b28c \
0xffffff803c69bc50 : 0xffffff8008fc0971 \
0xffffff803c69bc70 : 0xffffff800902688d \
0xffffff803c69bd60 : 0xffffff8009025f33 \
0xffffff803c69bdc0 : 0xffffff80097db8ee \
0xffffff803c69beb0 : 0xffffff800bcb1fa3 \
0xffffff803c69bf20 : 0xffffff800bcb1dce \
0xffffff803c69bf50 : 0xffffff800a79b37c \
0xffffff803c69bfa0 : 0xffffff8008fc019e \
      Kernel Extensions in backtrace:\
         com.apple.driver.watchdog(1.0)[2D007C64-EF78-3276-A014-C76E314452E2]@0xffffff800bcb0000->0xffffff800bcb2fff\
         com.apple.driver.AppleSMC(3.1.9)[B6D333BE-CC32-33DE-99BD-5824A3392BE0]@0xffffff800a789000->0xffffff800a7a4fff\
            dependency: com.apple.driver.watchdog(1)[2D007C64-EF78-3276-A014-C76E314452E2]@0xffffff800bcb0000->0xffffff800bcb2fff\
            dependency: com.apple.iokit.IOACPIFamily(1.4)[04DDFFBA-0499-3590-B6C5-C40851E28B4F]@0xffffff800aef9000->0xffffff800aefafff\
            dependency: com.apple.iokit.IOPCIFamily(2.9)[A0A7A468-77FC-3B7F-8854-A6929694789B]@0xffffff800b369000->0xffffff800b39afff\
\
Process name corresponding to current thread (0xffffff8b32e2cb30): kernel_task\
\
Mac OS version:\
23H222\
\
Kernel version:\
Darwin Kernel Version 23.6.0: Thu Sep 12 23:34:49 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_X86_64\
Kernel UUID: 0A533DFD-E6D2-34FD-B0CF-39726691B35F\
roots installed: 0\
KernelCache slide: 0x0000000008c00000\
KernelCache base:  0xffffff8008e00000\
Kernel slide:      0x0000000008ce4000\
Kernel text base:  0xffffff8008ee4000\
__HIB  text base: 0xffffff8008d00000\
System model name: MacBookPro15,1 (Mac-937A206F2EE63C01)\
System shutdown begun: YES\
Hibernation exit count: 0\
\
System uptime in nanoseconds: 841053958343\
Last Sleep:           absolute           base_tsc          base_nano\
  Uptime  : 0x000000c3d2b8fb5e\
  Sleep   : 0x0000000000000000 0x0000000000000000 0x0000000000000000\
  Wake    : 0x0000000000000000 0x000000030edea982 0x0000000000000000\
Compressor Info: 0% of compressed pages limit (OK) and 0% of segments limit (OK) with 0 swapfiles and OK swap space\
Zone info:\
  Zone map: 0xffffff84c916a000 - 0xffffffa4c916a000\
  . PGZ   : 0xffffff84c916a000 - 0xffffff84cd16b000\
  . VM    : 0xffffff84cd16b000 - 0xffffff899949e000\
  . RO    : 0xffffff899949e000 - 0xffffff8b32b04000\
  . GEN0  : 0xffffff8b32b04000 - 0xffffff8ffee37000\
  . GEN1  : 0xffffff8ffee37000 - 0xffffff94cb16a000\
  . GEN2  : 0xffffff94cb16a000 - 0xffffff999749d000\
  . GEN3  : 0xffffff999749d000 - 0xffffff9e637d0000\
  . DATA  : 0xffffff9e637d0000 - 0xffffffa4c916a000\
  Metadata: 0xffffff843eb78000 - 0xffffff845eb78000\
  Bitmaps : 0xffffff845eb78000 - 0xffffff8464b78000\
  Extra   : 0 - 0\
\
last started kext at 21913334989: >!A!BMultitouch	102 (addr 0xffffff800a391000, size 28672)\
loaded kexts:\
io.macfuse.filesystems.macfuse.23	4.7.2\
>!A!BMultitouch	102\
>AGPM	135\
>!APlatformEnabler	2.7.0d0\
>X86PlatformShim	1.0.0\
>!AHIDALSService	1\
>!ATopCaseHIDEventDriver	7440.8\
@kext.AMDFramebuffer	5.0.5\
>!AUpstreamUserClient	3.6.11\
@filesystems.autofs	3.0\
@kext.AMDRadeonX4000	5.0.5\
>!AGFXHDA	340.1\
@kext.AMDRadeonServiceManager	5.0.5\
>!A!IKBLGraphics	22.0.5\
>!ABridgeAudio!C	440.1\
>!AMuxControl2	8.1.9\
>!AGraphicsDevicePolicy	8.1.9\
@AGDCPluginDisplayMetrics	8.1.9\
>pmtelemetry	1\
@filesystems.nfs	1\
|IOUserEthernet	1.0.1\
>usb.!UUserHCI	1\
>!AUIO	1\
>!ASunrise	1\
>!AHV	1\
>AGDCBacklightControl	8.1.9\
>ACPI_SMC_PlatformPlugin	1.0.0\
>!ABacklight	180.9\
>!AMCCSControl	1.17\
@kext.AMD9500!C	5.0.5\
>!A!ICFLGraphicsFramebuffer	22.0.5\
>!A!IPCHPMC	2.0.1\
@UVCService	1\
>BridgeAudioCommunication	440.1\
>!AAVEBridge	6.1\
>!AThunderboltIP	4.0.3\
>!A!ISlowAdaptiveClocking	4.0.0\
>!AFIVRDriver	4.1.0\
>BCMWLANFirmware4388.Hashstore	1\
>BCMWLANFirmware4387.Hashstore	1\
>BCMWLANFirmware4378.Hashstore	1\
>BCMWLANFirmware4377.Hashstore	1\
>BCMWLANFirmware4364.Hashstore	1\
>BCMWLANFirmware4355.Hashstore	1\
>!AFileSystemDriver	3.0.1\
@filesystems.tmpfs	1\
@filesystems.lifs	1\
@filesystems.hfs.kext	650.140.2\
@BootCache	40\
@!AFSCompression.!AFSCompressionTypeZlib	1.0.0\
@!AFSCompression.!AFSCompressionTypeDataless	1.0.0d1\
@filesystems.apfs	2236.141.1\
>!ABCMWLANBusInterfacePCIeMac	1\
@private.KextAudit	1.0\
>!ASmartBatteryManager	161.0.0\
>!AACPIButtons	6.1\
>!ASMBIOS	2.1\
>!AACPIEC	6.1\
>!AAPIC	1.7\
@!ASystemPolicy	2.0.0\
@nke.applicationfirewall	405\
|IOKitRegistryCompatibility	1\
|EndpointSecurity	1\
@Dont_Steal_Mac_OS_X	7.0.0\
>!ADiskImages2	276.120.7\
@kec.!AEncryptedArchive	1\
>!AActuatorDriver	7440.9\
>!AHIDKeyboard	7440.3\
>!AMultitouchDriver	7440.9\
>!AInputDeviceSupport	7440.1\
>!AHS!BDriver	7440.8\
>IO!BHIDDriver	9.0.0\
@kext.AMDRadeonX4100HWLibs	1.0\
>!UAudio	640.12\
>!AAudioClockLibs	340.8\
>!A!ILpssUARTv1	3.0.60\
>!A!ILpssUARTCommon	3.0.60\
>!AOnboardSerial	1.0\
@kext.AMDRadeonX4000HWServices	5.0.5\
>!AHDA!C	540.3\
|IOHDA!F	540.3\
|IOAudio!F	540.3\
@vecLib.kext	1.2.0\
>!AGraphicsControl	8.1.9\
>!ASMBusPCI	1.0.14d1\
@kext.triggers	1.0\
>IOHIDPowerSource	1\
>!ACallbackPowerSource	1\
|IOAVB!F	1220.1\
>!ARSMChannel	1\
|IORSM!F	1\
>!AIPAppender	1.0\
>IOPlatformPluginLegacy	1.0.0\
>X86PlatformPlugin	1.0.0\
@plugin.IOgPTPPlugin	1240.15\
>!ABacklightExpert	1.1.0\
|IONDRVSupport	598\
>!ASMBus!C	1.0.18d1\
@kext.AMDSupport	5.0.5\
|IOAccelerator!F2	481.40.2\
>IOPlatformPlugin!F	6.0.0d8\
>driverkit.serial	6.0.0\
>!AThunderboltEDMSink	5.0.3\
>!AThunderboltDPOutAdapter	8.5.1\
@!AGPUWrangler	8.1.9\
@!AGraphicsDeviceControl	8.1.9\
|IOGraphics!F	598\
|IOSlowAdaptiveClocking!F	1.0.0\
>usb.cdc.ecm	5.0.0\
>usb.IOUSBHostHIDDevice	1.2\
>usb.cdc.ncm	5.0.0\
>usb.cdc	5.0.0\
>usb.networking	5.0.0\
>usb.!UHostCompositeDevice	1.2\
>!AThunderboltDPInAdapter	8.5.1\
>!AThunderboltDPAdapter!F	8.5.1\
>!AThunderboltPCIDownAdapter	4.1.1\
>!AHPM	3.4.4\
>!A!ILpssI2C!C	3.0.60\
>!A!ILpssI2C	3.0.60\
>!A!ILpssDmac	3.0.60\
>!ABSDKextStarter	3\
|IOSurface	352.50.1\
@filesystems.hfs.encodings.kext	1\
>!ASyntheticGame!C	11.6.3\
>!AXsanScheme	3\
>!AThunderboltNHI	7.2.81\
|IOThunderbolt!F	9.3.3\
>usb.!UVHCIBCE	1.2\
>usb.!UVHCICommonBCE	1.0\
>usb.!UVHCI	1.2\
>usb.!UVHCICommon	1.0\
>!AEffaceableNOR	1.0\
|IOBufferCopy!C	1.1.0\
|IOBufferCopyEngine!F	1\
|IONVMe!F	2.1.0\
>!ABCMWLANCoreMac	1.0.0\
|IO80211!F	1200.13.0\
>IOImageLoader	1.0.0\
>!AOLYHALMac	1\
|IOSerial!F	11\
>corecapture	1.0.4\
>usb.!UHostPacketFilter	1.0\
|IOUSB!F	900.4.2\
>usb.!UXHCIPCI	1.2\
>usb.!UXHCI	1.2\
>!AEFINVRAM	2.1\
>!AEFIRuntime	2.1\
>!ASMCRTC	1.0\
|IOSMBus!F	1.1\
|IOHID!F	2.0.0\
|IOTimeSync!F	1240.15\
|IOSkywalk!F	1.0\
>mDNSOffloadUserClient	1.0.1b8\
|IONetworking!F	3.4\
>DiskImages	493.0.0\
|IO!B!F	9.0.0\
|IOReport!F	47\
$quarantine	4\
$sandbox	300.0\
@kext.!AMatch	1.0.0d1\
>!ASSE	1.0\
>!ALockdownMode	1\
>!AKeyStore	2\
>!UTDM	556\
|IOUSBMass!SDriver	245\
|IOUSBHost!F	1.2\
>!UHostMergeProperties	1.2\
>usb.!UCommon	1.0\
>!ABusPower!C	1.0\
|IOSCSIBlockCommandsDevice	495\
|IOSCSIArchitectureModel!F	495\
>!AFDEKeyStore	28.30\
>!AEffaceable!S	1.0\
|IO!S!F	2.1\
>!ACyrus	1\
>!AMobileFileIntegrity	1.0.5\
$!AImage4	6.3.0\
@kext.CoreTrust	1\
>!ACredentialManager	1.0\
|CoreAnalytics!F	1\
>!ASEPManager	1.0.1\
>IOSlaveProcessor	1\
>!AACPIPlatform	6.1\
>!ASMC	3.1.9\
|IOPCI!F	2.9\
|IOACPI!F	1.4\
>watchdog	1\
@kec.pthread	1\
@kec.XrtHostedXnu	1\
@kec.Libm	1\
@kec.Compression	1.0\
@kec.corecrypto	14.0}

I have the "LaunchControl" software, and the "com.startup.plist" looks like this in the software :

I ended up reinstalling the macOS by using an USB boot disk. Now running Sequoia I did a format of the mac disk before install. Then I restored the user files by use of time machine.

I then reinstalled latest version on macFUSE. The kernel panic is gone now. Probably the cause for the kernel panic was an unfavorable combination of kexts.

Regarding the plists. I did not reinstall any apps from the time machine, so just now I do not have any .plist in /Library/LaunchAgents, /Library/LaunchDaemons. I will reinstall some of the apps / programs, but will be more selective when reinstalling programs.

There is an alternative to macFUSE, called fuse-t, but I have not tested fuse-t with sshfs. Most of the linux versions come with some sort of sshfs, but for mac this is not included.

I will now reinstall my /Library/LaunchDaemons/com.startup.plist /Library/Scripts/Startup/startup.sh and /private/etc/sudoers.d/startup-script-nopasswd

Will give an update when this is done

LaunchDaemon not loading after Sonoma update
 
 
Q