Although I know how to tweak here and there..
I wonder if there is any Ubuntu 16.04 (or newer) variant that specializes or works 'out-of-the-box' with HiDPI screens.
For that matter, it would be interesting to know any good and recent Linux distribution that works well with HiDPI...
Update:
Thanks for you answers but I am not looking for a way to adjust my machine. I am aware of these tweaks and I am already using a few of them. My question was more towards which Ubuntu variant (such as Mate, Mint, etc.) handles HiDPI well. For Ubuntu Mate it is part of their roadmap but not there yet. I wonder if there is something already available.
No, there isn't any so far--see Answerer's note at the end.
What is "consistent"
Before one disagrees with this answer, make sure to understand the question by OP. Given that one needs to manually set DPI value or scale factor of desktop environment, which varies for different monitors, we can't say Ubuntu "handles HiDPI consistently".
I would understand "consistent" as more towards out-of-box experience (Even OP has mentioned this in the question). That is, in terms of the ability of operating system to use appropriate settings for any given hardware and application software that respects the settings.
Does Ubuntu offer out-of-box experience for HiDPI support? No, or mostly uncertain.
HiDPI support for Ubuntu
Trusty Tahr (14.04) is the first Ubuntu release that explicitly mentioned HiDPI support. Even before the release, relevant information can be traced back to this dated message.
From TrustyTahr/ReleaseNotes for 14.04:
From XenialXerus/ReleaseNotes for 16.04:
HiDPI support for others
From blog post Kubuntu and HiDPI Screen dated 16 February 2016, by Giri Alam:
From blog post Ubuntu MATE 16.10 Alpha 1 dated late June 2016, on Ubuntu MATE blog:
However, no mention of HiDPI support status in the final release note of Ubuntu MATE 16.10.
From GNOME Wiki HowDoI/HiDpi:
From reddit thread of BudgieRemix dated mid-June 2016, prior to becoming Ubuntu Budgie:
And the only replied answer:
Overall HiDPI support
Although I have not quoted other sources here, most mentioned flavours for HiDPI support are Ubuntu GNOME and Ubuntu (Unity). Some mentioned Kubuntu/KDE and Xubuntu/Xfce, but not much information for hardware that actually worked for these flavours.
Disclaimers: This answer intends to review HiDPI support status, as 2016, for Ubuntu and its official flavours. The following limitations shall be noted.
Some flavours are not mentioned at all because those had no relevant information of HiDPI support
Non-Ubuntu flavours or unofficial derivatives are not mentioned, such as Linux Mint/Cinnamon, elementary OS/Pantheon
I don't have any HiDPI monitor or HiDPI supported hardware to verify above information; This answer solely quotes relevant information from the web
TL;DR The HiDPI support is work in progress, regardless of distribution and desktop environment. There isn't any Ubuntu flavour that handles HiDPI consistently yet.
Answerer's note: The HiDPI support may have improved since this answer was first written. Hence this answer is now a community wiki, so that anyone with minimum reputation can improve this post to keep up with how HiDPI support is being made consistent for newer releases of Ubuntu and the official flavours.
The Problem
This is the strangest answer I've written. When upgrading to Ubuntu 16.04 I had to set scaling factor to 1.4 on this screen:
I know it says 1.5 but 1.4 worked better and I had also tried 1.25.
Next I had to go into Google Chrome and set "Large Font" in the settings. Alternatively I had tried setting zoom factor to 110% and 125%.
The Solution
I fixed this by acccident using Ctrl+Alt+F5, logging into the console and typing
startx
. Then using Ctrl+Alt+F1, logging into to console and typingsudo reboot
.Upon signing in all the icons and menu lines were super enlarged and I reset monitor scaling (in picture above) to 1.0. I then had to change Google-Chrome font size from "large" to "normal".
The Explanation
I wouldn't believe this solution myself unless it happened to me.
I then discovered the command
xrandr --listmonitors
which shows:Notice the screen size 382x215 millimeters for the 17" laptop display (LVDS1) and 1107x623 millimeters for the 50" TV. This plays an important role in the new DPI scaling I'm benefiting from, but I don't have the experience to explain it academically.
So yes it's an incredulous answer and I wouldn't believe it had it not happened to me. I believe there must be a better method such as reconfiguring X, perhaps by deleting a configuration file so it's automatically rebuilt but, I don't know that shorter solution.
The Proof
The end result is what is important:
Even with and font and window sizes tweaked, some programs still "don't like" HiDPI screens because their programmers don't tell the program how to support it. It is partly a problem of application support. On Windows some programs have the same issue. What Windows does is to scale the whole window giving a pixelated looking thing.
Some answers suggest you create scripts to change the screen resolution before you start a program. I think this is too awkward. Personally I find virtual magnifiers very helpful.
Magnifier programs have already been discussed here: Is there a Magnifier app for Ubuntu? I want to use a bounding box with the mouse on a part of the screen and magnify it for our eyes to Zoom
Here I will show you how to use the Compiz Config Settings Manager's default magnifying glass.
Start Compiz Config Settings Manager (If you don't have it, install it first)
Click on the Accessibility tab on the left. On the right, click on Enhanced Zoom Desktop.
Enable Zoom In Key and Zoom Out Key. For my preference, I set them to Ctrl+Super+= and Ctrl+Super+-.
If the default Sync Mouse panning behavior isn't to your liking, you can go to the Mouse Behavior tab and select your favorite Zoom Mode.
Close the program. Now press Ctrl+Super+Equal. You should see your desktop magnified.
Changing GNOME 3's dpi settings src
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
# 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:
tweak tool window firefox warning 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.
check the article for more detail
Best solution I found
As previously mentioned you'll get very little luck having this just work - especially with multiple monitors (my problem). I settled on a one-line command to achieve consistent multi-monitor presentation, with my on-board display being the hidpi, this:
This command means: Scale my native resolution down by 50%, which when we're talking about pixels means the rendering shouldn't have to interpret very much at all and the result should be crisp.
Why it works: Because, one "square" pixel is now represented in 4 square pixels.
Note: Your options will probably be a bit different.
Some details: Had to switch back to nouveau from nvidia
First - See if your default system xrandr scaling has no blur
Install x11-server-utils
Find the 'connected' hidpi display, it will have an identifying name in front of 'connected':
example output, your monitor name is in front of the 'connected':
xrandr -q output
So my monitor is 'eDP-1' and the native resolution, the top one, is 2880x1800. So, we scale the top one by 50% to avoid blurring, be sure to use your values from xrandr -q for the eDP-1 and the 2880x1800:
If you do this and you still have crisp fonts, etc, then you are set, skip to 'Wrap Up' below.
If it is blurry, then the following steps will help.
Step 1 - System xrandr still blurry...system prep
Could be a bit different for you depending on your system, this worked for me though.
Step 2 - get the xrandr source
clone the xrandr code
Step 3 - note your xrandr version
Note your xrandr version, you'll need this:
Step 4 - checkout the same version number git tag as what your system has
Check the git tags for xrandr from within the xrandr_source directory
Find your version number and 'check out' that tag
for me this was:
Step 5 - Modify xrandr.c
Open xrandr.c with whatever file editor you want to use. Search for 'transform.filter'. There are about three places. You'll notice it's within a conditional, something like this:
'bilinear' is what makes it blurry - BUT - since we are "squarely" scaling down, that is, one pixel is now four, we don't need bilinear and can go with 'nearest'.
You have two options, enhance the if conditional, or completely remove all of the if and keep just:
Since we are not going to 'install' this xrandr, might as well just take the route I did. You'll find a few places with:
Simplest thing is to just change the "bilinear" to "nearest"
Save the file. Close your editor
Step 6 - compile
You should have a newly built xrandr now in that directory, try
Which should give you output.
Now you can try the original xrandr command:
Step 7 - wrap up
You can also now do things like play with all your regular settings related to fonts, dpi, anti-alias, etc
I don't need all the extra real estate the hidpi gives, plus you just end up enlarging everything to make is usable.
Credit: I got most of my stuff for this from here, But, it's a couple years old and I think it belongs here on a more recent question: https://forums.linuxmint.com/viewtopic.php?t=159064