The Source for Java Technology Collaboration
User: Password:



Brian Leonard

Brian Leonard's Blog

OpenSolaris 2008.05: Configuring an External Monitor

Posted by bleonard on May 29, 2008 at 09:06 AM | Comments (5)

If you have an NVIDIA graphics card, OpenSolaris 2008.05 comes with a sweet NVIDIA utility for working with their cards. The only problem is that is seems pretty worthless w/out an existing xorg.conf file and the proper permissions to write to it:


These are the steps I took to configure my external display.

Step 1: Generate an xorg.conf File

Open a terminal and run: pfexec nvidia-xconfig

bleonard@opensolaris:~$ pfexec nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

sh: line 1: pkg-config: not found
sh: line 1: pkg-config: not found
New X configuration file written to '/etc/X11/xorg.conf'

bleonard@opensolaris:~$

Step 2: Configure NVIDIA Settings To Run with the Proper Privileges

Launching the NVIDIA X Server Settings GUI from the Applications > System Tools menu seems fairly worthless, as it doesn't have the proper privileges to make changes to xorg.conf:

 

NVIDIA Settings can be run from the command line using: pfexec nvidia-settings

But let's fix the menu so it's not so worthless:

  • From the terminal run: pfexec vi /usr/share/applications/nvidia-settings.desktop
  • Prefix the Exec command with pfexec. The complete line should look as follows:

    Exec=pfexec /usr/bin/nvidia-settings

  • Save the changes (:wq)

Step 3: Configure You External Monitor

  • Run Applications > System Tools > NVIDIA X Server Settings
  • Select X Server Display Configuration:



  • Select your external monitor (mine's a Sun) and click Configure:



  • If necessary, you can change screen positions by dragging the screens, or by selecting the X Screen tab and setting the screen's Position:



  • Click Save to X Configuration File:

  • If you selected Separate X screen, log out and back in to restart the X server:

There are still some oddities. I use the Sun 24" monitor as my primary. Every now and then while working from the Sun display, a window opens on the laptop display. Also, for some reason, I cannot drag an open window from one display to the other, although my mouse moves easily between them and I can easily drag desktop icons across the displays.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Brian: Thanks so much...
    Finally I get the information I need from your blogs!!!
    Keep posting them, and the opensolaris community will be happy,

    Ludo

    Posted by: ludo on May 30, 2008 at 09:56 AM

  • For the desired behavior of dragging windows across displays, TwinView mode
    should have been selected instead of separate X screen from the third panel
    above. This mode requires neither saving xorg.conf nor restarting the X server
    (logout/login) nor special permission. The change is immediate and is saved in $HOME/.nvidia-settings-rc. Restoring this mode on subsequent logins can be
    automated by running "nvidia-settings --load-config-only" at startup.

    Separate X screen mode is somewhat foreign to MacOS and Windows users,
    but useful in some cases (but not this one). For the case where saving
    xorg.conf is desired, some of the above steps are not needed.

    Step 1 is not needed at all. The dialog box at the top is simply a warning
    that /etc/X11/xorg.conf doesn't exist. The file does not need to exist to
    write one.

    Using pfexec in step 2 is not needed either. The tool allows writing the
    file in your home directory if you don't run nvidia-settings with privilege.

    Using /etc/X11/xorg.conf is discouraged when not needed because it is
    a global file which effects all users. Restoring $HOME/.nvidia-settings-rc
    is preferred since it is per user. If we ever change the desktop startup such
    that a new X server is created when the user logs in, more can be done to
    make separate X screen configuration per user.


    Posted by: rugrat on May 30, 2008 at 02:42 PM

  • rugrat, thanks for this information. TwinView does indeed allow me to drag a window across displays. As you guessed, I did assume TwinView would behave like Mac OS's Mirror Displays option, forcing both displays to run at the same resolution, so I never even considered it.

    Now, I am having a problem loading the saved .nvidia-settings-rc after setting the configuration as I'm seeing the following errors:

    bleonard@opensolaris:~$ nvidia-settings -l

    ERROR: Invalid display device DFP-1 specified on line 20 of configuration file
    '/export/home/bleonard/.nvidia-settings-rc' (the currently enabled
    display devices are DFP-0 on :0.0).


    ERROR: Invalid display device DFP-1 specified on line 38 of configuration file
    '/export/home/bleonard/.nvidia-settings-rc' (the currently enabled
    display devices are DFP-0 on :0.0).


    I also noticed in the man page for nvidia-settings:

    8. TODO
    There are many things still to be added to nvidia-settings,
    some of which :

    - configurability of TwinView (NVIDIA is planning to
    implement this)


    It's not clear if this TODO involves the saving and loading of the .nvidia-settings-rc file, but I guess I'm left to using the xorg.conf file for now if I'd like to persist these settings. Finally, it's not clear to me why I would write xorg.conf to my home directory - how does the X server know to find it there?

    Regards,
    Brian

    Posted by: bleonard on May 30, 2008 at 06:53 PM

  • The error from nvidia-settings indicates the 24.1" panel (DFP-1) is not connected
    to your notebook (or not powered on).

    Posted by: rugrat on June 01, 2008 at 05:38 PM

  • FWIW, the original warning dialog box in your original posting should
    no longer appear if /etc/X11/xorg.conf just doesn't exist. I fixed this
    under bug 432106 and will deliver it to build 92.

    Posted by: rugrat on June 01, 2008 at 05:40 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds