Adjusting your screen resolution in Ubuntu can significantly improve your viewing experience, whether you’re trying to fix display issues, optimize for a specific application, or simply prefer a different size. Sometimes, the desired resolution isn’t available by default, or modes are missing from your display settings. This guide walks you through how to change your screen resolution using the GUI and xrandr, including how to add missing modes to your display. Before starting, ensure your system is up to date and you have access to your user account with administrative privileges.
What You’ll Need
- An Ubuntu system (tested on versions 20.04, 22.04, and later)
- Access to the terminal (Ctrl+Alt+T)
- Basic familiarity with command-line operations
- Optional: A backup of your current display settings in case you need to revert
Step-by-Step
- Open the Display Settings GUI:
Click on the system menu at the top right corner, select the gear icon or go to Settings > Displays. Here, you can choose from available resolutions. If the resolution you want is listed, select it and click Apply. If not, proceed to the next steps to add a custom mode. - Open the Terminal:
PressCtrl+Alt+Tto launch the terminal window. You’ll use command-line tools to add new display modes. - Identify Your Display Output:
Run the commandxrandrand note the name of your display output, typically something likeeDP-1,HDMI-1, or similar. Example output:eDP-1 connected primary 1920x1080+0+0 (normal) ...
- Check Existing Modes:
In the same output, see the list of available modes. If your desired resolution isn’t listed, you’ll need to create and add it manually. - Create a New Mode Using cvt or gtf:
Use thecvtcommand to generate a modeline for your desired resolution. For example, to add 1920×1080 at 60Hz, run:cvt 1920 1080 60
This outputs a modeline similar to:
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
- Add the New Mode to xrandr:
Copy the modeline part after ‘Modeline’ and run:xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
- Associate the New Mode with Your Display Output:
Run:xrandr --addmode [YourDisplayOutput] "1920x1080_60.00"
Replace [YourDisplayOutput] with the output name you identified earlier.
- Apply the New Resolution:
Finally, set your display to use the new mode:xrandr --output [YourDisplayOutput] --mode "1920x1080_60.00"
This should change your resolution immediately. You can verify by checking the display settings or running
xrandragain. - Make the Changes Persistent:
To keep this resolution after reboot, create a script or modify your display configuration files. A common method is to add thexrandrcommands to your startup applications or a custom script executed at login.
Common Mistakes
- Using the wrong display output name, which causes commands to fail or affect the wrong monitor.
- Incorrectly copying or entering the modeline, leading to invalid display settings.
- Forgetting to add the new mode before setting it, which results in the desired resolution not appearing.
- Not making the new settings persistent, causing changes to revert after reboot.
- Trying to set resolutions higher than your hardware or driver supports, which can cause display issues or black screens.
Tips
- Use
cvtfor generating accurate modelines—avoid manually editing unless you understand the display timings. - Test new modes temporarily with
xrandrbefore making them permanent. - Backup your current display configuration before making changes, especially if you’re experimenting with custom modes.
- If you encounter black screens, revert to a known working resolution using the GUI or by resetting the display settings.
- Check your graphics driver documentation if certain resolutions or modes are unsupported, as some hardware limitations exist.
Troubleshooting
If your display isn’t adjusting as expected or the new modes don’t work, try the following:
- Revert to a previous working resolution: Use the GUI or run
xrandr --output [YourDisplayOutput] --mode [KnownGoodResolution]. - Ensure your display output name is correct: Run
xrandrand verify the name matches your connection. - Check for driver issues: Ensure your graphics drivers are up to date. For proprietary drivers, use ‘Additional Drivers’ in Ubuntu.
- Verify your modeline: Re-create the modeline with
cvtand ensure it doesn’t contain errors. - Try a different resolution or refresh rate: Some hardware may support only certain modes.
- Review system logs: Check
dmesgor/var/log/Xorg.0.logfor errors related to display or driver issues.
If problems persist, consider resetting your display configuration or seeking help from Ubuntu support forums with specific error messages and your hardware details.
Frequently Asked Questions
1. Can I add custom resolutions permanently in Ubuntu?
Yes, by creating scripts or editing configuration files like xorg.conf or using startup applications to run your xrandr commands at login.
2. Why is my desired resolution missing from the display settings?
Most likely, the mode isn’t supported by your hardware or driver, or it hasn’t been added manually. Using xrandr to add it usually resolves this.
3. Is it safe to set higher resolutions than my monitor supports?
Generally not. It can cause display issues, black screens, or hardware damage. Stick to resolutions supported by your monitor specifications.
4. How do I revert to default display settings?
You can reset your display to default by removing custom modes with xrandr --delmode or restoring from a backup configuration.
5. What should I do if my screen goes blank after changing resolution?
Reboot your system or switch back to a known good resolution using the GUI or terminal commands. Boot into recovery mode if necessary to fix display issues.
6. Can I change resolution using the GUI if modes are missing?
If the GUI doesn’t list your desired resolution, you’ll need to add it manually via xrandr as described. Once added, it should appear in the GUI options.
Related
- How to Change Keyboard Layout on Windows 11 or Windows 10
- How to Change Keyboard Layout in Windows 11 Step-by-Step Guide
- How to Change Keyboard Layout in Windows 10 and 11