Ultra-high-resolution displays with high pixel densities are all the rage now, and for good reason: They look amazing compared to conventional displays. The big problem for PC users is that a lot of software isn't designed with that level of pixel density in mind.
If you're running GNOME 3 in Linux, your first boot will have you looking for your reading glasses. (Windows suffers from similar issues with high-DPI displays.)
Luckily, you can save your eyes and enjoy that glorious screen you paid for with a few steps. This article will show you how to change the scaling settings for GNOME 3, Mozilla’s Firefox and Thunderbird, and Chromium.
Wait, what is HiDPI exactly, and why is it a problem?
If you've ever wondered why Apple's Retina displays look so sharp, it's because they have more dots (pixels) in every inch of the screen than a typical display. This is called high pixel-per-inch (ppi) or high pixel density. Pixels per inch is often used interchangeably with dots per inch (dpi), even though there is a difference between the two. Screens with high ppi are often referred to as HiDPI, high density, high resolution, or—in Apple parlance—Retina.
In the past, if you wanted more pixels, you usually needed to buy a physically bigger screen due to limitations in display technology. As a result, lots of software has been programmed assuming a relatively low pixel density. That software, when given a HiDPI display, will happily draw a window at exactly 1,024 pixels wide, just as it always has.
That creates problems in denser displays. My 15-inch Lenovo Yoga 2 Pro has a viewable area of 13.3 inches (11.59 inches wide and 6.52 inches tall). On this screen, that 1,024-pixel window appears 6.18 inches wide with a screen resolution of 1920x1080 (165.63 ppi), or a miniscule 3.71 inches wide at the Yoga 2 Pro’s native 3200x1800 (276.05 ppi) resolution.
To get an idea of what this looks like, check out these images. First, Rhythmbox as it appears unaltered on the Yoga 2 Pro’s HiDPI display.
That's a problem for usability, but we can fix it. Here’s how Rhythmbox looks post-tweaks.
Changing GNOME 3's dpi settings
To change the scaling settings in GNOME 3, you'll need the GNOME Tweak Tool. If you don't have it installed, you can probably find the package in your distribution's repository. You can do this by using one of the following commands as root or by prefixing them with the sudo command:
# yum install gnome-tweak-tool
# apt-get install gnome-tweak-tool
- Arch Linux:
# pacman -S gnome-tweak-tool
Once you've got GNOME Tweak Tool installed, open the activities screen by moving your mouse to the upper-left corner of your screen, tapping the Super (Windows) key, or clicking Activities to the far left of GNOME's top bar. Search for tweak tool and open the app.
Once open, click the Windows tab. Under HiDPI, adjust the window scaling to 2, or higher if you need to:
Voila! All of your GNOME 3 applications like Evolution and Rhythmbox should be properly scaled and usable. But chances are you're going to want to browse the web too, so let's get your browsers sorted out.
The first time you open Firefox on a HiDPI display, you’ll be confronted with tiny text on web pages, and an interface is nearly unusably small. Firefox maintains its own set of scaling settings, which are available through Firefox's configuration settings. To open the configuration interface, type
about:config in the browser’s address bar and hit Enter.
You'll be greeted with a warning, letting you know that you can mess up your browser if you're digging around changing settings willy-nilly. Tell Firefox that you're mostly confident that you know what you're doing by clicking I'll be careful, I promise!
In the search bar at the top of the page, type
layout.css.devPixelsPerPx to isolate the setting. Double-click the setting's name and type 2 into the popup window. Finally, hit Enter and close the config tab.
Let Thunderbird fly in HiDPI
Changing the settings in Mozilla Thunderbird is nearly identical to Firefox, but you don't have the luxury of typing
about:config into a tab's address bar. Instead, click the menu (hamburger) button and select Preferences. In the Preferences window, switch to the Advanced tab.
Click the Config Editor… button to open a config editor that will look a lot like Firefox's editor. Once again, search for
layout.css.devPixelsPerPx and set its value to 2.
Rub out some of Chromium's tarnish
Chromium is a little special. While you can change the render size of text and images on web pages, the icons and other interface elements will stay tiny. There's really no way around this (yet), so Chromium users are relegated to using keyboard shortcuts or surgically precise clicks to use UI elements.
Open the settings by typing
about:settings in the address bar and hitting Enter. Scroll down to the bottom of the page and click Show advanced settings…. Under “Web content,” set Page zoom to 200%. I like to leave the font size set at Medium, but your preferences may differ.
That's about all you can do. Web pages will render properly, but you'll be stuck with a tiny interface. If you find this unbearable, Firefox is your best bet for a usable web experience for now.
Watch out for those gotchas
While changing settings in GNOME 3, Firefox and Thunderbird makes for a usable experience, there are a few things that will look a little off because of the way Linux does things. There is no universal framework for designing graphical interfaces on Linux, so programmers have to choose. GNOME 3 uses GNOME Tool Kit (GTK) 3. Apps like the GIMP may use older versions of GTK. Others, like Skype, may use Qt.
This lack of unity used be almost trivial, since installing Qt and GTK libraries alongside GTK3 was no big deal (besides the extra time and hard drive space). However, HiDPI has made the differences in frameworks too obvious to ignore. GNOME 3's settings will affect the text for programs that use the GTK-2 or Qt frameworks, but not icons. Here are some things I've found that don't work quite right:
- Skype's icons and parts of the contact list window render a bit too small.
- GIMP's icons and interface buttons render smaller than expected, but the text renders at the proper size. This makes UI elements seem very awkward.
- Some video players that use Flash (like YouTube), don't scale with the HTML elements on the page, and appear small. In the worst case, I've seen some players display controls at the same size when the video is viewed in full-screen mode, but take input as if the control was rendered to stretch across the screen.
Also note that these settings do not scale text in the non-graphical environment (TTY consoles).
When it comes to HiDPI-ready apps, Linux developers have a way to go. However, once you get GNOME set up for HiDPI, it looks great. You paid top dollar for that HiDPI screen after all; it's worth the time to set up your desktop to take advantage of it. Plus, you can finally appreciate all those super-high resolution wallpapers.