Hey everybody,
When I saw that an attempt was being made to create an AMD compatible kernel of Lion, I dug out an old PC (all my newer systems are actual Macs) and installed 10.7.3 on it. I ran into the same xpchelper issue that everyone else here mentioned. Although I'm not a good enough coder to improve the kernel itself, I did manage to make the problem less annoying.
First up:
Code:
tell application "Activity Monitor" to activate
do shell script "launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist"
do shell script "launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist" user name "adminuser" password "adminpwd" with administrator privileges
This AppleScript is very simple. It just launches Activity Monitor (so that you can see when xpchelper goes crazy. Then, it unloads the crash reporter (both from the user and as root) so that when xpchelper DOES crash, crash reporter doesn't go crazy creating system logs and writing them to disk. The downside is you can't get crash reports of other crashes, but for now, it's a huge help. You obviously need to replace adminuser and adminpwd with your administrative username and password. Then save the code in AppleScript Editor as an application. You can either save it to the desktop for quick access or use the login manager to set it to autorun. The downside is you still need to watch Activity Monitor for when xpchelper goes crazy, but simply clicking it and hitting the Quit Process button takes care of it until the next time it goes nuts.
I'm trying to make it so you don't need to do that:
Code:
property currenttime : 0
property previousbreak : 0 as integer
property currentbreak : 0 as integer
on idle
set currenttime to time of (current date)
set currentbreak to (currenttime / 60 / 60 / 30) as integer
if currentbreak is not equal to previousbreak then
do shell script "/usr/bin/killall xpchelper" user name "adminuser" password "adminpwd" with administrator privileges
set previousbreak to currentbreak
end if
end idle
This is a basic script that runs as an idle process and simply kills all xpchelper processes every two minutes. It does keep you from having to watch Activity Monitor but in my experience killing the process when its not going crazy leads to more app crashes, so its not ideal. Still, if you want to use it, again replace aminuser and adminpwd with the necessary details, compile and save in AppleScript Editor. This time you need to save as format Application, and check the box next to keep open.
I'm working on a method where it looks at CPU Utilization of the xpchelper processes and kills only the ones that have gone crazy. I don't have that quite working yet though, and it may need to kill all instances as the bad ones are crashing and reforming too quickly.
Anyway, hope that helps. On my system 10.7.3 is fairly useable on an old AMD system, which is pretty impressive given that none of it was possible just a couple weeks ago.