Gimp and Inkscape on retina Macs do not work!

kjeldahl
ART + marketing
Published in
6 min readJul 20, 2016

I love Gimp (a pixel editor, think Photoshop) and Inkscape (a vector editor, think Illustrator) and have been using both for many years. While they might not cover absolutely everything Photoshop and Illustrator does, they are very advanced and capable tools available for an unbeatable price (free).

Gimp and Inkscape are products of the Open Source and Linux revolutions that have taken place the last three decades. The last decade it seems most computer manufacturers focused mostly on price, leaving most of the professional and enthusiast market to Apple. If you wanted a computer with a “retina” screen (where pixels are so small you can’t see them) and a decent trackpad, the only real option was a Mac computer.

So the last decade a lot of us Linux developers have bought Macs, and even if we can’t always run Linux on our laptops very well, we have made sure that most of our tools run equally well on OS X as Linux. They are both Unix’es and we still run Linux on our servers. Additionally, if you even dreamed of developing for iOS, you need a Mac.

On the graphic side, Linux had many offerings, but certainly Gimp and Inkscape can and should be considered very powerful offerings when it comes to pixel- and vector editors. Naturally we want to bring these over when we started using our retina Macs.

Well, yeah, that still doesn’t work very well, and hasn’t since retina Macs appeared. It is possible to argue that retina/hidpi displays really do not work very well on ANY platforms except “native Mac” yet, which is true. Typically text looks fine, possibly a bit small, but icons etc which have traditionally been simple icons look really tiny. And it’s not perfect on Macs either; it’s just that Apple has had a bit more time to adapt all their assets to support all the insane resolutions they have offered years before anybody else.

Anyway, if you recently came over from Linux to Macs and you dream of continuing to use Gimp and Inkscape you will most likely be disappointed. While there are ports of both and both claim to support retina/hidpi displays, that is only partially true. Yes, text in the GUI finally looks better, but anything you load into Gimp or Inkscape still looks blurry as hell, compared to anything you would compare with on Macs (Mac native programs like Photoshop and Illustrator..). So why is that?

I do not have all the details, but I’m pretty sure it has to do with the way Macs support retina displays, and how the graphical toolkits brought over from Linux (GTK) obviously do not. The canonical example is if you use Gimp to take a screenshot on a retina screen. As soon as that image gets loaded into the Gimp editor, all pixels are doubled, so effectively your screenshot looks zoomed 2x. You can see this from the screenshot below, where I used Gimp to grab a headline from TC.

You’ll notice the image in Gimp is displayed at “100%”, so theoretically a pixel should equal a pixel. Clearly that isn’t working since the Gimp snapshot is twice as big as the region grabbed.

If you spend some time googling about these issues you find lots of “solutions”. Nearly all of them involve scaling the image in Gimp down, and ends up looking something like this:

Great, now they are at the same size, right! NO, that’s not great, because you just lost half of the pixels in the image you are working on. Depending on the screen you are reading this, it may not be obvious, so I’ve tried zooming in to illustrate below:

If you are willing to work in “always 2X” mode, you can use Gimp and modify your image without loosing any details, but if you do this in Gimp there is no way you can actually view what you are doing in 1x/100% without downscaling (and downsampling) the image like I’ve illustrated already.

Some of the hints I’ve found when googling around is that this is related to the DPI/PPI setting in Gimp being wrong. I doubt that is true. I have played with that setting, and it seems it mostly affect the font in the Gimp GUI, and has no impact on the pixel doubling issue.

So what about Inkscape? Does it suffer from the same double-pixel issues. Yes, from everything I’ve seen it does. Look at the image below, where Inkscape on the Mac (left) and Linux (right) renders the same image on the same screen:

Looking at the screenshot above it isn’t clear that there is a difference and I suspect this is due to image compression on this blog platform. On my iMac 5K when I look at these two, the one on the right is “retina” sharp (no visible pixels), while the one on the left has pixellated jaggies especially noticeable on nearly horizontal slopes.

So both Gimp and Inkscape seem to have the same issues, which indicates that the cause is simply that the underlying GUI technology brought over from Linux (GTK) simply lacks retina support, possibly except for text rendering in the GUI.

So is this a big issue? It is if you are trying to produce crispy clean looking assets for retina screens. Which means like most mobile phones these days.

What’s more worrying is that this has been a known issue for 2–3 years and doesn’t seem to be easy to fix (no, I haven’t tried myself). What annoys me the most however is that from googling or asking around it seems people are claiming it actually does work! So either I am doing something horribly wrong, or people are using a very technical definition of “works” (“it runs, but if you want to see how your art really looks you need to look at it elsewhere”).

So is there any hope! Yes, thankfully, it is. Modern computers are pretty fast and usually have plenty of memory to run Linux virtualized. VirtualBox can also be configured to turn off any pixel scaling (if VirtualBox can, why can’t Gimp and Inkscape ;-). Here’s a screenshot of Preview and Gimp showing the same screenshot side-by-side on my iMac 5K:

Same size, equally sharp.

So here’s what I did to get Gimp and Inkscape running virtualized in Linux on my iMac 5K without any pixel doubling issues:

  1. Install VirtualBox, with Guest Additions (to support resizing the screen to get more pixels)
  2. Install Lubuntu or any other typically light weight Linux distro (you do not want fancy stuff like Unity or similar, you have OS X already for that)
  3. On your installed Linux image, turn off pixel scaling (Settings->Display->Use Unscaled HiDPI Output).
  4. When you boot your image you will get a TINY screen (on retina displays). Remember I said to support resizing the screen?
  5. Inside the booted Linux image, reconfigure the XServer DPI. On Lubuntu, as root modify /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf so the line that starts xserver looks like this (218 is the magic value for iMac 5K monitors): “xserver-command=X -core -dpi 218“
  6. You might also want to adjust the font size down a bit inside the window manager in Lubuntu after adjusting the DPI value. In the desktop manager menu you can do this here Preferences->Customize Look and Feel->Widget->Default font
  7. Finally, install Gimp and Inkscape with “sudo apt-get install gimp inkscape”

I would just love it if somebody proved me wrong and demonstrated to me that it is possible today to run Gimp and Inkscape on Mac retina displays “natively” without pixel doubling. But until somebody does or it actually is, lets stop pretending Gimp and Inkscape works natively on Mac retina display, because that is simply not true (for any reasonable definition of “works”, meaning more than “gee, it runs!”).

--

--

kjeldahl
ART + marketing

Software and product development, entrepreneurship, investing.