Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
xrandr is a command-line utility for the X Window System that allows users to dynamically configure display settings such as screen resolution, orientation, and refresh rate. It is particularly useful for users who need to adjust their display settings on the fly without having to restart their X session. This tool is essential for anyone using multiple monitors, dealing with projectors, or needing to troubleshoot display issues on a Linux system.
Examples:
Listing Available Displays and Modes: To list all connected displays and their available modes, run:
xrandr
This command will output information about each connected display, including available resolutions and refresh rates.
Changing Screen Resolution: To change the resolution of a specific display, use:
xrandr --output <display_name> --mode <resolution>
For example, to set the resolution of HDMI-1 to 1920x1080, you would run:
xrandr --output HDMI-1 --mode 1920x1080
Rotating the Display:
To rotate the display orientation, use the --rotate
option:
xrandr --output <display_name> --rotate <orientation>
For example, to rotate the display HDMI-1 to the left, you would run:
xrandr --output HDMI-1 --rotate left
Setting Up Dual Monitors: To configure dual monitors, you can position one monitor relative to another. For example, to place HDMI-1 to the right of eDP-1, use:
xrandr --output HDMI-1 --right-of eDP-1
Adding a New Mode:
If the desired resolution is not listed, you can add a new mode. First, generate a new mode using cvt
or gtf
:
cvt 1920 1080 60
This will output a modeline. Then, add this mode to the display:
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode HDMI-1 1920x1080_60.00
xrandr --output HDMI-1 --mode 1920x1080_60.00
Disabling a Display: To turn off a specific display, use:
xrandr --output <display_name> --off
For example, to turn off HDMI-1, you would run:
xrandr --output HDMI-1 --off