Showing posts with label mac os x. Show all posts
Showing posts with label mac os x. Show all posts

21 December 2014

Riecoin and OS X

The Riecoin website (http://riecoin.org) suggests that Mac binary works for OS X. Unfortunately it doesn't appear to work on either OS X 10.9 Mavericks or 10.10 Yosemite: if you double click the Riecoin-Qt.app in the disk image, OS X complains that it "may be damaged or incomplete." The trick is to cd into the Riecoin-Qt.app folder/Contents/MacOS folder and execute the Riecoin-Qt command line app from the terminal. Voilà!

03 December 2012

CUDA Drivers Causing Kernel Panics

For the past few days, my MacBook Air (13", Late 2010), has gotten significantly more kernel panics than before. The kernel panics would always happen when I removed the display cable and then woke the computer from sleep, at which point it would tell me that it kernel panicked was going to automatically reboot. Upon restart, I skimmed through the kernel panic (portions reproduced at the end) and concluded that it was caused by some Nvidia kernel extensions. Upon closer inspection, I noticed NVDAResman and nv50hal were at fault, which are two kexts that come with the OS X CUDA driver.

Interval Since Last Panic Report:  159692 sec
Panics Since Last Report:          2
Anonymous UUID:                    B4401137-5BE3-7AF0-D223-C1C4D49B06E5

Mon Dec  3 09:55:59 2012
panic(cpu 1 caller 0xffffff80060b7bd5): Kernel trap at 0xffffff7f86aa1a58, type 0=divide error, registers:
CR0: 0x000000008001003b, CR2: 0x00000000992f9f8e, CR3: 0x0000000008c94000, CR4: 0x0000000000000660
RAX: 0x00014424d765e000, RBX: 0x0000000000000000, RCX: 0x0000000008d9ee20, RDX: 0x0000000000000000
RSP: 0xffffff807e4ab020, RBP: 0xffffff807e4ab0b0, RSI: 0x0000000000000000, RDI: 0xffffff8012e1d004
R8:  0xffffff807e4aafb4, R9:  0x0000000008d9ee20, R10: 0x000000001017df80, R11: 0x000000000574c638
R12: 0xffffff806ac91da0, R13: 0xffffff8012de7004, R14: 0x0000000000000006, R15: 0xffffff8012e1d004
RFL: 0x0000000000010246, RIP: 0xffffff7f86aa1a58, CS:  0x0000000000000008, SS:  0x0000000000000000
Fault CR2: 0x00000000992f9f8e, Error code: 0x0000000000000000, Fault CPU: 0x1

Backtrace (CPU 1), Frame : Return Address
0xffffff807e4aacc0 : 0xffffff800601d626 
0xffffff807e4aad30 : 0xffffff80060b7bd5 
0xffffff807e4aaf00 : 0xffffff80060ce4ed 
0xffffff807e4aaf20 : 0xffffff7f86aa1a58 
0xffffff807e4ab0b0 : 0xffffff7f86a9aefb 
0xffffff807e4ab160 : 0xffffff7f86a7befc 
0xffffff807e4ab1a0 : 0xffffff7f86a7dcf1 
0xffffff807e4ab350 : 0xffffff7f86a80294 
0xffffff807e4ab3a0 : 0xffffff7f86b68ba1 
0xffffff807e4ab4e0 : 0xffffff7f86b6ef2e 
0xffffff807e4ab530 : 0xffffff7f86879659 
0xffffff807e4ab560 : 0xffffff7f867638da 
0xffffff807e4ab610 : 0xffffff7f8675efac 
0xffffff807e4ab800 : 0xffffff7f867603a2 
0xffffff807e4ab8d0 : 0xffffff7f8695415a 
0xffffff807e4ab900 : 0xffffff7f869505ce 
0xffffff807e4ab920 : 0xffffff7f8694f158 
0xffffff807e4ab9a0 : 0xffffff7f8694babb 
0xffffff807e4ab9c0 : 0xffffff7f86955e40 
0xffffff807e4aba70 : 0xffffff7f8694a61c 
0xffffff807e4abbf0 : 0xffffff7f866f63c7 
0xffffff807e4abc60 : 0xffffff7f866e057b 
0xffffff807e4abcd0 : 0xffffff7f866e31b8 
0xffffff807e4abd40 : 0xffffff7f866e3343 
0xffffff807e4abdb0 : 0xffffff7f866e2db4 
0xffffff807e4abe10 : 0xffffff7f866a9c04 
0xffffff807e4abe50 : 0xffffff7f866a8eef 
0xffffff807e4abe80 : 0xffffff7f866a82cb 
0xffffff807e4abef0 : 0xffffff80064472a8 
0xffffff807e4abf30 : 0xffffff8006445daa 
0xffffff807e4abf80 : 0xffffff8006445ed9 
0xffffff807e4abfb0 : 0xffffff80060b26b7 
      Kernel Extensions in backtrace:
         com.apple.iokit.IOGraphicsFamily(2.3.5)[803496D0-ADAD-3ADB-B071-8A0A197DA53D]@0xffffff7f8669b000->0xffffff7f866d2fff
            dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffffff7f86650000
         com.apple.iokit.IONDRVSupport(2.3.5)[86DDB71C-A73A-3EBE-AC44-0BC9A38B9A44]@0xffffff7f866de000->0xffffff7f866effff
            dependency: com.apple.iokit.IOGraphicsFamily(2.3.5)[803496D0-ADAD-3ADB-B071-8A0A197DA53D]@0xffffff7f8669b000
            dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffffff7f86650000
         com.apple.NVDAResman(8.0)[A4C53A36-22B6-3075-82B9-9DE612A9C015]@0xffffff7f866f2000->0xffffff7f869f4fff
            dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffffff7f86650000
            dependency: com.apple.iokit.IONDRVSupport(2.3.5)[86DDB71C-A73A-3EBE-AC44-0BC9A38B9A44]@0xffffff7f866de000
            dependency: com.apple.iokit.IOGraphicsFamily(2.3.5)[803496D0-ADAD-3ADB-B071-8A0A197DA53D]@0xffffff7f8669b000
         com.apple.nvidia.nv50hal(8.0)[9F3D09B5-3158-3D9E-BDA3-E71576AAD3B7]@0xffffff7f86a02000->0xffffff7f86d24fff
            dependency: com.apple.NVDAResman(8.0.0)[A4C53A36-22B6-3075-82B9-9DE612A9C015]@0xffffff7f866f2000
            dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffffff7f86650000

BSD process name corresponding to current thread: kernel_task

Mac OS version:
12C60

Kernel version:
Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
Kernel UUID: 69A5853F-375A-3EF4-9247-478FD0247333
Kernel slide:     0x0000000005e00000
Kernel text base: 0xffffff8006000000
System model name: MacBookAir3,2 (Mac-942C5DF58193131B)

17 June 2012

[Partially Resolved] Vim Segfaulting

So it turns out that files in OS X Lion that have extended attributes will cause vim to segfault every now and then. To determine whether a file has extended attributes, do an ls -l and see whether an '@' is next to the permissions. Now to figure out how to remove these pesky attributes…

30 May 2012

SR-2 Adventures, Part II

So after hauling the SR-2 back across campus (if you ever run into a girl carrying large wads of aluminum with Apple logos on them, that's me!), I removed the system from the case mod and tested it. This was something that had to be done as soon as possible because Bayley blew up one of his processors and the return window would expire later that week -- the recommended procedure is to test the processors under high load to detect for defective samples.

I ran the processors at full load with the full 24GiB of memory with LinX, a benchmark wrapper for LinPack, the de facto Linear Algebra system. After a continuous 72hr run, the processors were fine, albeit a little toasty. I stopped worrying about them.

At this point, there were two things to be completed: the power supply mod into the G5 power supply enclosure and the rear IO panel. Although the power supply mod was not documented as much, it was the easier of the two tasks because I did not have the parts handy for the rear IO panel.

The power supply mod works as follows. Since the G5's original proprietary power supply was enclosed in a 1U-esque case, I had to replace its internals with an ATX power supply, specifically a Corsair 850W semi-modular unit.

To cut the chase, I blew up my power supply when it accidentally hit an exposed standoff and thus shorted itself to death. How did I know? When Bayley plugged it in for me (because I'm that big of a scaredy-cat), it sparked and buzzed. On my second try, I covered the entire enclosure with nonconductive tape. All was well.

Unfortunately, that was all I got done before I left MIT (yes, tooling a bit harder this term did yield better grades). As I rushed to pack for my journey back to NJ, I forgot several pieces of equipment, leading to some impulse Amazon buys: a USB header, a PS2 to USB adapter, and a USB to Ethernet. Furthermore, I also forgot an IEC cord, but I forgot to buy it on Amazon. It turns out that not many things around the house use IEC cables, but I eventually found one lurking in the kitchen. I plugged it in, and voilà!

The setup.

System profiler.

18 February 2012

Lion's Terminator, except not really [updated]

Occasionally I've been getting messages from vim such as:

$ vim imageIO.py
Vim: Caught deadly signal ABRT

Vim: Finished.
Abort trap: 6

I thought that was nothing at first, but when it happened again today, I suddenly remembered that Lion will automatically terminate processes to keep memory usage reasonable while assisting having apps open, a là iOS.

[Update] I looked into Console.app for more details, and voilà!

Application Specific Information:
*** error for object 0x73612e312d347865: pointer being freed was not allocated

Said address looks suspiciously like ASCII as pointed out by superstar John Dong. Translating the little endian pointer to ASCII yields

>>> '\x73\x61\x2e\x31\x2d\x34\x78\x65'
'sa.1-4xe'

Additional insight is greatly appreciated.

30 January 2012

Hackintosh Install Log

I'm rather late to the Hackintosh scene (technically, super early because I hackintoshed while in 7th grade and then took a long break), but since I feel the steps are still ill-documented, despite efforts such as InsanelyMac and other sites, I have decided to write up my comprehensive install log for my system configuration.

System

  • Intel Xeon E5540 2.53GHz @ 3.96GHz, 80W
  • 24GiB DDR3-1600MHz
  • Nvidia 8800GTS 320MB

Prerequisites

  • A bootable flash drive imaged with the Snow Leopard installer and iBoot. 
  • A hard drive just for Mac OS X
  • A working knowledge of Mac OS X and operating systems (good for debugging)

Log

  1. In the BIOS, change the SATA configuration to AHCI and sleep/suspend to S3. Possibly turn off overclocking to eliminate a confounding variable. Change the boot order such that the flash drive is first.
  2. Boot the computer. iBoot should show up with a choice for Install Mac OS X. Select it and press enter.
  3. Go through the installation as you would on a normal Mac. You may have to run Disk Utility and format the disk prior to installing. 
  4. After installing, the system should reboot to the flash drive. Now iBoot should show two options, Macintosh HD and Install Mac OS X. Select the former.
  5. Go through the setup assistant.
  6. Download the Mac OS X 10.6.8 combo updater from Apple's site and MultiBeast from tonymacx86. Run the system update, but do not restart. Then run MultiBeast with the following options selected: EasyBeast and System Utilities. Eject and remove the flash drive installer. Now restart.

    Well, that's unfortunate. Looks like EasyBeast kernel panics when trying to boot. At least it boots with iBoot.
  7. Install custom sound and ethernet drivers according to step 7 in Lifehacker. Reboot.

    Guess what, it hangs again. I rebooted with -v and it stops at USBMSC Identifier... Let's actually partition the disk into two partitions so that we can use one of them as a Time Machine backup so we don't have to reinstall every single time.
  8. To get sound, use the VoodooHDA.kext in the Post Install folder in Lifehacker.
  9. To get graphics, use OSX86Tools to retrieve the hex codes for boot.plist. You'll probably also need to do the same thing for networking (otherwise the App Store does not work), but the process for two devices is different: save the hex codes of each to respective plists and use the built-in utility to merge the plists into the boot.plist
  10. Reboot and voilà! Well sort of; the information in About the Mac is hilariously wrong.


Credits


28 August 2011

Compiling SDL on Lion

I ran into this problem while trying to compile Gingerbread on Lion, figuring that the existing SDL was a 64-bit library and Android wanted the 32-bit one. I grabbed the source from the SDL website and tried to compile using the -m32 flag in gcc, which resulted in several assembly errors. It turns out that this is a known incompatibility with llvm-gcc. [1] However, changing CC to gcc-4.2 wasn't good enough; ltmain.sh complains that it can't infer the tag configuration. [2]

Here is how I solved the problem: In build-scripts/makedep.sh, every time --mode=compile appears, put --tag=CC next to it. Then, in libtool, add a gcc-4.2 entry to the case statement in func_infer_tag() as follows:

case "$@ " in
  " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "* | "gcc-4.2"*)

It compiles! Install the library with sudo make install.

Unfortunately, the vanilla SDL and SDL used for the Android emulator aren't the same; besides the Android one being two releases earlier, I'm not too sure what the other differences are. The steps outlined above are not sufficient for building the SDL needed for the Android emulator. I'll report back if and when I get that working.

09 May 2011

Nyan Cat Alarm

This is quite possibly the silliest project I've done. Besides nchoosethree.com. Anyway.

The project was simple: to set up an alarm that would wake me up to the tune of nyan.cat every morning. Since I had just set up my lovely iMac G4 earlier that day, complete with my JBL Creature II speakers, I had something that could autonomously play loud and annoying music every morning, at the expense of my roommate's sleep. I could have done this two ways: (A) command line with cron and mplayer, or (B) with builtin Mac OS X apps. I chose the latter because I was lazy. So the troll begins:
  1. Get an MP3 of the Nyan Cat song of nontrivial length. I ripped mine from here.
  2. Create an Automator workflow as follows:
    1. Set system volume to some annoying but tolerable loudness.
    2. Tell iTunes to get the selected song (Nyan Cat, in this case).
    3. Tell iTunes to play the selected song.
      Then save the workflow as an Application.
  3. Create iCal events at the time when you wake up. Set an alarm to 0 minutes before and open up the Automator application. You may want to test this before going to sleep.
There you go! Troll in a box in five minutes! Unfortunately for me, I forgot that my Mac's clock was ahead by three hours, so creating wake-up events at 8:00am meant waking up to mute the speakers at 5:00am. Whoops!

06 January 2011

Apple Price Discrepancy Fail

Here is Aperture's page on the App Store. Notice the rather low price of $79.


Here is store.apple.com's listing of Aperture.


$120 for a box, CD, and some instruction pamphlets? Really, Apple?

09 September 2010

Mac Snac 004 - QuickLook X-Ray Folders

Here is a cool Mac OS X Snow Leopard trick that I found from the MacCast:

Well, here's a cool little trick I ran across while trying to find a way to hide the menu and scrollbars in Mac OS X. This one is a Terminal hack that you can perform in Mac OS X Snow Leopard to get folders in Quicklook preview to show up with transparent covers. This gives you an "x-ray" style view of the icons of items inside that folder. Pretty neat. Here's a little video on how to do it along with step by step instructions after the break:




Step-by-step
1) Launch Terminal (Applications–>Utilities–>Terminal)
2) Type in the following command:

    defaults write com.apple.finder QLEnableXRayFolders 1
3) Control+Option+Click the Finder icon in the dock and select ‘Relaunch’ to restart the Finder.
4) Select a folder in the Finder and press the spacebar to open it in Quicklook.
5) The folder icon should now have a transparent cover and you can see the icons of items inside the folder



Secrets – The GUI Method
1) Go to the Blacktree Site and download Secrets
2) Install Secrets. Double-click the .prefpane file and say OK when it asks if you want to install the Preference Pane.
3) Open System Preferences–>Secrets
4) In the ‘Top Secrets’ section check the box next to ‘Show X-ray folders in QuickLook’.
5) Click the ‘Quit This’ button to quit the Finder.
6) Click the Finder icon in the dock to relaunch the Finder.
7) Select a folder in the Finder and press the spacebar to open it in Quicklook.
8) The folder icon should now have a transparent cover and you can see the icons of items inside the folder


This is what it looks like:


[source]