Xrandr: Difference between revisions
Created page with " {{Draft}} {{Linux}}" |
Ollama: improve existing draft article |
||
| Line 1: | Line 1: | ||
[[Xrandr]] is a command-line tool used in the X Window System to configure and manage display settings on Linux and Unix-like operating systems. It allows users to adjust screen resolutions, rotate displays, position monitors, and manage multiple display outputs dynamically. As part of the X.org ecosystem, [[Xrandr]] provides a flexible interface for interacting with graphics hardware and display managers, making it a key utility for system administrators and users requiring advanced display configurations. |
|||
{{H2|Functionality}} |
|||
[[Xrandr]] operates by querying and modifying the X server's display configuration through the RandR (Resize and Rotate) extension. This extension enables features such as changing screen resolutions, adjusting refresh rates, and repositioning monitors. The tool reads information about connected displays from the X server and applies user-defined settings, which can be particularly useful for laptops with external monitors or multi-monitor setups. Key functionalities include: |
|||
- **Resolution Adjustment**: Users can set specific resolutions for each connected display, ensuring compatibility with different screen sizes and aspect ratios. |
|||
- **Display Rotation**: Supports portrait, landscape, and custom rotation angles for monitors. |
|||
- **Positioning**: Allows users to arrange monitors in custom layouts, such as side-by-side or stacked configurations. |
|||
- **Multiple Monitors**: Manages extended desktop setups, mirroring, and cloning displays. |
|||
{{H2|Usage}} |
|||
To use [[Xrandr]], users typically execute commands in the terminal. Common examples include: |
|||
- **Checking Connected Displays**: |
|||
`[[Xrandr]] --query` |
|||
This command lists all connected displays, their current resolutions, and available modes. |
|||
- **Setting Resolution**: |
|||
`[[Xrandr]] --output HDMI-1 --mode 1920x1080` |
|||
This sets the resolution of the display connected via the HDMI-1 port to 1920x1080 pixels. |
|||
- **Rotating a Display**: |
|||
`[[Xrandr]] --output DP-1 --rotate left` |
|||
This rotates the display connected via the DP-1 port to the left. |
|||
- **Positioning Monitors**: |
|||
`[[Xrandr]] --output HDMI-1 --pos 1920x0 --output DP-1 --pos 0x0` |
|||
This positions the HDMI-1 display to the right of the DP-1 display. |
|||
{{H2|Configuration Options}} |
|||
[[Xrandr]] supports a wide range of configuration options, including: |
|||
- **Refresh Rates**: Users can specify refresh rates using the `--rate` option, which is particularly useful for high-refresh-rate monitors. |
|||
- **Primary Display**: Setting a primary display with `--primary` helps organize the desktop layout. |
|||
- **Scaling**: Some versions of [[Xrandr]] allow scaling of displays to match different resolutions, though this is often handled by the X server or compositors like X11 or Wayland. |
|||
{{H2|Troubleshooting}} |
|||
Common issues when using [[Xrandr]] include incorrect resolutions, display detection failures, or conflicts with other display managers. To address these: |
|||
- **Verify Hardware Support**: Ensure that the graphics card and connected displays support the desired resolution and refresh rate. |
|||
- **Check for Conflicts**: If [[Xrandr]] fails to apply settings, check for conflicts with display managers like `xorg`, `KDE Plasma`, or `GNOME`. |
|||
- **Use Debug Options**: Running `[[Xrandr]] --verbose` can provide detailed output for diagnosing configuration issues. |
|||
{{H2|External Links}} |
|||
- [X.org documentation on RandR](https://www.x.org/wiki/RandR) |
|||
- [Arch Linux Wiki: [[Xrandr]]](https://wiki.archlinux.org/title/[[Xrandr]]) |
|||
- [Ubuntu Community Help: [[Xrandr]]](https://help.ubuntu.com/community/[[Xrandr]]) |
|||
{{Draft}} |
|||
{{Linux}} |
{{Linux}} |
||
{{Ollama}} |
|||
{{Pending Human Review}} |
|||
Latest revision as of 03:04, 28 October 2026
Xrandr is a command-line tool used in the X Window System to configure and manage display settings on Linux and Unix-like operating systems. It allows users to adjust screen resolutions, rotate displays, position monitors, and manage multiple display outputs dynamically. As part of the X.org ecosystem, Xrandr provides a flexible interface for interacting with graphics hardware and display managers, making it a key utility for system administrators and users requiring advanced display configurations.
Functionality
Xrandr operates by querying and modifying the X server's display configuration through the RandR (Resize and Rotate) extension. This extension enables features such as changing screen resolutions, adjusting refresh rates, and repositioning monitors. The tool reads information about connected displays from the X server and applies user-defined settings, which can be particularly useful for laptops with external monitors or multi-monitor setups. Key functionalities include:
- **Resolution Adjustment**: Users can set specific resolutions for each connected display, ensuring compatibility with different screen sizes and aspect ratios. - **Display Rotation**: Supports portrait, landscape, and custom rotation angles for monitors. - **Positioning**: Allows users to arrange monitors in custom layouts, such as side-by-side or stacked configurations. - **Multiple Monitors**: Manages extended desktop setups, mirroring, and cloning displays.
Usage
To use Xrandr, users typically execute commands in the terminal. Common examples include:
- **Checking Connected Displays**:
`Xrandr --query` This command lists all connected displays, their current resolutions, and available modes.
- **Setting Resolution**:
`Xrandr --output HDMI-1 --mode 1920x1080` This sets the resolution of the display connected via the HDMI-1 port to 1920x1080 pixels.
- **Rotating a Display**:
`Xrandr --output DP-1 --rotate left` This rotates the display connected via the DP-1 port to the left.
- **Positioning Monitors**:
`Xrandr --output HDMI-1 --pos 1920x0 --output DP-1 --pos 0x0` This positions the HDMI-1 display to the right of the DP-1 display.
Configuration Options
Xrandr supports a wide range of configuration options, including:
- **Refresh Rates**: Users can specify refresh rates using the `--rate` option, which is particularly useful for high-refresh-rate monitors. - **Primary Display**: Setting a primary display with `--primary` helps organize the desktop layout. - **Scaling**: Some versions of Xrandr allow scaling of displays to match different resolutions, though this is often handled by the X server or compositors like X11 or Wayland.
Troubleshooting
Common issues when using Xrandr include incorrect resolutions, display detection failures, or conflicts with other display managers. To address these:
- **Verify Hardware Support**: Ensure that the graphics card and connected displays support the desired resolution and refresh rate. - **Check for Conflicts**: If Xrandr fails to apply settings, check for conflicts with display managers like `xorg`, `KDE Plasma`, or `GNOME`. - **Use Debug Options**: Running `Xrandr --verbose` can provide detailed output for diagnosing configuration issues.
External Links
- [X.org documentation on RandR](https://www.x.org/wiki/RandR) - [Arch Linux Wiki: Xrandr](https://wiki.archlinux.org/title/Xrandr) - [Ubuntu Community Help: Xrandr](https://help.ubuntu.com/community/Xrandr)
Technical articles in this category are applicable to Linux. Debian GNU/Linux is used in examples. Much of the information is also applicable to other Linux distributions and Unix flavours.
This page contains information generated by Ollama. The information was reviewed, and may have been altered, by a human editor before being added to the Featured category. As of July 2026 information generated by AI is not subject to copyright and is thus in the public domain. This page is pending human review.