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. :-)


UPDATE:


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. 


END UPDATE



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
        EndSubSection
EndSection

\* 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     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

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/"
EndSection

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

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

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

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

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"
EndSection

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

--- end xorg.conf file ---

Comments:

Useful information :)

Did you get the audio and the two finger tap working as well ?

-- Sriram

Posted by Sriram Narayanan on October 11, 2008 at 06:34 PM CDT #

@Sriram - Not yet. When / if I get them working I will post a new blog entry for it. Currently working on audio.

Posted by charliebrown on October 12, 2008 at 12:56 AM CDT #

@Sriram - An update, but not worthy of a blog entry. I now have the audio device configured properly. But, I'm not getting any sound from the built-in speakers. In case you're interested in getting the audio device configured ... Download the latest audiohd device driver from http://www.opensolaris.org/os/community/device_drivers/files/. It's the one labeled, audiohd-2008-08-25.tar.gz. Gunzip and extract the tar file. Then, copy the obj32/audiohd file to /kernel/drv/ and copy the obj64/audiohd file to /kernel/drv/amd64/. Then, log out and log back in. If you use the Device Driver Utility GUI under System > Administration > Device Driver Utility you should that your audio device is configured (worked on my MacBook Pro). You can also do a 'dmesg | grep audiohd' and you should see that the device gets configured. You should also notice that your volume icon on the your desktop no longer shows it is muted. When I get the speakers working, I will post a blog entry with more detailed instructions.

Posted by charliebrown on October 12, 2008 at 02:05 AM CDT #

Yet another update. There is a known bug filed with OpenSolaris on audiohd with the MacBook Pro. It appears one could use OSS which supports this chipset. However, OSS has some issues too - the only way to hear sound is to insert the headphones into the microphone jack and select that as the place to send audio using ossmixer. At the moment, when OpenSolaris is booted it looks like the headphone jack is in "optical mode" as I can clearly see a red light coming from that jack. I am exchanging e-mails with a device driver engineer on OpenSolaris to see if the root cause can be isolated. I will add new / addl comments to this blog as things progress.

Posted by charliebrown on October 14, 2008 at 11:50 PM CDT #

Post a Comment:
Comments are closed for this entry.
About

charliebrown

Search

Top Tags
Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today