Sublime Forum

How do I enable HiDPI support on Linux (KDE DE)

#1

I’ve installed the Soda Theme, but everything is still tiny. I can increase font size of the code with Ctrl + Mousewheel or +/- but that’s it.

Using ST3, build 3065

0 Likes

HiDPI Scaling on Mac VM
#2

Here is how ST3 currently looks on my system. As you can see, relative to other elements the Sublime controls are very small:

External link to screenshot: https://dl.dropboxusercontent.com/s/pqadl1z4tvo2263/ST3_no_HiDPI.png

0 Likes

#3

In my Unity environment, Sublime picks up the GNOME settings for scaling the the controls. I’m not sure if these will be followed in KDE as well.

If you also have Unity or GNOME installed you can use the GNOME Control Center > Displays > Scale for menu and title bars

You can also tweak the following setting via dconf-editor:
com.ubuntu.user-interface.scale-factor

This setting is a bit weird, as the desciption in the dconf-editor indicates. Mine looks like this: {‘DP1’: 8, ‘eDP1’: 10}

You basically divide by 8. So 10 is a scale of 1.25. I’m not sure why I have to entries in my settings. I’m guessing it has something it do with multiple monitors or my touchscreen (?).

Hope some of this makes sense,
Alex

Edit: Sublime also honors the GNOME text sizes.

0 Likes

#4

[quote=“quodlibet”]In my Unity environment, Sublime picks up the GNOME settings for scaling the the controls. I’m not sure if these will be followed in KDE as well.

If you also have Unity or GNOME installed you can use the GNOME Control Center > Displays > Scale for menu and title bars

You can also tweak the following setting via dconf-editor:
com.ubuntu.user-interface.scale-factor

This setting is a bit weird, as the desciption in the dconf-editor indicates. Mine looks like this: {‘DP1’: 8, ‘eDP1’: 10}

You basically divide by 8. So 10 is a scale of 1.25. I’m not sure why I have to entries in my settings. I’m guessing it has something it do with multiple monitors or my touchscreen (?).

Hope some of this makes sense,
Alex

Edit: Sublime also honors the GNOME text sizes.[/quote]

Thanks for your reply, Alex. I don’t have Gnome or Unity installed, but Mint KDE seems to have left the Gnome schemas behind. I’ve tried editing the Gnome schemas in dconf-editor, setting both org.gnome.desktop.interface.scaling-factor and org.gnome.desktop.interface.text-scaling-factor to 2 but it didn’t fix the issue, all Sublime controls are still tiny. I’m using Mint 17 KDE any attempt to change com.ubuntu.user-interface.scale-factor results in:

user@PC:~ > gsettings set com.ubuntu.user-interface scale-factor "{'HDMI1': 8, 'eDP1': 16}" No such schema 'com.ubuntu.user-interface'
I guess the the next step is to see if I can import the schema from an Ubuntu install but this certainly is a bit of a hack just to get the scaling working in Sublime. Sublime really needs to recognize other desktop environments, it’s just a matter of checking which is in use and checking the respective scaling/DPI. Especially since KDE is one of the better desktop environments for HiDPI at the moment. Thanks again.

0 Likes

#5

Still no luck. I got HiDPI working on an Ubuntu 14.04 VMWare VM and exported the settings:

dconf dump /com/ubuntu/user-interface/ > ubu_ui.txt
then imported the settings to my KDE install

dconf load /com/ubuntu/user-interface/ < ubu_ui.txt
…but Sublime still loaded with small controls. The entry from the VM for scale-factor was {‘Virtual1’: 16} and I tried changing it to {‘DP1’: 16, ‘eDP1’: 16} but it still seems to be ignored.

EDIT: spastic typing

0 Likes

#6

That sucks. I’ve found support for HiDPI to be hit and miss in Linux (under Ubuntu/Unity at least). I seem to recall there was a way to zoom in specific window (xrandr?), but I’ve never tried it. Performance might be an issue.

This probably needs to be fixed by @jps. So make sure to email support and also to log the issue on the Bug Tracker (github.com/SublimeText/Issues/issues). That latter is a good place for other people to find the issue and perhaps suggest a workaround.

0 Likes

#7

The xrandr fix I saw was the for the whole screen, essentially doubling pixels so that a 3200x1800 screen would be seen by the system as 1600x900 (LINK). This avoids tiny controls but totally defeats the purpose of getting a hiDPI screen, imho. I may be mistaken, but I don’t think xrandr could be used to zoom only a specific window.

I’ve been disappointed by linux support for hiDPI, i sometimes wish I would have purchased a different laptop with a standard HD screen. HiDPI has been a battle since day one, but I guess that’s the price I pay for being an early adopter. The clear text is nice, but i’m stuck with tiny controls or running other apps than I prefer. For the most part, KDE apps scale well so I’ll be using Kate for my editing. I don’t push the limits of editors by any means, and Kate has a much better feature set than I initially assumed.

Both Unity and Cinnamon have decent hiDPI support, but I find the performance of Unity to be quite poor. Even on my decently specced system, just moving windows around gets choppy at times. I’m not a Unity hater at all, it’s just the performance that holds me back. KDE requires more configuration for HiDPI, but overall I’m much happier with the final product. If you haven’t tried it, I suggest taking a look.

Ultimately, I don’t think any of the current linux desktop environments are approaching the HiDPI issue in the right way. We need a truly scalable system that works over a huge range of resolutions. Android has handled this really well, but it’s not a great desktop OS.

0 Likes

#8

The GTK ecosystem (GNOME/Unity/etc.) is OK with scaling, but it still breaks down here and there. It’s very irritating. I still haven’t figured out how to make the text readable on Thunderbird with the Conversations plugin .

I’m lucky because I don’t actually have a HiDPI screen. It’s just 1900x1080 on 13.3". It requires some scaling, but even when apps don’t scale at all (I’m looking at you Spotify), I can still see what’s going on.

I had a thought about how you might have the settings get picked up. You should probably be running a settings daemon. The one Unity runs is called “unity-settings-daemon” and there’s one called “gnome-settings-daemon”. Back when I was using Openbox, running the “gnome-settings-daemon” was the least painful way to set up all the appropriate things. The dent in memory doesn’t seem to bad. The unity daemon is 7.5 MiB on my machine. And there may be lighter daemons out there – you can maybe see what Lubuntu is running, for example or Crunchbang.

This may be a question for stackexchange. Or a linux forum. (How to have GTK/GNOME settings picked up in a KDE environment?)

Alex

0 Likes

#9

FWIW I am on kubuntu 14.10 and maybe twice a year I have been trying ST3 to see if there has been any improvement in HiDPI support but unfortunately no joy yet. This is a 3200x1800 (not even 4K) screenshot on a 13" laptop and as much as I would like to use ST3, particularly for the PHP xdebug plugin, I can’t make sense of the tabs and status bar. I actually installed ubuntu 14.04 first then overlayed kubuntu-desktop and upgraded to 14.10 months ago so I guess it’s Kwin that is the problem. Viber (a Qt app!) and Chromium are also unusable so it’s not just ST3. All KDE apps are fine with a DPI of 288, and even Firefox and Thunderbird (with a tweaked userPrefs.css) are okay. I hope someone discovers a workaround soon.

Woops, can’t attach screenshot (Sorry, the board attachment quota has been reached.) but it showed just how unusable the interfaces is.

0 Likes

#10

Quick update: Sublime just needs to pick up the GNOME settings. Running gnome-setting-daemon does the trick. I just tested this by switching to Openbox – which doesn’t load any deamon by default. There may be more elegant ways of doing this. And I don’t know if there will be conflicts with the KDE daemon.

FYI - Chromium also picks up the GNOME settings and works just fine. But Chrome doesn’t. FF & TB use CSS to render their interface (or so I’ve been told), so they pick up the scaling you assign with the devPixelsPerPx setting.

0 Likes

#11

[quote=“quodlibet”]Quick update: Sublime just needs to pick up the GNOME settings. Running gnome-setting-daemon does the trick. I just tested this by switching to Openbox – which doesn’t load any deamon by default. There may be more elegant ways of doing this. And I don’t know if there will be conflicts with the KDE daemon.

FYI - Chromium also picks up the GNOME settings and works just fine. But Chrome doesn’t. FF & TB use CSS to render their interface (or so I’ve been told), so they pick up the scaling you assign with the devPixelsPerPx setting.[/quote]

Hello sir,
So how did you configure openbox to comply with hidpi? could you share your configuration? Do you run openbox over gnome? or alone

edit - spelling

0 Likes

#12

I didn’t, really.

If your run gnome-settings-daemon (which you can put in Openbox’s autostart file) then the apps that pick up the GTK settings will be sized appropriately, as if you were using Unity. (At least, that’s what my brief testing indicates.)

For the Openbox UI itself, tweaking the font will resize the menus and titlebars. I didn’t look at the borders, but I’m guessing there’s a setting to tweak that if needed.

What else would you need?

0 Likes

#13

[quote=“quodlibet”]

I didn’t, really.

If your run gnome-settings-daemon (which you can put in Openbox’s autostart file) then the apps that pick up the GTK settings will be sized appropriately, as if you were using Unity. (At least, that’s what my brief testing indicates.)

For the Openbox UI itself, tweaking the font will resize the menus and titlebars. I didn’t look at the borders, but I’m guessing there’s a setting to tweak that if needed.

What else would you need?[/quote]

yeap, fixed the fonts…and better fixed them on a higher level on Xresources…but I don’t want to impose all the gnome settings on my openbox environment…So currently almost everything is ok except the window decorators (minimize maximize etc)… any luck with those? (without gnome support)

0 Likes

#14

[quote=“evilpot”]
yeap, fixed the fonts…and better fixed them on a higher level on Xresources…but I don’t want to impose all the gnome settings on my openbox environment…[/quote]

Fair enough. I’ve found that using GNOME settings streamlines a lot of things without a performance hit.

I don’t follow.

If you increase the size of the font in Openbox’s window titles, that increases the height of the window decoration, which forces the min, max, etc. buttons to become larger. This is a general feature of how *box window managers work, nothing to do with HiDPI. Doesn’t this work for you?

0 Likes

#15

[quote=“quodlibet”]

nope…insanely big window titles and tiny min/max/x size… you say that this should enlarge with the font size? i guess not on my screen… Ill attach a screenshot

0 Likes

#16

[quote=“evilpot”]

[quote=“quodlibet”]

nope…insanely big window titles and tiny min/max/x size… you say that this should enlarge with the font size? i guess not on my screen… Ill attach a screenshot[/quote]

0 Likes

#17

I see what you mean. The buttons scale with the titlebar, but not the symbol. I hadn’t noticed that.

I’m not sure how to fix that. Maybe look into Openbox theming?

0 Likes