V2EX
   Category:
 Mac
Posted in Mac, Programming on September 1st, 2009 by Xin

After upgraded to Snow Leopard, the first thing I noticed is that my MacPorts installation stopped working. It’s due to the architecture change, since almost everything in Snow Leopard now shifts to 64-bit, old 32-bit MacPorts is no longer working.

My local web development depends on MacPorts, I use MacPorts to install Apache 2.2 and compile my own PHP 5.3 since I need some special PHP modules. When I’m going to compile PHP 5.3 under 10.6, I got this at last stage:

Undefined symbols:
"_res_9_dn_expand", referenced from:
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_php_parserr in dns.o
_zif_dns_get_mx in dns.o
"_res_9_search", referenced from:
_zif_dns_check_record in dns.o
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
"_res_9_init", referenced from:
_zif_dns_check_record in dns.o
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
"_res_9_dn_skipname", referenced from:
_zif_dns_get_record in dns.o
_zif_dns_get_mx in dns.o
_zif_dns_get_mx in dns.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1

After some Google I found it’s fixed if you add this line in EXTRA_LIBS in Makefile:

-lresolv

I guess it’s a bug in PHP 5.3 branch. And another thing you’ll need to care is to replace your MySQL installation with a 64-bit one. Then everything is with 64-bit super force. :)

Posted in Mac on January 7th, 2009 by Xin

As a developer and also a gamer with MacBook Pro Unibody, I found it was a pain to play games on this gorgeous machine, because it always turns to black screen when I’m playing any 3D intensive games in Windows Vista, then I’ll have to press power button for several seconds to force the machine to shut down.

I searched the Internet and found a lot people are experiencing the same:

http://discussions.apple.com/thread.jspa?threadID=1767221&tstart=0

So I’m wondering:

  1. Is Apple shipping faulty chips in the latest MacBook Pro?
  2. Or it’s just a driver issue?

After days of attempts, I finally figured out a way to make the machine stable when gaming. Here is how:

Update Drivers

Drivers included in Bootcamp are just too old, one big problem I experienced is crappy sound, it’s fixed after updated drivers.

You’ll need to download and install these three driver packages:

Realtek HD Audio Codec Driver

Download URL: http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=24&Level=4&Conn=3&DownTypeID=3&GetDown=false

As of writing, the latest version is 2.13, this will fix the problematic sound quality.

nForce Driver

Download URL: http://www.nvidia.com/object/nforce_vista_20.08.html

As of writing, the latest version is 20.08. This will update drivers of your logic board and networking.

GeForce Driver

nVIDIA has released an official version of laptop driver, but it’s still at 179.x, I’m using the latest 180.x version. As a software engineer, my experience told me that the latest version could always contain undiscovered fixes which are good. Believe it or not.

You can find various latest nVIDIA GeForce drivers here:

http://www.laptopvideo2go.com/

Install nVIDIA System Tools

After updated all drivers, if you’re still experiencing black screen of death, it could be caused by some settings of fan speed is messed. I noticed that every time my MBP turns BSOD, it’s just too quiet, because the fans are not speeding up at all and the whole shell is as hot as hell.

I heard that RivaTuner can tweak fan speed settings, but its shattered UI really scared me, I’m afraid I may get more things messed with RivaTuner. So I turned to try nVIDIA System Tools, the official utility provided by nVIDIA for performance and monitoring stuff. You can download it here:

http://www.nvidia.com/object/nvidia_system_tools_6.03.html

As of writing, the latest version is 6.03. After installed, it will ask you to reboot the computer, and just follow that.

nVIDIA System Tools adds several panels in control panel, and you’ll find the option that lets you set cool down percentage is gray. I don’t know why but it’s normal, maybe. Since this nVIDIA part is assembled by Apple?

Then try your 3D intensive games like Call of Duty: World at War or Prince of Persia, you’ll notice that fans are speeding up as you enter game scenes. And I haven’t experienced a crash since I installed nVIDIA System Tools. So I guess it fixed some mess in fan speed settings, and that saves the machine from BSOD? At least it seems Apple is not shipping faulty chips in my MacBook Pro?

Best wishes to you and one more thing I may have to remind you, your mileage may vary.

Posted in Mac on October 11th, 2008 by Xin

After update to the latest version of Adium, I found it can support offline message in Live messenger protocol, cool.

Posted in Mac on October 3rd, 2008 by Xin

VLC, MPlayer and Perian are three major choices for playing media files on Mac OS X, most otakus who download and watch a lot videos usually have all of them. If you don’t care about subtitle support, then MPlayer could be good choice, it has fast and reliable seek-n-play for MKV and other H264/X264 videos.

But when subtitle and performance came to a problem, the three players have very different routines to handle.

VLC

VLC

Cross-platform media player works on Windows, Mac, Linux, BeOS, Solaris, Syllable, NetBSD, OpenBSD, FreeBSD, for various audio and video formats.

Website: http://www.videolan.org/vlc/

  • A sophisticated control panel to let you configure font render module, type face, style.
  • Supports ASS/SRT formats
  • Latest version, 0.9.3, seems to have the defects of seeking
  • Older version, 0.8.6i, cannot support anti-aliasing font scaling
  • Too many clicks in the complicated dialog for opening video and subtitle together, bad user experience

MPlayer

MPlayer OS X Extended

Cross-platform CLI player works on Windows, Mac, Linux, BeOS, Solaris, Syllable, NetBSD, OpenBSD, FreeBSD. On some platforms there are GUI front-ends.

Website: http://www.mplayerhq.hu/
MPlayer OS X: http://mplayerosx.sourceforge.net/
MPlayer OS X Extended: http://mplayerosx.sttz.ch/

  • Very poor ASS support
  • Overall poor subtitle support, MPlayer OS X Extended has some support for customizing font style
  • Fast and reliable seeking
  • Better H264/X264 framerate compared to VLC

Perian

A free, open source QuickTime component that adds native support for many popular video formats. For Mac OS X only.

Website: http://www.perian.org/

  • Not as fast as MPlayer when play H264/X264
  • No way to customize font style, but the default style is really polished and beautiful
  • Mature ASS support
  • Load subtitle automatically

Conclusion:

For overall experience, Perian is recommended for its relative mature subtitle support and reliable framerate.

Disclaimer:

This post is based on my experience with the three players, I use them mostly for playing MKV and other H264/X264 formats, in HD quality. My testing machine is a MacBook Pro 17-inch with Core 2 Duo 2.5G and 4G RAM.

Feel free to correct me in comments if you find anything wrong in this post.