The screen resolution refers to the number of pixels that your monitor displays horizontally and vertically. For example, a resolution of 1920×1080 means there are 1920 pixels horizontally and 1080 pixels vertically.

Higher resolutions result in a sharper and more detailed image on your screen. However, higher resolutions also require more processing power from your graphics card. Ubuntu gives you options to change resolutions easily using both command line tools and graphical user interfaces.

Checking Current Screen Resolution on Ubuntu

Before changing your screen resolution, it‘s useful to check what resolution you currently have set. Here are a couple ways to check:

Using xrandr

xrandr is a command line utility for getting screen resolution info and changing settings. To see your current resolution, open a terminal and type:

xrandr

This will print out details about your connected screens, resolutions, refresh rates and more. Look for the line showing your currently active resolution marked with an asterisk (*).

For example:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1920x1080     60.00 +  60.05*   59.93    59.94  
   1680x1050     59.95    59.88  
   ...

This indicates the current resolution is 1920×1080.

Using GNOME Settings

If you use the GNOME desktop environment, you can check the resolution in System Settings:

  1. Go to System Settings > Displays
  2. Look at the Resolution drop down menu to see the current resolution

This shows the resolution in a more friendly graphical format rather than exact pixel dimensions.

Changing Screen Resolution on Ubuntu

Once you know your current resolution, you can change it using either the command line with xrandr or the GNOME display settings.

Using xrandr Command

To change your screen resolution with xrandr, use the -s option followed by the new resolution you want in the format {width}x{height}.

For example to set a resolution of 1280×720 pixels, run:

xrandr -s 1280x720

You can find all your available resolutions from running just xrandr without any options as covered earlier.

Some extra tips for using xrandr:

  • Use standard resolutions like 1920×1080 rather than arbitrary sizes for best compatibility
  • Lower resolutions allow better performance on lower powered machines
  • Adding the -r option sets the refresh rate alongside the resolution

For example:

xrandr -s 1920x1080 -r 60

This sets a 1080p resolution at 60 Hz refresh rate.

I recommend sticking to common 16:9 resolutions like 1920×1080 or 1280×720 for most uses. But xrandr gives you the flexibility to test any arbitrary resolution your GPU and monitor support.

Using GNOME Display Settings

If using the GNOME desktop environment, you can change resolutions using the graphical display settings:

  1. Go to System Settings > Displays
  2. Click on the attached monitor
  3. Under Resolution, select your desired new resolution
  4. Click Apply

This will prompt you to keep the changes or revert back after 15 seconds. Confirm to apply the new resolution. Lower resolutions may be better for laptops or older graphics cards that can‘t handle higher pixel counts.

The GNOME settings tool provides an easy way to switch between common resolutions. But for more advanced configuration, the xrandr command gives you more control.

Advanced Custom Resolutions

Both xrandr and GNOME settings allow you to select from a number of predefined resolutions that your display reports it can support. But sometimes you may want to create a fully custom resolution not in that predefined list.

Defining custom video modes is possible by creating new Modeline definitions. This tells your GPU and monitor specs for an exact mode that may not be officially supported.

For example to add a resolution of 1680×1050 pixels at 60 Hz:

  1. Create a new xorg config file:
sudo nano /etc/X11/xorg.conf.d/10-monitor.conf
  1. Add this content to specify the custom modeline:
Section "Monitor"  
    Identifier "eDP-1"
    Modeline "1680x1050_60.00"  147.14  1680 1784 1968 2256  1050 1051 1054 1087 -hsync +vsync  
EndSection
  • Replace "eDP-1" with your monitor name from xrandr output
  • The Modeline defines a video mode of 1680×1050 @ 60 Hz
  1. Save changes and restart the display manager:
sudo service gdm restart 

Your new custom resolution should now be available in your display settings!

The process can be more complex for multiple monitors, high refresh rates, or resolutions beyond your monitor‘s specs. But this covers the basics of adding a new video mode not already exposed through EDID.

With custom modelines, you can fine tune resolution and timing configurations for specialized use cases like gaming, legacy monitor support, or matching projection screens. Just take care not to exceed your hardware capabilities.

Multi-Monitor Resolution Configuration

When connecting two or more monitors to Ubuntu, you may want to tweak their resolution settings individually or relative to each other.

For example, setting your primary monitor to a higher resolution while leaving secondary displays at a lower resolution that matches their native specs. Or aligning both monitors to use the same resolution can help align desktop space and mouse movement between them.

Here are some examples of configuring multi-monitor resolutions with xrandr:

Matching Resolutions on Dual Monitors

To set two monitors to the same 1080p resolution:

  1. Identify monitors in xrandr (e.g. eDP-1 and HDMI-1)
  2. Turn off both monitors first
  3. Set 1920×1080 resolution on each
  4. Turn monitors back on
xrandr --output eDP-1 --off
xrandr --output HDMI-1 --off 

xrandr --output eDP-1 --mode 1920x1080 --rate 60  
xrandr --output HDMI-1 --mode 1920x1080 --rate 60   

xrandr --output eDP-1 --auto 
xrandr --output HDMI-1 --auto
Individual Resolutions

For high and low-DPI multi-screen:

xrandr --output eDP-1 --mode 2560x1440 --rate 60
xrandr --output HDMI-1 --mode 1280x720 --rate 60  
Portrait Mode Secondary

Setup rotated 1920×1080 secondary beside landscape primary:

xrandr --output HDMI-1 --mode 1920x1080 --rate 60 --left-of eDP-1 
xrandr --output HDMI-1 --rotate left

Having precise control over each display output allows crafting the exact multi-monitor layout you need.

Matching Resolution to Workload

There are also functional benefits to modifying screen resolution beyond just improved image quality. Lower resolutions can help improve GPU performance in video games or applications that are bottle-necked by pixel count.

For example gaming on a 4K monitor may show sharper details, but running at 1080p could nearly double framerates by reducing the workload. The same applies for applications like video editing software that process ever pixel – lowering resolution saves GPU resources for the actual editing tools rather than just driving more dense displays.

Here are some tips for matching resolution to workload:

  • For desktop usage, aim for monitor‘s native resolution for crisp text
  • Lower resolutions while gaming to prioritize framerate
  • Video production balance between quality and timeline responsiveness
  • CAD/CAM applications need high resolution for intricate details
  • Development may use lower resolution for more readable text

The needs can vary drastically across use cases. But having full control over configurable resolutions gives you the flexibility to optimize for specific tasks.

Troubleshooting Issues

Sometimes applying a new resolution can cause issues:

  • Screen may go blank and not come back
  • Errors trying to apply an invalid resolution
  • Login loop if graphical environment fails to load

If you run into any major issues, boot Ubuntu into recovery mode to reset the graphical settings:

  1. Reboot and select Advanced Options > Recovery Mode
  2. Choose the "Repair broken packages" option
  3. After repair, choose Resume Normal Boot

Additionally, pressing Ctrl+Alt+F1 through F6 during boot can access virtual terminal modes in case graphical mode fails to load. From there you can try to run xrandr again or use the CLI to repair any issues. This allows fixing problems even when the GUI fails to properly apply resolutions.

For less severe cases:

  • Check xrandr for errors applying a mode
  • Verify custom modelines match hardware capabilities
  • Test lowering resolution, refresh rate
  • Update graphics drivers if resolution stops working after an upgrade
  • Test primary monitor versus secondary displays

Collecting debug info in the virtual terminals is crucial for troubleshooting.

Comparison to Other Display Servers

The xrandr tool on Ubuntu controls screen resolution by interfacing with the X Window System. But modern Linux desktops are transitioning to next-generation display servers like Wayland.

Wayland handles resolutions and multi-monitor configuration in a more advanced way than the older X11 architecture. For example, Wayland can apply fractional scaling across mixed-DPI outputs.

However, adjusting resolutions manually under Wayland is more complex:

  • No centralized xrandr tool – settings split across various CLI tools
  • More limited control – relies on GUI frontend tools
  • Custom modes through modelines not well supported
  • More variation between desktop environments

Additionally, the transition to Wayland is still underway with X11 still in widespread use. So for now, xrandr remains a crucial tool for modifying screen resolutions.

Long term, Wayland does promise improvements specifically for handling HiDPI and multi-monitor setups. But X11 and xrandr will continue to play an important role especially for customized configurations.

HiDPI and Retina Displays

Another consideration for resolution settings is properly supporting ultra high resolution panels. Screens with resolutions 4K and beyond orpixel densities over 200 PPI bring additional usability concerns.

Without proper operating system and application support, interfaces rendered at native resolution on a HiDPI display can appear uncomfortably small. Careful management of DPI scaling across multi-monitor setups combining normal and HiDPI outputs is also crucial.

Both GNOME and xrandr provide some support for enabling correct DPI scaling or pixel doubling on high density outputs:

  • GNOME Settings allows adjusting scale factor
  • xrandr --scale option for scaling output
  • Mixed DPI still has many edge case problems

But even with improvements, Linux desktop support for HiDPI remains inconsistent compared to other platforms. Getting an ideal experience across a breadth of desktop programs is difficult.

For maximum compatibility, sometimes running a super high resolution monitor like a 5K display in a lower 1080p resolution can optimize for application UI legibility while still gaining some of the sharpness benefits. But overall, advancing high density display support remains an ongoing area of development.

The Past and Future of Display Resolution Standards

Display resolutions have evolved tremendously over the past decades. CRT monitors originally operated at a very low 640 × 480 resolution. The introduction of LCD, flat panel, and widescreen aspect ratio monitors gradually increased standard resolutions to 720p, 1080p and beyond.

We now see 4K 3840 × 2160 becoming a common standard even for relatively affordable desktop monitors and TVs. And resolutions continue to advance with 5K, 6K monitors, and 8K TVs now available.

Panel manufactures are developing even higher pixel density screens reaching the retina display territory seen in phones and tablets. Nvidia‘s latest GPUs already support up to 16K resolution monitors spanning multiple displays in a giant desktop array configuration.

These trends towards ever-higher monitor resolutions look to continue. DisplayPort 2.0 specs allow resolutions up to 16K alongside bandwidth for HDR visuals at 1000 nits peak brightness. The roadmap extends to DisplayPort 2.1 supporting over 30K resolutions across multiple whole monitor walls.

As these futures standards become tomorrow‘s desktop monitors, having robust support for not just standardized resolution settings but fully configurable custom resolutions will only grow in importance.

Maximizing interoperability and visual quality across the breadth of monitor capabilities demands flexible tools like xrandr and Modeline definitions that Ubuntu and other Linux operating systems provide. Tight integration across graphics APIs, display servers, and desktop shell UI will help fully realize the future potential.

Conclusion

Getting familiar with tools like xrandr gives you extensive flexibility in customizing Ubuntu‘s screen resolution to meet specialized needs. Simple monitor tweaks can improve workflow when using multiple displays or working on smaller laptop panels. And unlocking advanced configuration options supports novel use cases across research, content creation, development, and gaming.

Carefully testing resolution changes and planning recoverability ensures you can always return Ubuntu to a usable state. As display technology continues evolving towards 8K, 10K panels and beyond, the underlying OS capabilities provided by graphics APIs and display servers combines with user-centric utilities like xrandr to deliver universal access to tomorrow‘s pixel densities.

Let me know if you have any other questions!

Similar Posts