Hi,
our virtual CoreAudio server plugin creates and removes dynamically CoreAudio devices. Each time it does so it leaves traces in
/Library/Preferences/Audio
com.apple.audio.DeviceSettings.plist
com.apple.audio.SystemSettings.plist
The files on the test machine now have become >1Mb and the system keeps recreating them.
- How can I manually remove/cleanup these files? (This is for development only. It already became pretty tedious to evaluate current device settings for debugging purposes.)
- How can the CoreAudio server plugin make sure once a device has been removed also its entries are removed from the .plist (It already removes it's storage, but the system still keeps other settings.)
- Is there some documentation about what gets stored and how the settings are organized in these preferences? (This is also for development and debugging only. We are not intending to access these settings directly )
Thanks!
Yes, they currently appear with a different UID each time. This needs to be fixed on our side. But I am not sure if the file size is an Apple bug. Isn't it more an unexpected use of this system?
Yes and no? The bug here isn't a case of "this is an obviously wrong situation we must fix now". The circumstances are obviously involved and some of the issue can/should obviously be addressed on your side. However, the behavior is also unexpected/odd, particularly since you can't trivially correct it (see below), so it's worth documenting so the team is aware of the issue.
Anyway, as suggested I filed the bug report FB17384333.
Perfect thank you.
Moving to here:
I would love to lose these data though; unfortunately everything recovers!
So, that makes things more interesting. 3 things I'd try, roughly ordered by "safety":
-
Move the file to the side, reboot, then delete-> This will only work if CoreAudio is holding the file open (so don't be surprised if it fails), but it's what I would try first.
-
Move the file to the side, and replace with a new plist file-> I'd expect this to work, but it's possible that CoreAudio is "blindly" pushing it's pref data back to the file. Again, this is "safe", so it's easy to test.
-
Quit/shutdown everything you can, do the same thing as #2, and then more "aggressively" terminate things. It's not something I'd ever recommend as a formal practice, but terminating (
kill -9
) coreaudiod (followed by a reboot...) would probably work.
More broadly you could also to the same thing to the entire system using any of these commands:
sudo reboot -q (n)
sudo halt -q (n)
sudo kill -9 1 (terminate launchd)
All of those should immediately terminate the system without providing any time for new data to be written out. Functionally, they're only slightly better than cutting power to the machine, so they are somewhat dangerous but shouldn't be an issue as a one off/occasional option.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware