Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Credit where credit is due this is the one area where Windows is the best OS these days. It not only will do fractional scaling but it will do display independent fractional scaling - whack in the scaling percentage on each screen and in the recent versions of Windows 10 it works well and looks great and remembers your settings when you plug that monitor back in. It is perhaps THE thing along with WSL2 (now giving me a ‘real’ Ubuntu commandline as well as Docker/Kubernetes experience where disks are mounted on both sides and things work seamlessly via VS Code) that made me choose Windows over the Mac and Linux this time around.


This also works well on GNOME Wayland (and probably other Wayland compositors) since about 1.5 years ago (for me at least). In the display settings you can pick a scale per monitor and almost all apps will respect it. (It seems some apps with custom toolkits are lagging but I can't remember the last time I ran into one of these).


I've got 4K display for my Linux machine in 2017; Fedora+Gnome+Wayland worked fine at 200% scale back then.

That's 4 years. After those 4 years, there are people still trying to make their X11 square peg fit into the HiDPI round hole.

X11 is dead. Nobody is going to retrofit HiDPI into it as it is in Wayland. In another 4 years, it is still going to be as annoying as it is today to fix up X11 desktops and apps; maybe even more so.


> worked fine at 200% scale

My X11 setup also works perfectly fine back then, at 200%. Maybe even earlier, 2016 or so.

The caveat is, of course, 200%. Try 150% and it is really a pain in the ass.


> Try 150% and it is really a pain in the ass.

Yes and no.

Wayland clients work file with 150%, or 125%, or whatever scaling. X11 client don't, they are blurry, as they are upscaled from @1X scale.

In the past, I considered that a problem, but I no longer do. You see, 20 years ago, one of the great things Apple did with their migration to Unix-like system was to make X11 clients second class citizens, beyond any doubt. You had to run X11 server manually and later, they even stopped shipping XQuartz with the system. It was a message, that while X11 apps work, if you are the author, you should really make your apps native.

Blurriness of X clients is a similar message here. You want it sharp? Ask its author for a native client. By dragging the feet the problem won't be solved. Chrome, and by extension Electron, are "working" on Wayland support since, what, 2016? For 5 years? They obviously do not see any need for it. The blurriness is a kick so they feel that they should see the need.

Similarly, JetBrains. Recently, there was an article how they partnered with Azul to rework their JIT for M1. M1 is a product, that wasn't on the market yet, but they were working on supporting it. On the other hand, they haven't managed to introduce Wayland support during last years yet. Again, the difference is, that they know M1 is inevitable, but they can afford to delay with Wayland, the users will excuse that, will look for hacks on their own and they won't be blamed anyway.

So if anything, the problem is too nice Xwayland integration and Ubuntu, that delayed switch to default Wayland session, giving time to ISVs to ignore the Wayland support for another couple of years. The distributions have to signal inevitable changes; the problems that will appear by not doing so will be their own, and solving them later will be harder.


Been using Ubuntu Mate X11 for five years on two 4k monitors and have to correct posts like this once every few days.


Works fine for me and always has, since my SXGA+ Thinkpad X61T. Currently running KDE Plasma on a WQHD screen and everything native (QT and GTK) is great; only WINE programs are too small.


Electron is the biggest offender these days. I saw that they added support a few months ago but it seems the apps haven't turned it on yet


The good thing about Electron apps is they all usually accept ctrl+shift+plus to quickly zoom in the whole application, not just the text. Just like zooming any page in the browser.

The bad thing is it applies to all windows of that app, so you can't mix big and small vscode if put one window on laptop HD screen and one window on 4k external monitor.


You can do it on X11 using xrand (crapy but works)


In my experience with Windows 10, it depends on the app. A lot of apps are blurry. Even some of the ones shipped with the OS, made by Microsoft, not to mention third-party apps. Linux with KDE works better than Windows here[1].

I've also read the opposite opinion about macOS - namely, that it's the platform that does it best. I've ordered my first Mac (mini). It's arriving in 2 weeks. Will see then.

Overall, poor HiDPI support on Windows is one of the main reasons why I decided that I don't want to switch to Windows as my main driver and instead try macOS.

[1]: GNOME on the other hand is terrible. It's possible to get i3 to work with HiDPI, but there's no end to the work you need to perform to do that.


Yep. Windows 10 is fantastic in this regard.

MacOS on the other hand sucks. Basically the recommendation is to run a lower and blurry resolution if you want bigger buttons and text...

At the same time, iOS has great scaling and text sizing options, and macOS’ interface is so abstract that it should be very easy to vectorize it, enabling seamless scaling to any size wanted.

Really baffling.


Huh? I have a 4k TV I've been using connected to my gaming computer for awhile running windows 10. I've had no end of issues with various programs becoming horribly confused by display scaling. Some applications ignore the display scaling entirely and end up tiny, and other applications (particularly some games) end up with 4x size on UI elements - which looks utterly awful. Its pretty clear lots of game developers never test with HiDPI displays.

In comparison I've never had a problem on macos. All macos applications I run seem to render correctly no matter what resolution and dpi settings my various displays use. And I can move most applications between displays just fine - with no pop-in or strange behaviour as the resolution of the containing monitor changes. (Except for some web browsers - which detect the transition and re-render content at the new resolution).


If you restrict yourself to Google Chrome, Chromium-based Edge, apps using Electron and apps recently written by Microsoft (Settings, Timer, image viewer, video player, etc), then display scaling is very slick on Windows 10. (I didn't try with multiple monitors, but I did use the Settings app to change the scaling factor frequently.)

On OSX in contrast, if you change the display resolution in System Preferences, most apps do not automatically adapt, with the result that you have to close their windows, then re-open them before your system is usable. And at non-integral scaling factors, everything is blurry at least on the non-retina displays I tried. In constrast, there is zero blurriness in the apps I just listed in Windows 10 regardless of which scale factor is chosen in the Settings app. On a 1080p monitor, the choices are 100%, 125%, 150% and 175%.

Gnome also lets you choose the scale factor in increments of 25% and in a few months after more apps have been adapted to work "directly" with Wayland (without the intervention of XWayland) promises to be as slick as Windows 10 currently is. (In fact, I personally prefer Gnome because on Windows changing the scale factor by 25% can result the stems and lines of the letters becoming abruptly twice as thick, but I vastly prefer either to MacOS's blurriness when the display is not being run at its native resolution, but again I had the luxury of being very choosy about which apps I used on Windows, relying mainly on a web browser and vscode.)


OSX scaling is implemented such that non-int scaling makes pixel-perfect rendering literally impossible. (Hello moire!)

Windows has pretty perfect handing for non-int scaling, though it's on apps to do the right thing. Modern browsers (including Firefox) handle this great, though other apps may or may not.


This is only true for 4k monitors with MacOS. Anything under that looks terrible these days as it won't offer the HiDPI modes on those.


I'm sorry what? I've used Windows 10 scaling and it looks horrible compared to MacOS native 2x HiDPI scaling. The computers are made for HiDPI or not and it looks very natural compared to windows which doesn't scale all elements by the same amount.


I use macOS on a good old 24” 1080p monitor. It’s either “tiny text town” or “blurry shit town”.


24" 1080p is not hidpi; it is normal @1X scale.

If you have it blurry, it is because you upscale @1X.


Ok please help me then.

I have a 1080p screen, and the default rendering of macOS is too small for me.

How can I get the UI to be pixel perfect and bigger without setting a lower than native resolution?

On Windows I do this by setting the scaling factor to 125%.


When you switch resolution to lower; the operating system cannot do anything then, and whatever you see is either your GPU or your display scaler's fault.

It will be not pixel perfect; but: In the display control panel, under "Customized" group, you should have "larger text" option, as the first one. This will keep the native display resolution, and the description will says that "it will look like XY resolution".

However, I don't currently have @1X monitor available to test it; it works with @2X display, which might not be the same - it works by rendering at higher resolution, which is how @2X normally works. But worth a try.


That “larger text” option is the same, it will scale down to a non-display native resolution (except on the default setting). But because the pixels are so small, you notice it less.

So I think we are both aware of what Windows and macOS can do.

And for me it’s clear Windows solution is superior, as it can almost arbitrarily scale the interface to fit any size pixel perfect on any screen.


This is only true for 4k monitors on MacOS - and I often run into non-4K monitors in my work hotdesking situation (though admittedly I mainly WFH at the moment). And Windows solved that not scaling elements by the same amount several years ago.


Yep - all our screens at work are not 4K but 2K (1/2 being the ultra wide curved ones) and I find that the MacBooks look just awful on them as it doesn't see them as 'retina'. It was really strange at first as I always remembered Macs to have great font rendering when displays were even lower res than that but I can't stand how it looks on them. Having Windows scale to 150% on them just looks soo much better. I have a 4K 15" ThinkPad and a 4K 27" external at home and, even though they are the same resolution, they are such different sizes and I like to scale them differently to make things closer to the same size when I drag them back and forth - but only when docked. At other times I scale at a lower percentage to give me more realestate. With Windows I can do this on the fly these days without even logging off and everything looks great and 'just works'.


My MacBook powering my 4K monitor doesn’t look blurry at all, and I have it set to “2560x1440” scaling in the display settings.

It does however run a tiny bit slower due to that non-integer retina scaling.


It does look surprisingly good, but it's still blurring unless they changed it this year. Alternating-color pixel grids always moire there.


I don’t believe they’ve changed it, but tbqh I swap back and forward daily from my MacBook to my gaming PC over the same DisplayPort connection, both set at 150% display scaling (basically), and for where I’m sitting I can’t tell the difference — and there are heap more UI elements on Windows (various icons, apps, etc) that look way way worse due to not being compatible, or having hi-res assets perhaps?

For me it’s a bit of a wash day to day


When I heard what macOS did for fractional scaling, I said “wait, they can’t actually be doing that, surely? I mean, that’s obviously a stupidly bad way of doing it!” And even if the proper solution required more work for individual apps (it’d be only a tiny bit at most), Apple’s in a better position than Microsoft to require that their developers get it right.

I’ve still not actually seen it for myself, and even having heard from multiple sources that yes, it really does work that way, I still find it hard to believe. It’s just… “here, let’s put higher-resolution displays in our laptops, but then scale things so badly that somehow it manages to be worse than a lower-resolution 1920×1080 panel would have been”. Snatching defeat from the jaws of victory.

I also find it utterly baffling.


Have you even used macOS on a HiDPI display? I use this every day on several setups and it shines at handling this. Windows, while it can do HiDPI as well, it's basically become a turd in terms of user friendliness and experience.


I’m not talking about HiDPI. I’m talking about people who like all UI elements and text a little bigger.


Option key while choosing the "size" desired in Screen settings. Gives you more options and there's a solution for everyone. I think my resolution is 2640x something on my 4k. Crisp and large enough, although some would find it too small.


I’m not saying it’s a lack of resolutions to choose from.

Let’s say a default button is 100px wide with 10pt font size and I have a 1920x1080 screen.

If I choose “125%” on Windows, it will render the button 125px side with 12.5pt font. With the caveat that I can render fewer buttons on my screen.

On macOS I just need to pick a lower resolution, and then after al UI elements are rendered, scale it up to 1920x1080. This results in a scaled up and thus not pixel perfect and thus blurry picture.

So Windows renders bigger UI elements at native resolution. macOS always renders a button 100px wide, you can just pick a lower resolution on a high res screen so those 100px seem bigger.

See also https://en.m.wikipedia.org/wiki/Resolution_independence


You have a good point with non-HiDPI screens like a 1080p screen, but I guess that's falling out of fashion anyway. With 4k screens the problem does not exist. The Windows solution is certainly an engineer's approach, but overall it's not necessarily the best when it comes to accessibility. Look at macOS accessibility settings - it's comprehensive.


Your positive experiences with this, do not mirror mine. I have one 4K main display at 200% scaling, and an old 19" off-screen I use for IRC and music playback at 100% scale. Every time I wake my machine, the windows from the off-screen are shuffled around to the main screen, and windows on the main screen are resized and moved around. It absolutely drives me up the wall, and it's clear that this configuration has never been tested by anyone at Microsoft.


Don't worry that bug isn't caused by scaling.


It still fails in many situations. For example switching between RDP session on standard and hidpi display will randomly get the desktop stuck in wrong mode, until you change resolution and or do one of actions that seem to trigger a refresh or that setting. I'm also having random switching when starting a Lenovo laptop. Occasionally it will think it's not hidpi at startup. At best I'd give windows "least broken" mark.


Wayland has a proper protocol for fractional per-output scaling: https://wayland-book.com/surfaces-in-depth/hidpi.html. While there are many reasons why I prefer Wayland over X, this is the biggest.

X only allows setting a DPI per "display", but not per screen (multiple monitor setups where you can drag windows between screens use one X "display"). So you have to resort to these hacks.


The protocol you linked to only supports integer scaling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: