Friday Oct 10, 2008

OpenSolaris on MacBook Pro, meet my external monitor

I got inspired by Brian Leonard's instructions instructions to install OpenSolaris natively on my MacBook Pro.  His instructions were very good!  I had only one minor change from his instructions.  That was in the running of the fdisk command.  My MacBook Pro / MacOSX version wanted a raw device, i.e. rdisk0, instead of disk0 as an arg to fdisk.

But, I had an additional requirement for my environment.  I've got an external 24" flat panel monitor I wanted to connect my MacBook Pro too. I like as much screen real estate as I can get. :-)


If you have installed or upgraded to OpenSolaris 2008.11, you may have noticed external displays are automatically detected and their resolution, placement, etc are easily manipulated with the "Configure Display Settings" icon in the upper right corner of OpenSolaris.  As a result, if you are running OpenSolaris 2008.11, (or later), you don't need to read the following instructions on how to setup an external display using xrandr commands.  If you are using OpenSolaris 2008.05, then you may find the following instructions useful. 


That proved to be a little bit of challenge, as a result of my MacBook Pro having an ATI graphics card. But, after a little research and trial & error I have it working. It probably would not have been as much of a challenge had my MacBook Pro been using a NVidia graphics card.  I got the impression from reading various blogs and such, support for NVidia graphics cards are much better, not only in OpenSolaris, but other operating systems too. Sorry ATI, this isn't the first time I experienced difficulties in working with ATI graphics cards.

For anyone who has a MacBook Pro with an ATI graphics card, mine has a Radeon Mobility X1600, and if you happen to want to connect to an external monitor, this might help you?

To add an external monitor to my MacBook Pro, I had to add an entry to my /etc/X11/xorg.conf file and use OpenSolaris xrandr to add the display.

Here's the details of what I did.

First, (while booted into OpenSolaris on the MacBook Pro), I added together the desired resolutions I wanted to use from both monitors, MacBook Pro lcd and external, both horizontal and vertical resolutions.  I added both horizontal and vertical so the external monitor could be added above / below, or right-of / left-of the MacBook Pro's lcd, (this will make more sense as you continue to read below).

I then used the OpenSolaris command xrandr -q with the external monitor cable connected to see the supported resolutions of the external monitor and the MacBook Pro's lcd.  I couldn't remember the exact resolutions either lcd or external monitor could support. %-)

Here's xrandr -q report of the resolutions my 24" external monitor and MacBook Pro lcd support:

xrandr -q
LVDS connected 1440x900+0+0 (normal left inverted right) 331mm x 207mm
   1440x900       60.0\*+
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9  
DVI-1 connected 1920x1200+1440+0 (normal left inverted right) 518mm x 324mm
   1920x1200      59.6\*+   59.9  
   1920x1080      60.0     60.2  
   1600x1200      59.9     60.1  
   1280x1024      76.0     75.0     59.9     60.0  
   1152x921       65.9  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1

Of course, I wanted the highest resolutions. :-)

Next, I added a "Virtual <horizontal max> <vertical max>" entry to the "SubScreen" SubSection of the "Screen" Section in my /etc/X11/xorg.conf file where <horizontal max> is the sum of the horizontal resolutions of the lcd and external monitor I want to have displayed. In my case, I want 1440 on the lcd and 1920 on the external monitor.  Hence, my horizontal max is 3360. Similarly for <vertical max>, sum the vertical resolutions of the lcd and external monitor I want to have displayed.  In my case, I want 900 on the lcd and 1200 on the external monitor. Hence, my vertical max is 1200.  Therefore, the entry I added to my xorg.conf file was "Virtual 3360 2100".  (Note, if you don't have an xorg.conf file and have a MacBook Pro configured with an ATI Radeon X1600 like I have, then just grab the xorg.conf file at the end of this blog entry and use/modify it to suite your needs.)

Here's my "Screen" Section and "SubScreen" SubSection in my xorg.conf file:

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Virtual 3360 2100 # <--- This is the newly added entry

\* My entire xorg.conf can be found below.

After saving the xorg.conf file, I shutdown the laptop, connected the external monitor and booted into OpenSolaris.

After logging into OpenSolaris, I ran the following xrandr commands:

xrandr --output LVDS --auto
\* NOTE: LVDS is my MacBook Pro's lcd screen as seen in the xrandr -q output.
xrandr --output DVI-1 --auto
\* NOTE: DVI-1 is my external monitor's screen as seen in the xrandr -q output.
xrandr --output DVI-1 --right-of LVDS
\* NOTE: This puts my external monitor's display to the "right of" my MacBook's lcd screen.  You can also specify --above, --below, or --left-of.

As a result of the above commands I have my 24" external monitor to the right of the MacBook Pro's lcd. :-)

This is my /etc/X11/xorg.conf file.
--- begin here ---

Section "ServerLayout"
        Identifier     " Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"

Section "Files"
        RgbPath      "/usr/X11/lib/X11/rgb"
        ModulePath   "/usr/X11/lib/modules/amd64"
        FontPath     "/usr/X11/lib/X11/fonts/TrueType/"
        FontPath     "/usr/X11/lib/X11/fonts/Type1/"
        FontPath     "/usr/X11/lib/X11/fonts/Type1/sun/"
        FontPath     "/usr/X11/lib/X11/fonts/F3bitmaps/"
        FontPath     "/usr/X11/lib/X11/fonts/misc/"
        FontPath     "/usr/X11/lib/X11/fonts/100dpi/"
        FontPath     "/usr/X11/lib/X11/fonts/75dpi/"

Section "Module"
        Load  "extmod"
        Load  "GLcore"
        Load  "xtrap"
        Load  "IA"
        Load  "record"
        Load  "glx"
        Load  "dbe"
        Load  "dri"
        Load  "freetype"

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/mouse"
        Option      "ZAxisMapping" "4 5 6 7"

Section "Monitor"
        #DisplaySize      340   220     # mm
        Identifier   "Monitor0"
        VendorName   "APP"
        ModelName    "Color LCD"

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "SWcursor"                  # [<bool>]
        #Option     "Dac6Bit"                   # [<bool>]
        #Option     "Dac8Bit"                   # [<bool>]
        #Option     "DDCMode"                   # [<bool>]
        #Option     "IgnoreEDID"                # [<bool>]
        #Option     "DisplayPriority"           # [<str>]
        #Option     "PanelSize"                 # [<str>]
        #Option     "ForceMinDotClock"          # <freq>
        #Option     "ColorTiling"               # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "RageTheatreCrystal"        # <i>
        #Option     "RageTheatreTunerPort"      # <i>
        #Option     "RageTheatreCompositePort"  # <i>
        #Option     "RageTheatreSVideoPort"     # <i>
        #Option     "TunerType"                 # <i>
        #Option     "RageTheatreMicrocPath"     # <str>
        #Option     "RageTheatreMicrocType"     # <str>
        #Option     "ScalerWidth"               # <i>
        #Option     "RenderAccel"               # [<bool>]
        #Option     "SubPixelOrder"             # [<str>]
        #Option     "ShowCache"                 # [<bool>]
        #Option     "DynamicClocks"             # [<bool>]
        #Option     "VGAAccess"                 # [<bool>]
        #Option     "ReverseDDC"                # [<bool>]
        #Option     "LVDSProbePLL"              # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "DRI"                       # [<bool>]
        #Option     "ConnectorTable"            # <str>
        #Option     "DefaultConnectorTable"     # [<bool>]
        #Option     "DefaultTMDSPLL"            # [<bool>]
        #Option     "TVDACLoadDetect"           # [<bool>]
        #Option     "ForceTVOut"                # [<bool>]
        #Option     "TVStandard"                # <str>
        #Option     "IgnoreLidStatus"           # [<bool>]
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "M56P [Radeon Mobility X1600]"
        BusID       "PCI:1:0:0"

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Virtual 3360 2100 # <--- This is the newly added entry

--- end xorg.conf file ---

Sunday Jun 03, 2007

Mac a good Java development platform ... NOT!

There is a poll on asking 'Is the Mac a good Java development platform?".  Rather than posting a (lengthy) comment to the poll, I thought a blog entry would be a better way to share my experience.

I am certain to offend many Mac lovers with this blog entry.

I have an Intel 2.33 GHz MacBook Pro w/ 2G of RAM.  Actually my wife bought it for me as a Christmas present.

Perhaps you are thinking, "Wow what a great Christmas present!" ?

Let me tell you about my (user) experience ...

I was quite excited  about the MacBook Pro.  I too had gotten a little caught up in Mac (over) hype.  But, my experience has been much less than what I would call good.  During the first 3 months I had the MacBook Pro, the OS would crash (complete machine reboot) on average about once every 8 hours of usage.  And, it would lock up on average about every 4 times coming out of a hibernate. And, I had several web sites that I visited frequently which would not open with Safari, (I even tried using Opera and FireFox too).   Not what most of you reading this would have expected from Mac?

Don't worry it gets better .... I got an e-mail from a company who was doing a "Give us (Apple) feedback on your MacBook Pro experience".  I had to laugh when I tried to open the URL in the e-mail only to find Safari would not load it.  I contacted the person who sent the e-mail to me.  Actually, that's how I found out that Apple was not the one doing the survey, they (Apple) had outsourced that task to the fella's company I was e-mailing.  Quite honestly the fella I e-mailed was very responsive and I found him quite helpful.  I tried many of the suggestions he gave me.  Unfortunately none of those helped.  He also attempted to get me some help from someone at Apple. But, no one from Apple ever responded.  It was about this same time that I had the '/' '?' key for no apparent reason decide to fall off the keyboard.

You can probably imagine what my attitude towards my MacBook Pro was about this time.

A few weeks went by, I had completely quit trying to use the machine.  For some reason I powered it on, I got a notification of an OS update.  I applied the update (patch).  Don't know what possessed me to try the web sites that would not previously open, but much to my amazement they started to open.  I began to use the MacBook Pro for the next several days in one last attempt to see I could figure out what some people had been telling me was "the Mac experience".
I used the MacBook Pro for the next several days.  The frequent OS crashes seemed to have disappeared and the frequent lock ups after hiberates seemed to have disappeared as well. But, I never did figure out what some people have found to be so wonderful about a Mac. 

The positives for the MacBook Pro are:   wireless connectivity is better than anything else I have used, hibernate (now that it works) is better than anything else I've seen.  On the negative side;  I hate the "menu at the top of the screen".  For someone who has become to use to menus on the main window of a program, I don't think I would ever get used to Mac's approach.  I also hate the fact of not having a right click-able mouse.  The only way I can get a right click-able mouse is via the attached wireless mouse, (of which did not come with my Mac).

The best thing I did with my MacBook Pro was downloading VMWare Fusion and installing OpenSolaris.  Now when I travel I take the MacBook Pro, use it's wireless connectivity and good hibernate support.  But, other than that .. that's it for me.  I always promptly boot up OpenSolaris.  I don't think I will ever be as productive (as a Java Developer) with a Mac as I'll be with Solaris.  My desktop development machine also runs OpenSolaris. I tried for several days to see if my productivity would improve in a MacOS environment but it didn't happen.  It's only when I boot OpenSolaris on it do I feel at home.

Powered by ScribeFire.

Saturday Jan 20, 2007

Been tagged and I am late

My good friend Gregg Sporar tagged me about 2 weeks ago.

So, why so late in responding to the tag ? (And it has been ages since I have had a blog entry :-( )

I have been chasing down a very nasty race condition bug that would not rear its head in a debugger or with any amount of instrumentation added to the code. And, it would only occur with at least 20 or more threads, (under heavy load). Yesterday I finally got it isolated and fixed. So, now is a good time to respond to Gregg's tag.

Here is five things many people do not know about me:

1.) I am child #12 in a family that has 13 kids. :-0 That's right! I have 6 brothers and 6 sisters.

2.) I graduated from high school with 43 other students.

3.) When I went to college, (I went to college at Iowa State), I was accepted there "conditionally". In other words, Iowa State put me on acedemic probation before I started my first semester. That's because my high school class ranking was 29 out of 44 and my ACT score was not high enough to get automatically accepted. But, the rest of the story is ... at Iowa State I graduate 2nd in my class with honors and distinction. Quite a change, huh?

4.) I have one boy that is 21 and a senior in college, (guess where? why of course Iowa State!). And, I have another boy that just turned 13 months. That's not a typo, I said 13 months.

5.) Outside of work, I have a rather "interesting" hobby. Many folks who read this blog may not know or understand what it is ... it is called "tractor pulling". I have a tractor that I take to competitions all over the midwest (US). If you don't understand what tractor pulling is about, you compete against others with their tractors to see who can pull the most weight down a 300 foot (~100 meter) track. Whoever can pull it the furthest is declared the winner. The tractor I have can from the factory with about 70 horsepower. After I made a few modifications, it now makes about 1500 horsepower! Perhaps you can understand my interest in performance? Why a tractor? I grew up on a farm and always enjoyed being around tractors. I also enjoyed the task of rebuilding the engines, (we had old used tractors).

There you have it ... five things few people know about me.

Now I'd like to hear 5 things about Brian Doherty, Dave Dagastine, Scott Oaks, Jeanfrancois Arcand and Ken Cavanaugh.

Thursday Dec 01, 2005

Pop Star visits Brazil

I have just returned from a 14 day visit from Brazil where I visited many different cities including: Belem, Sao Paulo, Salvador, Natal, Brasilina and Campinas. I met with Java many developers, Java Users Groups and customers who are using NetBeans.

I have a long standing joke with my good friend Edgar Silva from Brazil about being treated like a "pop star" when I visit Brazil. Now you should understand the title of this blog ;-)

Here is the rest of the story...

Early Wednesday morning (November 24), myself and Tim Boudreau were preparing to leave Sao Paulo for Salvador as part of our NetBeans Tour of Brazil. Both Tim and I planned to meet in the lobby of the hotel at 5:00am to check-out and leave for the airport. I checked out and waited for Tim in the lobby of the TransAmerica hotel in Sao Paulo.

I was surprised to see two young women and one their father's also waiting in the hotel lobby so early in the morning. Within a few minutes I saw two men approaching the hotel lobby, at closer look, one of the them was Robin Gibb of the Bee Gees. Robin had a couple photos taken with the two young women, obviously some kind of a concert promotion thing. Then, Robin visited for a few minutes before getting wisked away into a motorcade. And, as he left the hotel lobby the two young women let out a really loud squeal. I found that kinda funny.

Of course, as Robin left the hotel lobby, Tim Boudreau walked in. Then, I had to convince Tim that he had just missed Robin Gibb. As Tim and I left the hotel, I glanced up at an event center sign next to the TransAmerica hotel which said, "Welcome Robin Gibb".

It wasn't me who was the "pop star" who visited Brazil. ;-)

I may have visited Brazil, but I'm not \*the\* "pop star" who visited Brazil.

Sunday Nov 06, 2005

Four new NetBeans IDE books since July 1, 2005 :-O

Being one of the co-authors of the NetBeans IDE Field Guide, (published June 2005), I was curious to see what additional books have been published covering the NetBeans IDE 4.1. I was very pleasantly surprised. You can find quite a few NetBeans IDE books covering NetBeans IDE 4.1 in several different languages.

You can see a list of those books here:

And, another has been just published. Here's a translated page:

Sure looks like NetBeans adoption is accelerating. :-)




Top Tags
« December 2016