Hello friends,

On Fri, Sep 1, 2017 at 12:16 PM, Grant <emailgr...@gmail.com> wrote:
>> My laptop's 13" screen has a native resolution of 3200x1800 which
>> makes everything crazy small on-screen.  Is there a good method for
>> telling Xorg or xfce4 to compensate, or should I one-at-a-time my
>> applications?  I can adjust the resolution down but it makes the
>> colors look weird.
>

Which laptop do you have? I would recommend configuring applications
one at a time and submitting bug reports to applications which are not
sufficiently configurable.

> After some more research, it turns out this is a pretty well-known
> problem on the Linux desktop (it's called HiDPI) without a good
> solution... except for this:
>

The problems quoted here still apply to Windows despite Microsoft
exercising complete control over the display subsystem. On OSX, Apple
decided to specify UI sizes in "points" by default and require that
programs make API calls to enable HiDPI awareness. This has its own
problems, and can make things look worse. Surprisingly I find myself
agreeing with Microsoft's solution more often than not. Regardless of
my opinion, Apple's solution is impossible to implement on Linux as
there is no controlling body that dictates how X11/Wayland toolkits
work.

Most issues are in individual programs and libraries and can't be
solved at the same time. If I want to render something and be HiDPI
aware, I must:
0) Have appropriately sized assets for higher resolutions. Most
programs fail this step.
1) Retrieve the display metrics.
2) Use the display metrics to calculate all sizes.

Without #0, menu items will look extremely grainy if they are
enlarged. The UI will be usable but it will be extremely unpleasant to
look at. There are some Microsoft-authored programs that use this
strategy, and all unupdated OSX programs do this.

Even if a programmer attempts #2, there are a lot of sizes. It can be
extremely hard to position a window or size it in anything but pixels
and some positioning mechanisms do not take relative locations. There
may be interfaces that one needs to interact with that are not
specific in how sizes are specified, and the application developer may
not have access to a HiDPI screen.


On Fri, Sep 1, 2017 at 12:28 PM, Mart Raudsepp <l...@gentoo.org> wrote:
> Ühel kenal päeval, R, 01.09.2017 kell 10:16, kirjutas Grant:
>> > My laptop's 13" screen has a native resolution of 3200x1800 which
>> > makes everything crazy small on-screen.  Is there a good method for
>> > telling Xorg or xfce4 to compensate, or should I one-at-a-time my
>> > applications?  I can adjust the resolution down but it makes the
>> > colors look weird.
>>
>>
>> After some more research, it turns out this is a pretty well-known
>> problem on the Linux desktop (it's called HiDPI) without a good
>> solution... except for this:
>>
>> https://forums.linuxmint.com/viewtopic.php?t=159064
>> https://bugs.freedesktop.org/show_bug.cgi?id=94816
>>
>> The solution is to patch xrandr with the capability to do nearest
>> neighbor filtering and run xrandr like this:
>>
>> xrandr --output eDP1 --mode "3200x1800" --scale "0.5x0.5"
>>
>> It works great.
>>
>
> I don't see how it can be called great. This is pretty much losing most
> of the benefits you have with a HiDPI screen, by just making it be
> almost the same as a 1600x900 screen, except the scaling involves some
> nearest neighbor filtering, which sometimes might be good, sometimes
> bad, and never as good as rendering things in HiDPI.
>

I think this might be an acceptable solution, but I would suggest
turning antialiasing off so fonts are shown with crisp edges.

> For HiDPI you want the toolkit to support it properly and configure it
> as such. GTK+3 is such a toolkit, but outside of GNOME (where it works
> out of the box), I don't know what exactly it takes to set things up.
> Plus you'll need a solution for your gtk2/whatever other things,
> preferably one that doesn't make things worse for gtk3 things, like
> that xrandr hack does.
>

I would recommend switching to a CLI workflow. Then all that needs to
be set up properly is your terminal emulator.

R0b0t1.

Reply via email to