Resolution

Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2008-11-05 01:07:59
Size: 600
Editor: c-67-168-233-128
Comment:
Revision 6 as of 2008-11-06 02:03:42
Size: 4121
Editor: c122-108-27-22
Comment: Make gnome-display-properties references consistent.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Resetting an out-of-range resolution ==

If you set a resolution inappropriate for your monitor in the {{{Screen Resolution}}} GUI tool, you can reset it by running {{{rm ~/.config/monitors.xml}}} from a terminal.

== Dynamically testing different resolutions ==

You can either use the {{{Screen Resolution}}} GUI tool to experiment with different resolutions, or the more powerful xrandr command-line tool:

{{{
  $ xrandr
}}}

Shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each. You can direct xrandr to set a different resolution like this:

{{{
  $ xrandr --output LVDS --mode 1024x768
}}}

The refresh rate may also be changed, either at the same time or independently:

{{{
  $ xrandr --output LVDS --mode 1024x768 --rate 75
}}}

Note that changes you make using {{{xrandr}}} only last through the current session. xrandr has a lot more capabilities - see {{{man xrandr}}} for details.

Line 3: Line 30:
Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. To fix this, run {{{gksudo gedit /etc/X11/xorg.conf}}}, and find the {{{Screen}}} section. Add a {{{Display}}} subsection like this, adding the resolutions that you need. Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. For example, the EDID data block queried from your monitor may be incorrect.

If the mode already exists, but just isn't associated for the particular output, you can add it like this:
Line 6: Line 35:
  $ xrandr --addmode S-video 800x600
}}}

If the mode doesn't yet exist, you'll need to create it by specifying a modeline:

  $ xrandr --newmode <ModeLine>

You may create a modeline using the {{{gtf}}} or {{{cvt}}} utility.


== Setting xrandr changes persistently ==

There are several ways to make xrandr customizations permanent from session to session: a) .xprofile, b) kdm/gdm, c) xorg.conf. Each of these mechanisms will be discussed in turn.

=== Setting xrandr commands in .xprofile ===

A user's {{{~/.xprofile}}} file is executed on Xorg startup if it exists and is executable. You can copy and paste xrandr command line strings into this file so they're executed when you log in. For example:

{{{
  $ xrandr --output VGA-0 --mode 800x600
}}}

There are two disadvantages to using .xprofile for xrandr settings. First, it occurs fairly late in the startup process, so you'll see some resolution resizing during the initial screen draw; in some cases panel windows may resize improperly as a result. Second, as this is a per-user setting, it won't affect the resolutions of other users, nor will it alter the resolution on the login screen.

=== Setting xrandr commands in kdm/gdm startup scripts ===

Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/, while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts.

This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using .xprofile, and will apply to all users including the login screen.

=== Setting resolution changes in xorg.conf ===

While {{{xorg.conf}}} is largely empty these days, it can still be used for setting up resolutions. For example:

{{{
Section "Monitor"
    Identifier "External DVI"
    Modeline "1280x1024_60.00" 108.88 1280 1360 1496 1712 1024 1025 1028 1060 -HSync +Vsync
    Option "PreferredMode" "1280x1024_60.00"
EndSection
Section "Device"
    Identifier "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    Driver "ati"
    Option "Monitor-DVI-0" "External DVI"
EndSection
Line 7: Line 81:
        Identifier "Default Screen"
        Monitor "Configured Monitor"
        Device "Configured Video Device"
        SubSection "Display"
                Modes "1280x1024" "1024x768" "640x480"
        EndSubSection
    Identifier "Primary Screen"
    Device "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    DefaultDepth 24
    SubSection "Display"
        Depth 24
        Modes "1280x1024" "1024x768" "640x480"
    EndSubSection
EndSection
Section "ServerLayout"
        Identifier "Default Layout"
        Screen "Primary Screen"
Line 15: Line 94:

See {{{man xorg.conf}}} for full details on how to craft an {{{xorg.conf}}} file.

Resetting an out-of-range resolution

If you set a resolution inappropriate for your monitor in the Screen Resolution GUI tool, you can reset it by running rm ~/.config/monitors.xml from a terminal.

Dynamically testing different resolutions

You can either use the Screen Resolution GUI tool to experiment with different resolutions, or the more powerful xrandr command-line tool:

  $ xrandr

Shows you the names of different outputs available on your system (LVDS, VGA-0, etc.) and resolutions available on each. You can direct xrandr to set a different resolution like this:

  $ xrandr --output LVDS --mode 1024x768

The refresh rate may also be changed, either at the same time or independently:

  $ xrandr --output LVDS --mode 1024x768 --rate 75

Note that changes you make using xrandr only last through the current session. xrandr has a lot more capabilities - see man xrandr for details.

Adding undetected resolutions

Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. For example, the EDID data block queried from your monitor may be incorrect.

If the mode already exists, but just isn't associated for the particular output, you can add it like this:

  $ xrandr --addmode S-video 800x600

If the mode doesn't yet exist, you'll need to create it by specifying a modeline:

You may create a modeline using the gtf or cvt utility.

Setting xrandr changes persistently

There are several ways to make xrandr customizations permanent from session to session: a) .xprofile, b) kdm/gdm, c) xorg.conf. Each of these mechanisms will be discussed in turn.

Setting xrandr commands in .xprofile

A user's ~/.xprofile file is executed on Xorg startup if it exists and is executable. You can copy and paste xrandr command line strings into this file so they're executed when you log in. For example:

  $ xrandr --output VGA-0 --mode 800x600

There are two disadvantages to using .xprofile for xrandr settings. First, it occurs fairly late in the startup process, so you'll see some resolution resizing during the initial screen draw; in some cases panel windows may resize improperly as a result. Second, as this is a per-user setting, it won't affect the resolutions of other users, nor will it alter the resolution on the login screen.

Setting xrandr commands in kdm/gdm startup scripts

Both KDM and GDM have startup scripts that are executed when X is initiated. For GDM, these are in /etc/gdm/, while for KDM this is done at /etc/kde4/kdm/Xsetup. In either case, you can paste in an xrandr command line string into one of these scripts.

This process requires root access and mucking around in system config files, but will take effect earlier in the startup process than using .xprofile, and will apply to all users including the login screen.

Setting resolution changes in xorg.conf

While xorg.conf is largely empty these days, it can still be used for setting up resolutions. For example:

Section "Monitor"
    Identifier      "External DVI"
    Modeline        "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync
    Option          "PreferredMode" "1280x1024_60.00"
EndSection
Section "Device"
    Identifier      "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    Driver          "ati"
    Option          "Monitor-DVI-0" "External DVI"
EndSection
Section "Screen"
    Identifier      "Primary Screen"
    Device          "ATI Technologies, Inc. M22 [Radeon Mobility M300]"
    DefaultDepth    24
    SubSection "Display"
        Depth           24
        Modes   "1280x1024" "1024x768" "640x480"
    EndSubSection
EndSection
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Primary Screen"
EndSection

See man xorg.conf for full details on how to craft an xorg.conf file.

X/Config/Resolution (last edited 2013-02-01 14:19:52 by 91-157-220-54)