Jump to content
IGNORED

Potential Snow Leopard Tip


Recommended Posts

So I've been noticing some sluggish behavior (typically increasing with time) on one or two of my Mac's running SL and so started doing some investigating this evening. Sure enough plenty of folks experiencing this and writing about it over on the Apple boards. One of the "fixes" a number of folks used to cure this related to Core Audio, which was interesting. What was done was to remove the following file (move to desktop, don't delete):

System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist

 

This isn't a traditional plist in that it launches core audio or aspects of it. On my system, I definitely got a BIG speed boost when I killed this file. Only lost system sounds in the Finder (itunes still worked), but who knows what other implications would be (not a wise thing to delete files like this). So replaced it with a clean version of the file from an untouched 10.6.2 factory OEM OSX 10.6.2 install on an HD I pulled from a new computer. Rebooted, and then repaired permissions (important step otherwise won't load). Rebooted. Speed still there, and Finder audio back. Whether it's a result of the speed improvement or the change in the file, Amarra and iTunes are running faster and sound better.

 

Here's a clean version of the plist file if you care to try it out (only for those with authorized copies of SLeopard of course):

http://dl.dropbox.com/u/3622597/plist.zip

EDIT - link fixed

In theory of course if you've done a clean install, would assume this wouldn't do anything (I had originally done a clean minimal install on my machine, not an upgrade).

 

Link to comment

Would someone like to provide a cogent explanation of how swapping this file will make a difference? ;)

 

For a start com.apple.audio.coreaudiod.plist IS a traditional plist. Apple is very consistent in these matters, so if a file has the .plist extension it contains configuration data in xml format. In this instance com.apple.audio.coreaudiod.plist contains some basic config information which tells launchd what parameters to use when launching coreaudiod.

 

As you can see below there is nothing mystical or "non-traditional" about the contents of the plist, and the launchd.plist man page gives a clear explanation of the available options.

 

 

 

 

 

 

EnableTransactions

 

Label

com.apple.audio.coreaudiod

ProgramArguments

 

/usr/sbin/coreaudiod

 

KeepAlive

 

MachServices

 

com.apple.audio.coreaudiod

 

ResetAtClose

 

 

 

UserName

_coreaudiod

GroupName

_coreaudiod

 

 

 

 

Second - replacing a .plist file is only useful if the original .plist has been modified or damaged. You won't achieve anything by replacing an undamaged .plist file. And the likelihood of damage to the launchd.plist files is very small given that correct permissions (0644) means neither the system nor users have write permissions to these files.

 

Third the downloaded file will have incorrect permissions (0755 which gives all users write access to the file) and ownership, and these should be repaired as a matter of priority if you choose to install this file.

 

 

cheers

Paul

 

Link to comment

Absolutely no clue why this would have an impact. I can say I tried a lot of different strategies to deal with the slow downs I was getting with snow leopard and gave up and then some time later came across this. while there are always other potential variables, my computer now flies and is working well consistently (and reportedly has worked for others), and I made no other deliberate changes. I was assuming my plist file got corrupted or changed in some way for the worse, which as to your point 1&2 looks limited in possibility/impact (I wish I would have kept the old copy, could have compared with the new file). In any event, I cannot understate the very significant change in performance since making this change (processing taking small fractions of a second vs seconds), so if not this perhaps something else happened as a result of the process of running without the plist (which clearly caused the core audio to load differently given the lack of system sounds without the file, and the OS not re-creating the file on its own), followed by adding back a clean file. Curious question....?

 

Link to comment

I can definitely see that there might be performance gains from disabling coreaudiod, but it would be nice to know exactly what functionality is being disabled in the process. I've seen mention that coreaudiod handles coreaudio HAL (hardware abstraction layer) devices so it might have unwanted side effects in some instances.

 

Replacing the plist only going to matter if the plist is corrupted. It would have been interesting to see the state of the original/bad plist. The other possibility is that repairing the permissions fixed an issue related to coreaudiod.

 

If you install a fresh copy of the plist, repair permissions and restart you have performed several actions, each of which may have solved your problem. Unfortunately unless you kept the original plist you can't be sure which of those actions fixed your problem!

 

OSX can't recreate these files because launchd is used to startup a whole range of processes - as can be seen from the contents of the LaunchDaemon. In most cases when prefs are recreated there is a one to one relationship between prefs and application, rather than one and many with launchd.

 

Launchd is the default mechanism OSX uses for launching process since 10.4: http://developer.apple.com/macosx/launchd.html Without the plist in the LaunchDaemons OSX has no way to "know" how to run coreaudiod, so the process doesn't start at all.

 

There is a good discussion of using launchctl to temporarily disable coreaudiod on the apple forums (see:

http://discussions.info.apple.com/thread.jspa?messageID=10805305 ) and I'd recommend using this mechanism over moving files. I've cut and paste the essentials for reference:

 

I found these commands to work much better as they simple disable it without having to delete or recreate the files and have all the permissions issues.

 

To check and see if coreaudiod is actually running:

sudo launchctl list |grep com.apple.audio.coreaudiod

If nothing is returned then it is not running

 

To load or unload coreaudiod temporarily:

sudo launchctl load /system/library/launchdaemons/com.apple.audio.coreaudiod.plist

sudo launchctl unload /system/library/launchdaemons/com.apple.audio.coreaudiod.plist

 

To load/unload and have this persist even when rebooted:

sudo launchctl unload -w /system/library/launchdaemons/com.apple.audio.coreaudiod.plist

sudo launchctl load -w /system/library/launchdaemons/com.apple.audio.coreaudiod.plist

 

 

 

cheers

Paul

 

Link to comment

 

I downloaded something called unrarx, but it was uncompressed with Stuffit! :)

 

Pretty easy after that, created a .dmg file from 3 .rar files totalling 208 Mb. It was confusing at first until I realized I needed to burn it to a disk to see the 'hidden' files in the download.

 

I downloaded the Apple Service Diagnostic 2.5.8 CD for Powermacs, to perform comprehensive hardware tests (94 in all) on my G5. Also did a thermal calibration, as I thought my temperatures were higher than normal.

 

I plan to finetune (read downgrade) the performance a bit, to reduce fan noise, heat, and potentially other nasties.

 

There's a developer toolkit called CHUD, which includes a tool called CPU Palette, that lets you shut down one of the processors.

 

You can also reduce the processor power in Energy Saver panel.

 

Downgrading the video card to a 'retro' (i.e. previous generation) model (Radeon 7000 AGP) had a huge impact on fan noise, barely noticeable now.

 

Also discovered a tool, Hardware Monitor, which provides readings of all the hardware sensors in the computer on a real-time basis. Temps, fan speeds, voltages, etc.

 

just having fun,

clay

 

 

 

 

 

 

Link to comment

The simple rule is DO NOT DELETE SYSTEM FILES. If you really must disable a file move or rename it instead.

 

sudo mv com.apple.audio.coreaudiod.plist com.apple.audio.coreaudiod.plist.bak

 

The contents of the plist are in one of my posts above. You can copy whole block from the

 

Open up TextEdit and paste the plist contents into a new document.

Go to the format menu and select Make Plain Text

save the document as com.apple.audio.coreaudiod.plist

Copy the file to /System/Library/LaunchDaemons/

Open a terminal

cd /System/Library/LaunchDaemons/

sudo chown root:wheel com.apple.audio.coreaudiod.plist

sudo chmod 644 com.apple.audio.coreaudiod.plist

 

 

cheers

Paul

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...