Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-05 Thread wabe
Grant  wrote:

> >> > and indeed XFCE doesn't seem to have very good support for this.
> >> > Maybe you can find some of the settings listed there useful
> >> > though.
> >> >
> >> > Other than that, if you want working DPI scaling, you'll have
> >> > much better luck with KDE 5 / Plasma.  
> >>
> >>
> >> Won't I freak out if I'm an xfce4 guy and I try to switch to KDE?
> >> Is there a better choice for HiDPI migration for people who like
> >> xfce4?  
> >
> > I'm using XFCE with a 140 DPI display and it's working fine.  
> 
> 
> How high is your res?  This laptop has a native res of 3200x1800 so
> that's what I *should* be using with DPI set a lot higher than 140 I
> believe, but when it gets that high things get weird.  However I'm not
> sure how much of that can be alleviated by the DE.

You said your screen has a size of 13". When my 4k 32" screen has 
a DPI resolution of 140dpi than your 4k screen has a resolution of 
approximately 345dpi. 
I don't see a reason why auch a high DPI value shouldn't work fine
also. 

My monitor has a resolution of 3840x2160 and an approximate screen
diagonal of 32". Xorg says that the image size is 698 x 393 mm (don't
have a tapeline handy but IIRC that's correct). That's 27.48 x 15.47 
inch. 

3840 / 27.48 = 139.74
2160 / 15.47 = 139.63

So 140 DPI seems to be a correct value for my monitor. And indeed 
font's have nearly the same size on screen as before with my old 
monitor (1920x1080, 27" 83DPI), but of course they are much sharper
now. 

I'm using "Source Code Pro 10" as default font. For the XFCE panel 
I use "Droid Sans 8" (you can configure this in ~/.gtkrc-2.0).
Antialiasing is on and Hinting is set to "Full". 

You should check what pixel color order your display has. Most 
displays use RGB, but some use an other order (my display uses BGR). 
If this value is not set correctly and you use antialiasing 
(strongly recommended) then fonts are looking fuzzy (colored edges).


As I already wrote, the DPI setting doesn't change the size of XFCE
window decorations, at least on my machine. I'm fine with the 
standard window decoration size (I use the "numix" theme for that). 
But if my display would have such a high DPI value as yours I probably
would use "Default-hdpi" or maybe even "Default-xhdpi" as theme for 
the window decorations.

The size for icons used in menus, buttons, toolbars etc. can be 
adjusted as well by modifying the theme gtkrc file. 
Maybe it could be that you can only use sizes that are available as 
bitmaps for the icon set you use. But I don't know, never checked 
this. Maybe you can also use arbitrary sizes because for many icon 
sets there exists a directory containing scalable icons in SVG format.


I would check out if it is possible to tweak your XFCE settings in 
a way that everything looks good without the need to decrease the 
Xorg resolution. 

--
Regards
wabe




Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-05 Thread Floyd Anderson

On Di, 05 Sep 20:00:56 +
Floyd Anderson  wrote:

On Di, 05 Sep 13:29:13 +
Grant  wrote:


[…]


But X should get it right if I use:

DisplaySize 294 166


Looks like a typo. I got:

  349.6462 mm × 165.6207 mm

with:

  $ bc <<<'scale=4; ppi=276.05; cx=3800; inch=25.4; cx / ppi * inch'


Argh, my bad. Ignore the calculation above and in my previous reply. I’m 
wrong because I used 3800 px instead of 3200 px. Sorry for the noise.



--
Regards,
floyd




Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-05 Thread Floyd Anderson

On Di, 05 Sep 13:29:13 +
Grant  wrote:

Is there a way to digitally discover the true height and width of your
screen in mm?



If you know the shadow mask/dot pitch [1] or the real pixel per inch of your
screen, then calculate it. This way you see if software reports wrong
values.



Got it:

http://pixensity.com/list/dell-xps-13-4331/



BTW: X supports -dpi parameter/option. I use it in my xserverrc (xinit
server script) configuration and the Xorg.0.log reports the correct and
prior calculated values.



I think I read that there is no xorg.conf directive for DPI.


I mean -dpi as command line parameter/option, see `/usr/bin/Xorg -help` 
or [1]. On the same site is an example (“Tips and tricks” section) for 
startx invocation that bypass -dpi to Xorg but DisplaySize should do the 
job also.



But X should get it right if I use:

DisplaySize 294 166


Looks like a typo. I got:

   349.6462 mm × 165.6207 mm

with:

   $ bc <<<'scale=4; ppi=276.05; cx=3800; inch=25.4; cx / ppi * inch'


[1] 


--
Regards,
floyd




Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-05 Thread Grant
>> Is there a way to digitally discover the true height and width of your
>> screen in mm?
>
>
> If you know the shadow mask/dot pitch [1] or the real pixel per inch of your
> screen, then calculate it. This way you see if software reports wrong
> values.


Got it:

http://pixensity.com/list/dell-xps-13-4331/


> BTW: X supports -dpi parameter/option. I use it in my xserverrc (xinit
> server script) configuration and the Xorg.0.log reports the correct and
> prior calculated values.


I think I read that there is no xorg.conf directive for DPI.  But X
should get it right if I use:

DisplaySize 294 166

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-05 Thread Grant
>> > and indeed XFCE doesn't seem to have very good support for this.
>> > Maybe you can find some of the settings listed there useful though.
>> >
>> > Other than that, if you want working DPI scaling, you'll have much
>> > better luck with KDE 5 / Plasma.
>>
>>
>> Won't I freak out if I'm an xfce4 guy and I try to switch to KDE?  Is
>> there a better choice for HiDPI migration for people who like xfce4?
>
> I'm using XFCE with a 140 DPI display and it's working fine.


How high is your res?  This laptop has a native res of 3200x1800 so
that's what I *should* be using with DPI set a lot higher than 140 I
believe, but when it gets that high things get weird.  However I'm not
sure how much of that can be alleviated by the DE.

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread Floyd Anderson

Hello Grant,

On Mo, 04 Sep 12:24:00 -0700
Grant  wrote:


Is there a way to digitally discover the true height and width of your
screen in mm?


If you know the shadow mask/dot pitch [1] or the real pixel per inch of 
your screen, then calculate it. This way you see if software reports 
wrong values.


BTW: X supports -dpi parameter/option. I use it in my xserverrc (xinit 
server script) configuration and the Xorg.0.log reports the correct and

prior calculated values.

[1] 


--
Regards,
floyd




Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread wabe
Grant  wrote:

> > and indeed XFCE doesn't seem to have very good support for this.
> > Maybe you can find some of the settings listed there useful though.
> >
> > Other than that, if you want working DPI scaling, you'll have much
> > better luck with KDE 5 / Plasma.  
> 
> 
> Won't I freak out if I'm an xfce4 guy and I try to switch to KDE?  Is
> there a better choice for HiDPI migration for people who like xfce4?

I'm using XFCE with a 140 DPI display and it's working fine.

--
Regards
wabe



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread Grant
 I'm getting strange results from xdpyinfo.  I always get 96x96 DPI and
 the screen size changes along with the resolution.  When I run 'xrandr
 --dpi 200x200' and check xdpyinfo, it reports correctly.  But if I log
 out and back in to xfce4 without doing anything else, it gives me
 96x96 again.
>>>
>>>
>>>
>>> XFCE is probably forcing 96DPI by default. This is usually done by
>>> desktop
>>> environments that don't support DPI scaling very well. I just found this
>>> (sort of flame-war-ish) thread:
>>>
>>>https://forum.xfce.org/viewtopic.php?id=7734
>>>
>>> and indeed XFCE doesn't seem to have very good support for this. Maybe
>>> you
>>> can find some of the settings listed there useful though.
>>>
>>> Other than that, if you want working DPI scaling, you'll have much better
>>> luck with KDE 5 / Plasma.
>>
>>
>> Won't I freak out if I'm an xfce4 guy and I try to switch to KDE?  Is
>> there a better choice for HiDPI migration for people who like xfce4?
>
>
> You could try LXQt, which is the upcoming replacement for LXDE. It's
> Qt-based, so DPI scaling *should* work well (no guarantees, didn't try it
> myself yet.) And its desktop philosophy is more similar to XFCE, meaning
> minimalist, non-bloated UIs.
>
> Anyway, if I were you, I'd just try all of them using live-CDs/USBs from
> various distros, and see what works best. LXDE, LXQt, Gnome, KDE, Budgie,
> those seem to be the main ones right now.


Great tips, thank you Nikos.

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread Grant
 Is there a way to digitally discover the true height and width of your
 screen in mm?
>>>
>>>
>>> Yes. xdpyinfo shows the information:
>>>
>>>xdpyinfo | grep -B2 resolution
>>>
>>> If the information is wrong, that usually means one of two things
>>> (sometimes
>>> even both): a) the video driver is reporting the wrong size to Xorg,
>>> and/or
>>> b) the screen is reporting the wrong size to the driver.
>>
>>
>> I'm getting strange results from xdpyinfo.  I always get 96x96 DPI and
>> the screen size changes along with the resolution.  When I run 'xrandr
>> --dpi 200x200' and check xdpyinfo, it reports correctly.  But if I log
>> out and back in to xfce4 without doing anything else, it gives me
>> 96x96 again.
>
>
> XFCE is probably forcing 96DPI by default. This is usually done by desktop
> environments that don't support DPI scaling very well. I just found this
> (sort of flame-war-ish) thread:
>
>   https://forum.xfce.org/viewtopic.php?id=7734
>
> and indeed XFCE doesn't seem to have very good support for this. Maybe you
> can find some of the settings listed there useful though.
>
> Other than that, if you want working DPI scaling, you'll have much better
> luck with KDE 5 / Plasma.


Won't I freak out if I'm an xfce4 guy and I try to switch to KDE?  Is
there a better choice for HiDPI migration for people who like xfce4?

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread 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?


 Depends on your desktop. I'm not sure if XFCE supports this, but in KDE
 everything scales to my monitor's DPI automatically.

 What is the output of:

xdpyinfo | grep -i resolution

 (The utility is in the x11-apps/xdpyinfo package.)

 On such a small screen, the result should be a very high DPI (around
 282.)
 If that's not the number you get, then your graphics driver is reporting
 it
 wrong to Xorg, and you need to set it manually.
>>>
>>>
>>> This led me to the DisplaySize parameter for xorg.conf which helps a lot.
>>>
>>
>> Is there a way to digitally discover the true height and width of your
>> screen in mm?
>
>
> Yes. xdpyinfo shows the information:
>
>   xdpyinfo | grep -B2 resolution
>
> If the information is wrong, that usually means one of two things (sometimes
> even both): a) the video driver is reporting the wrong size to Xorg, and/or
> b) the screen is reporting the wrong size to the driver.


I'm getting strange results from xdpyinfo.  I always get 96x96 DPI and
the screen size changes along with the resolution.  When I run 'xrandr
--dpi 200x200' and check xdpyinfo, it reports correctly.  But if I log
out and back in to xfce4 without doing anything else, it gives me
96x96 again.

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-04 Thread 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?
>>
>> Depends on your desktop. I'm not sure if XFCE supports this, but in KDE
>> everything scales to my monitor's DPI automatically.
>>
>> What is the output of:
>>
>>   xdpyinfo | grep -i resolution
>>
>> (The utility is in the x11-apps/xdpyinfo package.)
>>
>> On such a small screen, the result should be a very high DPI (around 282.)
>> If that's not the number you get, then your graphics driver is reporting it
>> wrong to Xorg, and you need to set it manually.
>
>
> This led me to the DisplaySize parameter for xorg.conf which helps a lot.
>
> Thanks,
> Grant


Is there a way to digitally discover the true height and width of your
screen in mm?

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-03 Thread 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?
>
> Depends on your desktop. I'm not sure if XFCE supports this, but in KDE
> everything scales to my monitor's DPI automatically.
>
> What is the output of:
>
>   xdpyinfo | grep -i resolution
>
> (The utility is in the x11-apps/xdpyinfo package.)
>
> On such a small screen, the result should be a very high DPI (around 282.)
> If that's not the number you get, then your graphics driver is reporting it
> wrong to Xorg, and you need to set it manually.


This led me to the DisplaySize parameter for xorg.conf which helps a lot.

Thanks,
Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread R0b0t1
Hello friends,

On Fri, Sep 1, 2017 at 12:16 PM, Grant  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  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.



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread wabe
Nils Freydank  wrote:

> Hi everybody,
> 
> Am Freitag, 1. September 2017, 21:08:51 CEST schrieb J. Roeleveld:
> > On Friday, September 1, 2017 7:28:48 PM CEST Mart Raudsepp wrote:  
> > > Ühel kenal päeval, R, 01.09.2017 kell 10:16, kirjutas Grant:  
> > [...]
> > 
> > In KDE/Plasma there is a scaling setting in the display section.
> > The scales go from 1 to 3 (in steps of 0.1)
> > 
> > Seems to work, I don't need it on my displays as I tend to simply
> > increase the font-sizes where necessary.  
> this led to really ugly proportions on my 317,5 mm FullHD display
> (1920x1080 pi).
> 
> I added "-dpi 144" to my Xorg string; in my case that’s a line in
> sddm config. That one does not reflect my actual DPI (simplified
> sqrt(1920^2+1080^2)/12.5 = 176), but was after trial and error the
> best result I got.

You can also set this parameter in XFCE preferences:

xfce4-appearance-settings -> Fonts tab -> Own DPI-Value


But AFAIK the dpi setting is only for fonts. If you also wanna have 
bigger window decorations then start xfwm4-settings and set 
Default-hdpi or Default-xhdpi as theme. AFAIK both themes are part of 
x11-themes/xfwm4-themes.


If you wanna set the icon sizes (panel, menu, buttons, toolbar) for 
the gtk2-theme that you use, then edit the gtkrc file of this theme. 

Before you do this you should copy the complete theme directory into 
~/.themes/ (if .themes doesn't exist then create it), then rename it
and then edit the gtkrc file. Finally you can set this theme as your 
new theme.

By example:
cp -r /usr/share/themes/Xfce-basic/ ~/.themes/
mv ~/.themes/Xfce-basic ~/.themes/Xfce-basic_big-icons
vi ~/.themes/Xfce-basic_big-icons/gtk-2.0/gtkrc

I have a 140 DPI display and insert these two lines at top of my 
gtkrc:

gtk-toolbar-icon-size = large-toolbar
gtk-icon-sizes = 
"panel-menu=32,32:panel=32,32:gtk-button=24,24:gtk-large-toolbar=48,48:gtk-small-toolbar=32,32"

To be honest, I forgot for what the first line is good for. It's some
time ago that I did this and my memory isn't as reliable as it was
20 years ago. ;-)


However some programs don't have a GUI that is ready yet for HiDPI 
displays. By example I have not found an option in Gimp to increase
the size of its tiny toolbar icons.

--
Regards
wabe



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread Nils Freydank
Hi everybody,

Am Freitag, 1. September 2017, 21:08:51 CEST schrieb J. Roeleveld:
> On Friday, September 1, 2017 7:28:48 PM CEST Mart Raudsepp wrote:
> > Ühel kenal päeval, R, 01.09.2017 kell 10:16, kirjutas Grant:
> [...]
> 
> In KDE/Plasma there is a scaling setting in the display section.
> The scales go from 1 to 3 (in steps of 0.1)
> 
> Seems to work, I don't need it on my displays as I tend to simply increase
> the font-sizes where necessary.
this led to really ugly proportions on my 317,5 mm FullHD display (1920x1080 
pi).

I added "-dpi 144" to my Xorg string; in my case that’s a line in sddm config.
That one does not reflect my actual DPI (simplified sqrt(1920^2+1080^2)/12.5 = 
176),
but was after trial and error the best result I got.

Hope that helps,
Nils
-- 
GPG fingerprint: '00EF D31F 1B60 D5DB ADB8 31C1 C0EC E696 0E54 475B'
Nils Freydank

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread J. Roeleveld
On Friday, September 1, 2017 7:28:48 PM CEST Mart Raudsepp 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.
> 
> 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.
> 
> Probably something like
> gsettings set org.gnome.desktop.interface scaling-factor 2
> combined with something for the other stuff that doesn't mess with the
> former.
> Outside GNOME, maybe exporting GDK_SCALE=2 works, if the dconf setting
> isn't honored outside it.

In KDE/Plasma there is a scaling setting in the display section. 
The scales go from 1 to 3 (in steps of 0.1)

Seems to work, I don't need it on my displays as I tend to simply increase the 
font-sizes where necessary.

--
Joost



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread 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.
>
> 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.
>
> Probably something like
> gsettings set org.gnome.desktop.interface scaling-factor 2
> combined with something for the other stuff that doesn't mess with the
> former.
> Outside GNOME, maybe exporting GDK_SCALE=2 works, if the dconf setting
> isn't honored outside it.


I hope you'll agree that sounds like a mess.

When I said it was great I meant in comparison to running 3200x1800
with defaults (unusable) or running 1600x900 (blurry and hard to look
at).  Admittedly this is not a good place for Linux desktop to be.

Is there a good way to run xrandr when X starts so it doesn't have to
be run per user and will apply to lightdm?

- Grant



Re: [gentoo-user] Re: High resolution on a 13 inch screen

2017-09-01 Thread Mart Raudsepp
Ü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.

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.

Probably something like
gsettings set org.gnome.desktop.interface scaling-factor 2
combined with something for the other stuff that doesn't mess with the
former.
Outside GNOME, maybe exporting GDK_SCALE=2 works, if the dconf setting
isn't honored outside it.


Mart