Re: Debian with HiDPI / 4K displays

2015-08-12 Thread Ondřej Surý
On Sun, Aug 9, 2015, at 16:28, Daniel Pocock wrote:
 Thanks for all this feedback
 
 Looking through the feedback and comments elsewhere,
 
 a) most people are using some manual configuration to deal with this
 
 b) it needs to be tweaked in more than one place (e.g. xrdb + Iceweasel
 + other places)

Try Debian stretch - it mostly works out of the box with GNOME 3.16
without tweaking anything. I am running on:

  dimensions:3200x1800 pixels (846x476 millimeters)

with internal display and simple FullHD on external and the only thing
that needs restarts between switches are browsers (both Firefox and
Chromium), the rest of the GNOME switches automatically based on the
plugged-in monitor.

O.
-- 
Ondřej Surý ond...@sury.org
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server



Re: Debian with HiDPI / 4K displays

2015-08-12 Thread Vincent Bernat
 ❦ 12 août 2015 15:30 +0200, Ondřej Surý ond...@sury.org :

 Try Debian stretch - it mostly works out of the box with GNOME 3.16
 without tweaking anything. I am running on:

   dimensions:3200x1800 pixels (846x476 millimeters)

 with internal display and simple FullHD on external and the only thing
 that needs restarts between switches are browsers (both Firefox and
 Chromium), the rest of the GNOME switches automatically based on the
 plugged-in monitor.

Chromium triggers a change when it detects a RandR event (while all
other apps are listening to the appropriate GTK or Gnome property). In
my case, it seems that Chrome is slow enough to handle that when all
other properties to be up-to-date, so it adapts automatically on DPI
change. But maybe this is not your case.
-- 
In the Spring, I have counted 136 different kinds of weather inside of
24 hours.
-- Mark Twain, on New England weather


signature.asc
Description: PGP signature


Re: Debian with HiDPI / 4K displays

2015-08-11 Thread Simon McVittie
On 11/08/15 23:17, John Goerzen wrote:
 There are many things that seem to not handle differences in DPI.  Fonts
 are just the start.  What about taskbars and taskbar icons, which become
 tiny at certain DPIs?  We seem to be using pixel heights in these a lot.

I think we're going in circles now, but to recap, the state-of-the-art
here seems to be the same approach as Apple's Retina displays: the
desktop environment or runtime chooses a scaling factor (usually an
integer) for real pixels per logical pixel, and considers most
application-requested pixel sizes to be measured in logical pixels, not
real pixels. Icon rendering, widget rendering with Cairo and so on can
use the real pixels to get sub-logical-pixel resolution, but the layout
is done in terms of logical pixels (and because the scale factor is an
integer, everything is whole-pixel-aligned, so widgets aren't blurred).
CSS has a similar approach, defining a CSS pixel (the px unit) to be
one or more real pixels.

I know Gtk and Qt support this; Gtk can do non-integer scale factors
(although they are probably a bad idea), Qt only does integer scale
factors. In the case of Gtk, the scale factor is exposed as a setting in
gnome-tweak-tool.

Font sizes are relative to the scale factor, so if your laptop is really
176dpi and you're using a 2x scale factor, you might set X's DPI value
to around 88 (96 might be close enough).

S


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55ca84c8.2020...@debian.org



Re: Debian with HiDPI / 4K displays

2015-08-11 Thread John Goerzen
On 08/08/2015 01:58 PM, Daniel Pocock wrote:

 I recently started using a 4K display with Debian jessie and GNOME shell

 The hardware setup was quite straightforward as I chose to buy a new

There is also an understated problem - DPI changing during a session, or
even different monitors having different DPI in a multihead situation.

This seems to be particularly poorly supported, but is rather common. 
My laptop is 1920x1080 in a 12.5 display, with approximately 176DPI. 
The external monitor on its docking station is a more conventional DPI.

There are many questions here:

  * Simplest: When I use one monitor at the time, does the OS do the
right thing with the only enabled display device changes to a device
with a different DPI?  (No, it doesn't; there is no automatic DPI
changing.)
  * Then: Does the OS do the right thing when there are two non-mirrored
devices with differing DPIs?  (Not really)
  * Does the OS do the right thing when a connected device changes
configured resolution, changing DPI?
  * Finally: Does the OS do the right thing when a display is mirrored
across two devices with diverging DPIs?  What even IS the right
thing here?  Probably stick with the DPI of the device that got in
first.  But what is that device when both an internal and external
display are connected at boot?

(Note: DE here is XFCE)

There are many things that seem to not handle differences in DPI.  Fonts
are just the start.  What about taskbars and taskbar icons, which become
tiny at certain DPIs?  We seem to be using pixel heights in these a lot.

John

 graphics card with 4K support and a relatively new monitor.  The
 graphics card and monitor both support DisplayPort 1.2 so I just hook
 them up with the standard cable.

 The graphics card vendor supplies a proprietary driver but everything
 else is currently running using the packages from jessie.

 However, I've come up against the DPI issues.

 The actual DPI is about 131x137 on a 32 display.

 xdpyinfo reports 96x96

 It looks like there has been a history of bug reports about DPI in both
 the Xorg server itself and some individual applications.

 Some web sites suggested using gnome-tweak-tool to change the window
 scaling factor.  It only appears to accept integer values and changing
 it from the default of 1 to 2 makes the fonts too big.

 So, is there any strategy for HiDPI with Debian?  Is a BTS tag needed to
 track such issues perhaps?  Or is it already dealt with in unstable and
 people just have to wait for it?

 My general feeling is that the 32 4K display was a worthwhile purchase
 and it definitely lets me improve my workflow.  For example, I can now
 have all my communication tools (Icedove, IRC and others) arranged in a
 single virtual desktop, none of them overlap each other and I don't have
 to use alt-tab to switch between them.  In another virtual desktop I no
 longer need to run Eclipse at full screen, I can just give it two thirds
 of the screen and use the rest for testing things.  However, all fonts
 are really tiny, they are readable and even pleasant to look at but I
 would probably like to see them just a little bigger.

 Regards,

 Daniel





Re: Debian with HiDPI / 4K displays

2015-08-11 Thread Daniel Pocock
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 10/08/15 23:29, Simon Kainz wrote:
 
 
 Am 2015-08-09 um 09:22 schrieb Vincent Bernat:
 ❦  8 août 2015 18:11 -0700, Josh Triplett
 j...@joshtriplett.org :
 
 This handles the majority of programs I use.  A few notable 
 exceptions: gitk scales up some but not all of its fonts 
 (reported as a bug), Celestia's and stellarium's in-rendering 
 text (reported as bugs), old X utilities like 
 xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really worth 
 reporting, better to replace them with modern tools), and 
 anything that relies heavily on toolbars like 
 gimp/inkscape/audacity (tools and other UI elements not scaled 
 up, since they don't use text; unfortunate but expected, as
 they don't have non-integer scaling).
 
 I don't have any such problems with Gimp and Inkscape and
 Xft/DPI set to 144 (both through xrdb and XSETTINGS). All GTK
 apps are behaving correctly, notably Gimp and Inkscape. It seems
 GTK is doing complex stuff to determine the scaling to be
 applied, so many things may influence it. Other apps fail to
 understand how GTK works and try to emulate it by piling hacks
 together (notably Chromium).
 
 I could show you at Debconf to spot a configuration difference.
 
 I am also very interested in this (at Debconf), as i own a MacBook
 Pro running Jessie with no problems so far, except some very tiny 
 checkboxes/radiobuttons in firefox and tiny buttons in
 gimp/inkscape.
 
 Is there probably a Debian/HiDPI wiki/website with information
 about how to set up specific apps under specific Desktop
 Environments?
 

I just created a page where people could copy in some of the details
from this thread:

https://wiki.debian.org/MonitorDPI


-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJVyaARAAoJEOm1uwJp1aqDoGYP/ArBFAWDnUOPJFKnofnmJtHl
Kys8JvU6oyY/d+oUdbpHbgB8wn9DmKBybqRzSlWuFiO/lJzp+vwG9Flcz/SCc6d+
3CPwiYR7US3ycqgI87SbWxUUjhLbWlTcygCx9nlFiRoeJV8Fm7H3JnSubhyId/nS
EJOR13BPmPjbz2n0TgmJxibghQQB9AhoLVkPfZLvhnGCD/ds/8PfzXaraAQ0EH1d
jYyptslM6ucJH7bp8pKyMbZ+5zD2wfZrtQWUMF5uZFZ5eSwQqYUcvGmIWk0n2sOU
Z9wXkk/XI0ioRoqyCFpY76Gss9gt5k+cFTR4aHP0fD/lia6A/Z0TYTD+9wO+BTbx
dDqcG+idO1N13KFHzRanbP1seSbTSgFNMObFxCRMB2g0yCeSqCEhX+xclumy+r/K
hOu4Uxeq5z2KkfWe1wuGIhVNFbjVTwt++hvyHMqHokKkl6quAhNhlpWknuOTCFSs
f7TNt7reNlGnPgadASJ8PZEuGysOM5l9XpFHUWbGHDBYpokCJE+UYleYYTCmE4LB
4IEEWl+2l8QZSKQqan7Wsf1myhvMazl2M5y1P/fp34OKcEWBcsKjHuI5dzHqxcb3
ui9N0PpkVbzr1Az1/G1JEpgDGEyI2G7fw2PzS20RZ7cZYhkZx4obZi/hZaQdYaC2
HrFRzfLSBS0MFhJelDFJ
=gBjc
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c9a011.6030...@pocock.pro



Re: Debian with HiDPI / 4K displays

2015-08-11 Thread Nikolaus Rath
On Aug 09 2015, Daniel Pocock dan...@pocock.pro wrote:
 d) there is some concern that not all displays report DPI accurately and
 so it wasn't considered safe to trust the value from the display and so
 people started using the hard-coded values in GNOME at some point in the
 past - is that still a valid argument today though?

No, the argument (at least from the Gnome people) is that DPI (as
reported by xrandr) is a useless metric to determine the proper font
rendering size. Their main argument is that their is no API to report
different DPIs for different screens, and it doesn't factor in things
like the distance of the user from the screen, or simply a user's
preference to have bigger/smaller fonts.

Therefore, they started ignoring X11 dpi completely and added their own
Gnome DPI (which, as far as I know, still doesn't support different DPI
values for different displays).

There is a truly gigantic bugzilla issue about this, but I don't
have the exact URL anymore.

(At some point I suggested to drop the Gnome DPI and instead use a Gnome
DPI scale factor that's applied on top of the X11 DPI but there was
never a response. Most likely the issue is a lot more complicated, or
the bug has become completely useless to because of its size).


Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

 »Time flies like an arrow, fruit flies like a Banana.«


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/87zj1x6x85@vostro.rath.org



Re: Debian with HiDPI / 4K displays

2015-08-10 Thread Simon Kainz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512



Am 2015-08-09 um 09:22 schrieb Vincent Bernat:
 ❦  8 août 2015 18:11 -0700, Josh Triplett j...@joshtriplett.org
 :
 
 This handles the majority of programs I use.  A few notable
 exceptions: gitk scales up some but not all of its fonts
 (reported as a bug), Celestia's and stellarium's in-rendering
 text (reported as bugs), old X utilities like
 xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really worth
 reporting, better to replace them with modern tools), and
 anything that relies heavily on toolbars like
 gimp/inkscape/audacity (tools and other UI elements not scaled
 up, since they don't use text; unfortunate but expected, as they
 don't have non-integer scaling).
 
 I don't have any such problems with Gimp and Inkscape and Xft/DPI
 set to 144 (both through xrdb and XSETTINGS). All GTK apps are
 behaving correctly, notably Gimp and Inkscape. It seems GTK is
 doing complex stuff to determine the scaling to be applied, so many
 things may influence it. Other apps fail to understand how GTK
 works and try to emulate it by piling hacks together (notably
 Chromium).
 
 I could show you at Debconf to spot a configuration difference.
 
I am also very interested in this (at Debconf), as i own a MacBook Pro
running Jessie with no problems so far, except some very tiny
checkboxes/radiobuttons in firefox and tiny buttons in gimp/inkscape.

Is there probably a Debian/HiDPI wiki/website with information about
how to set up specific apps under specific Desktop Environments?

Simon.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCgAGBQJVyRewAAoJEBy08PeN7K/pqbEP/1C4+eoLNqmllcKSULLt6Db4
wqPI4Ul/HOlh4ApUNZKft8e83GQIId88HMDl3+tfdaOsacJ2qjVA1Z35qRKNLs7D
Ej07zVxs3nx2RhrgXKVL2Niy7KcGCZ+AK3nc5HhrA2bmWEdtv3+GbjiyMKdJ6hl3
0CggcGrn2RS6246lIX6JoOlmhqnWKlNmU+4AVmsh50UKBrGQsj3IKLO34JBVYy0m
OZ/ezRr3ErCxng1baOT7lihGLDm5jWnY01J6Llcjes4LLjg/UcMYxIoUDfLB0mGB
pH0fF6DpXAcrIiScopINQHmX24+4ltwrApWXu6az8j4mB+w30bTu0Q3wcbuQKiC8
sLQb9YbfJF44rdQSO0ojXJrM/vJWlUOUaYdqu++faie04S/QJB4KeyuKtMGBQMuh
Sl2Km5XbPz0msox/DrG/03oaqidBo90q1sbUH3GcPBm2BvlvtLYJDYmaoSD/oM25
zjaXTqojRGFKNPyaAoKwAqUu5CeSzqSc/kQOGl8FYBtqqZeXTqKIWIXq+ZpX0Fce
eoToFrWjuXLDBaP0ebqiA1cRueaDEJsBB5TkzpkE21p1Trm1nkk5KpP34/zLgKQE
ExVopujmALLDi6mi7+0EnQ6yC9kc+jUieT2dIV+dzE5X6jXpkYBFmXD8iXk3U3Rh
HaZnRTLoNgr/u6ryJOP3
=YZWS
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c917b0.3060...@debian.org



Re: Debian with HiDPI / 4K displays

2015-08-10 Thread Vincent Bernat
 ❦ 10 août 2015 23:29 +0200, Simon Kainz ska...@debian.org :

 This handles the majority of programs I use.  A few notable
 exceptions: gitk scales up some but not all of its fonts
 (reported as a bug), Celestia's and stellarium's in-rendering
 text (reported as bugs), old X utilities like
 xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really worth
 reporting, better to replace them with modern tools), and
 anything that relies heavily on toolbars like
 gimp/inkscape/audacity (tools and other UI elements not scaled
 up, since they don't use text; unfortunate but expected, as they
 don't have non-integer scaling).

 I don't have any such problems with Gimp and Inkscape and Xft/DPI
 set to 144 (both through xrdb and XSETTINGS). All GTK apps are
 behaving correctly, notably Gimp and Inkscape. It seems GTK is
 doing complex stuff to determine the scaling to be applied, so many
 things may influence it. Other apps fail to understand how GTK
 works and try to emulate it by piling hacks together (notably
 Chromium).

 I could show you at Debconf to spot a configuration difference.

 I am also very interested in this (at Debconf), as i own a MacBook Pro
 running Jessie with no problems so far, except some very tiny
 checkboxes/radiobuttons in firefox and tiny buttons in gimp/inkscape.

I may have been overly enthusiastic. Since I am only at 1.5 scale, tiny
icons are not really my concern:

See Gimp and Inkscape:
 http://postimg.org/image/g5i6rfgsz/

So, there are more stuff than Xft/DPI to adjust. I suppose that setting
org.gnome.desktop.interface scaling-factor to 2 may help. However, I am
unable to test as it is not based on XSETTINGS but it's just a
gnome-control-center property.
-- 
Having nothing, nothing can he lose.
-- William Shakespeare, Henry VI


signature.asc
Description: PGP signature


Re: Debian with HiDPI / 4K displays

2015-08-10 Thread Daniel Pocock


On 10/08/15 00:17, Simon McVittie wrote:
 On 09/08/15 17:02, Vincent Bernat wrote:
 While it is possible to derive the true DPI setting from the resolution
 and the dimension
 
 ... except for when the stated dimensions in the display's EDID are full
 of lies and claim that it is 4cm x 3cm, or 16cm x 9cm, or even 0cm x
 0cm. See also
 https://lists.fedoraproject.org/pipermail/devel/2011-October/157760.html
 and its surrounding thread - admittedly that was a few years ago. I'd be
 delighted to be proved wrong, but I suspect hardware manufacturers
 haven't got a whole lot better at this since then.
 

This brings a few thoughts to mind - I realize opinions may differ and
there would be some work involved in any of these:

- could there be some prompt on the first X startup or the first time a
new screen is detected, asking the user to confirm DPI or dimensions?

- could X use detected values that are in some range considered to be
sane and if some users are unhappy, encourage them to complain to the
monitor vendor?  To put this another way, isn't it better to favor those
monitors that do things correctly?

- is there any Linux recommended monitor list or would there be value in
such a list?  Correct EDID data could be a criteria for inclusion on the
list?

- could people crowdsource a database of monitor specs, maybe combined
with some setup wizard?

Some of this is obviously not Debian-specific either.  Does any other OS
keep a list of known monitor dimensions for example?

Regards,

Daniel


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c8738f@pocock.pro



Re: Debian with HiDPI / 4K displays

2015-08-10 Thread Vincent Lefevre
On 2015-08-09 18:02:05 +0200, Vincent Bernat wrote:
 While it is possible to derive the true DPI setting from the resolution
 and the dimension, I don't think that's what users would be
 expecting. On a laptop, you'll want smaller fonts than on a desktop
 because the screen is usually nearer from your eyes.
 
 For example, on my laptop, the screen is 310mm x 174mm for 2560 x
 1440. Strictly speaking, DPI is 210. However, I am setting it to 144
 because at 210, everything is far too big.
 
 On my desktop station, I am using 23 monitors (510mm x 290mm). It's 96
 DPI and it is just fine.

The best choice really depends on the user, but what's important is
that the default is not too small, otherwise the machine is hardly
usable just after installation. One needs to have some time to be
able to configure it (see below).

 What could be a goal is to only have one universal setting. This setting
 could be Xft.dpi since most applications work just fine with
 that. However, this hijacks the original purpose of this setting, but I
 think most people would like to have a bigger interface if they need
 bigger fonts.

This makes sense at least for icons attached to text (e.g. in menus).
There could (should) also be separate configuration, but it would be
nice if the global size of the UI followed the default font size.
Hardcoded icon size is unacceptable.

For instance, see

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789273

concerning lightdm-gtk-greeter (one can change the font size, but not
the size of the icons, which are tiny on high-dpi screens).

On 2015-08-10 11:49:03 +0200, Daniel Pocock wrote:
 On 10/08/15 00:17, Simon McVittie wrote:
  On 09/08/15 17:02, Vincent Bernat wrote:
  While it is possible to derive the true DPI setting from the resolution
  and the dimension
  
  ... except for when the stated dimensions in the display's EDID are full
  of lies and claim that it is 4cm x 3cm, or 16cm x 9cm, or even 0cm x
  0cm. See also
  https://lists.fedoraproject.org/pipermail/devel/2011-October/157760.html
  and its surrounding thread - admittedly that was a few years ago. I'd be
  delighted to be proved wrong, but I suspect hardware manufacturers
  haven't got a whole lot better at this since then.

Unfortunately the default dpi setting to 96 is also completely wrong:
text is hardly readable on high-dpi screens. The screen definition
(WxH in pixels) is at least correct, so that the default dpi could be
based on that. For instance, if one has a 4K (3840×2160) screen, then
probably either this is a high-dpi screen or the physical dimensions
are large (e.g. 32), but in which case the screen may also be far
from the user. So, choosing a large dpi value (e.g. 192) makes sense
in both cases.

 This brings a few thoughts to mind - I realize opinions may differ and
 there would be some work involved in any of these:
 
 - could there be some prompt on the first X startup or the first time a
 new screen is detected, asking the user to confirm DPI or dimensions?

There's still the problem that you need to display the prompt with
large enough font. One probably doesn't need a prompt. Just a sane
default and an easy way to change it.

 - could X use detected values that are in some range considered to be
 sane and if some users are unhappy, encourage them to complain to the
 monitor vendor?  To put this another way, isn't it better to favor those
 monitors that do things correctly?

IMHO, the screen definition should be OK to choose a default dpi value
(as said above).

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150810142004.ga6...@ypig.lip.ens-lyon.fr



Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Vincent Lefevre
On 2015-08-08 20:58:37 +0200, Daniel Pocock wrote:
 So, is there any strategy for HiDPI with Debian?  Is a BTS tag needed to
 track such issues perhaps?  Or is it already dealt with in unstable and
 people just have to wait for it?

I have similar problems with a 3200x1800 15 screen. Here's my
Xresources file for high DPI:

! X resources for high-definition screens

! This will define the unit for the font sizes below.
Xft.dpi:132

Emacs*font: Monospace 10
Emacs*geometry: 80x48

! With the following, the width should be $((11*COLUMNS+13)) pixels;
! in contrast, the fixed = 6x13 bitmap font is typically used on a
! low-definition screen, giving a width of $((6*COLUMNS+13)) pixels.
XTerm*faceName: Monospace
XTerm*faceSize: 10
! For xterm menus. This font is large enough, but a bit ugly.
XTerm*font: -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1

! The fontList resource is not documented, but found in xpdf/XPDFApp.cc.
Xpdf*fontList:  -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
Xpdf.initialZoom:   200



and my firefox.cfg file:

// IMPORTANT: Start your code on the 2nd line
var hdef = getenv(X11_HDEF);
if (hdef = 2400) {
  pref(layout.css.devPixelsPerPx, 1.77);
} else {
  pref(layout.css.devPixelsPerPx, -1.0);
}

-- 
Vincent Lefèvre vinc...@vinc17.net - Web: https://www.vinc17.net/
100% accessible validated (X)HTML - Blog: https://www.vinc17.net/blog/
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150809102545.ga6...@ioooi.vinc17.net



Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Daniel Pocock
On 09/08/15 09:22, Vincent Bernat wrote:
  ❦  8 août 2015 18:11 -0700, Josh Triplett j...@joshtriplett.org :

 This handles the majority of programs I use.  A few notable exceptions:
 gitk scales up some but not all of its fonts (reported as a bug),
 Celestia's and stellarium's in-rendering text (reported as bugs), old X
 utilities like xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really
 worth reporting, better to replace them with modern tools), and anything
 that relies heavily on toolbars like gimp/inkscape/audacity (tools and
 other UI elements not scaled up, since they don't use text; unfortunate
 but expected, as they don't have non-integer scaling).
 I don't have any such problems with Gimp and Inkscape and Xft/DPI set to
 144 (both through xrdb and XSETTINGS). All GTK apps are behaving
 correctly, notably Gimp and Inkscape. It seems GTK is doing complex
 stuff to determine the scaling to be applied, so many things may
 influence it. Other apps fail to understand how GTK works and try to
 emulate it by piling hacks together (notably Chromium).

 I could show you at Debconf to spot a configuration difference.

Thanks for all this feedback

Looking through the feedback and comments elsewhere,

a) most people are using some manual configuration to deal with this

b) it needs to be tweaked in more than one place (e.g. xrdb + Iceweasel
+ other places)

c) there is at least some stuff that is video-card specific, e.g. NVIDIA
offers some driver options[1] for it and it is not clear if these simply
supplement the Xorg options like DisplaySize or if the NVIDIA driver
breaks DisplaySize functionality in some way such that an alternative
has to be provided

d) there is some concern that not all displays report DPI accurately and
so it wasn't considered safe to trust the value from the display and so
people started using the hard-coded values in GNOME at some point in the
past - is that still a valid argument today though?

Does anybody feel strongly enough that manual DPI configuration
shouldn't be necessary any more, just as it is no longer necessary to
manually create X ModeLines for most monitors?  Would this be a
worthwhile goal for stretch?

It would appear that having a consistent approach to this is not just
useful for the newer range of UHD and laptop displays, but also for any
Debian derivatives or blends that are interested in more exotic displays
such as mobile screens or smart TVs.

1.
http://us.download.nvidia.com/XFree86/Linux-x86/173.14.12/README/appendix-b.html#UseEdidDpi




--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c76373.5030...@pocock.pro



Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Vincent Bernat
 ❦  9 août 2015 16:28 +0200, Daniel Pocock dan...@pocock.pro :

 b) it needs to be tweaked in more than one place (e.g. xrdb + Iceweasel
 + other places)

Yes, that's unfortunate. If GTK people could explain Iceweasel and
Chromium people how they should handle it, it would lessen the amount of
manual configuration needed. Using only XSETTINGS (or XSETTINGS + xrdb)
would unify the configuration and allow automatic change when switching
From one DPI settings to another.

I don't know the Iceweasel case, but for Chromium, it seems they are
pretty clueless and just add more hacks until people stop complaining.

 d) there is some concern that not all displays report DPI accurately and
 so it wasn't considered safe to trust the value from the display and so
 people started using the hard-coded values in GNOME at some point in the
 past - is that still a valid argument today though?

The hard coding is done in X at 96 dpi and it is still true today. If you
change DPI settings in X (with -dpi), you can check that the display
dimensions is adjusted appropriately, making your change useless. XRANDR
reports the appropriate values and applications wishing to use it should
use that instead.

See:
 https://bugs.freedesktop.org/show_bug.cgi?id=23705
 https://bugs.freedesktop.org/show_bug.cgi?id=41115
 http://pastebin.com/vtzyBK6e

As you said, Nvidia is special here.

 Does anybody feel strongly enough that manual DPI configuration
 shouldn't be necessary any more, just as it is no longer necessary to
 manually create X ModeLines for most monitors?  Would this be a
 worthwhile goal for stretch?

While it is possible to derive the true DPI setting from the resolution
and the dimension, I don't think that's what users would be
expecting. On a laptop, you'll want smaller fonts than on a desktop
because the screen is usually nearer from your eyes.

For example, on my laptop, the screen is 310mm x 174mm for 2560 x
1440. Strictly speaking, DPI is 210. However, I am setting it to 144
because at 210, everything is far too big.

On my desktop station, I am using 23 monitors (510mm x 290mm). It's 96
DPI and it is just fine.

What could be a goal is to only have one universal setting. This setting
could be Xft.dpi since most applications work just fine with
that. However, this hijacks the original purpose of this setting, but I
think most people would like to have a bigger interface if they need
bigger fonts.
-- 
Habit is habit, and not to be flung out of the window by any man, but coaxed
down-stairs a step at a time.
-- Mark Twain, Pudd'nhead Wilson's Calendar


signature.asc
Description: PGP signature


Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Simon McVittie
On 09/08/15 17:02, Vincent Bernat wrote:
 While it is possible to derive the true DPI setting from the resolution
 and the dimension

... except for when the stated dimensions in the display's EDID are full
of lies and claim that it is 4cm x 3cm, or 16cm x 9cm, or even 0cm x
0cm. See also
https://lists.fedoraproject.org/pipermail/devel/2011-October/157760.html
and its surrounding thread - admittedly that was a few years ago. I'd be
delighted to be proved wrong, but I suspect hardware manufacturers
haven't got a whole lot better at this since then.

As has been noted elsewhere in this thread, there are actually two
values that desktop environments are trying to use: taking GNOME as an
example because that's the one I know best, it will happily scale fonts
to any  dpi value of your choice (even if it isn't an integer multiple
of 96), because fonts are designed to be scalable anyway; but it will
only apply integer numbers of real pixels per density-independent
pixel, because non-integer ratios there would make all the widgets,
window decoration, icons, etc. blurry, and I think there are some more
technical reasons to prefer integer ratios. Qt 5 similarly only supports
integer numbers of real pixels per dp.

I believe Android supports arbitrary multiples of 0.5 real pixels per
dp, although I don't know how commonly-used those are in practice.

Density-independent pixels (dp) are the Android term; I don't know
whether there's a different conventional name is elsewhere. CSS pixels
are basically the same thing as Android's dp.

S


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c7d160.8030...@debian.org



Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Vincent Bernat
 ❦  8 août 2015 18:11 -0700, Josh Triplett j...@joshtriplett.org :

 This handles the majority of programs I use.  A few notable exceptions:
 gitk scales up some but not all of its fonts (reported as a bug),
 Celestia's and stellarium's in-rendering text (reported as bugs), old X
 utilities like xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really
 worth reporting, better to replace them with modern tools), and anything
 that relies heavily on toolbars like gimp/inkscape/audacity (tools and
 other UI elements not scaled up, since they don't use text; unfortunate
 but expected, as they don't have non-integer scaling).

I don't have any such problems with Gimp and Inkscape and Xft/DPI set to
144 (both through xrdb and XSETTINGS). All GTK apps are behaving
correctly, notably Gimp and Inkscape. It seems GTK is doing complex
stuff to determine the scaling to be applied, so many things may
influence it. Other apps fail to understand how GTK works and try to
emulate it by piling hacks together (notably Chromium).

I could show you at Debconf to spot a configuration difference.
-- 
No group of professionals meets except to conspire against the public at large.
-- Mark Twain


signature.asc
Description: PGP signature


Re: Debian with HiDPI / 4K displays

2015-08-09 Thread Thorsten Glaser
Daniel Pocock daniel at pocock.pro writes:

 However, I've come up against the DPI issues.
 
 The actual DPI is about 131x137 on a 32 display.
 
 xdpyinfo reports 96x96

I've recently had the problem that some applications like Kontact/KDEPIM
suddenly use the wrong fixedmisc font for eMail displaying, and tracked
it down to X reporting 91 dpi (IIRC, not sure, could have been 96), but
my actual dpi is closer to 72/75 than to 96/100.

I added a line…
xrandr --dpi 80
… to my ~/.xsessionrc after interactively trying out the value in which
things come out “right”. Note that this, interestingly enough, does not
match my real dpi value either, but it's the one causing fonts not to
go haywire.

YMMV, and this is probably the wrong fix, but I thought to share anyway,
as it's new (we used to specify display size in XF86Config to fix this,
some time ago).

Maybe keithp has got some insight on this?

bye,
//mirabilos

PS: the fixedmisc font I intend to use for all my non-proportional font
needs is the 9x18/18x18ko one (amended with many more glyphs), in
case this matters.

Debian with HiDPI / 4K displays

2015-08-08 Thread Daniel Pocock


I recently started using a 4K display with Debian jessie and GNOME shell

The hardware setup was quite straightforward as I chose to buy a new
graphics card with 4K support and a relatively new monitor.  The
graphics card and monitor both support DisplayPort 1.2 so I just hook
them up with the standard cable.

The graphics card vendor supplies a proprietary driver but everything
else is currently running using the packages from jessie.

However, I've come up against the DPI issues.

The actual DPI is about 131x137 on a 32 display.

xdpyinfo reports 96x96

It looks like there has been a history of bug reports about DPI in both
the Xorg server itself and some individual applications.

Some web sites suggested using gnome-tweak-tool to change the window
scaling factor.  It only appears to accept integer values and changing
it from the default of 1 to 2 makes the fonts too big.

So, is there any strategy for HiDPI with Debian?  Is a BTS tag needed to
track such issues perhaps?  Or is it already dealt with in unstable and
people just have to wait for it?

My general feeling is that the 32 4K display was a worthwhile purchase
and it definitely lets me improve my workflow.  For example, I can now
have all my communication tools (Icedove, IRC and others) arranged in a
single virtual desktop, none of them overlap each other and I don't have
to use alt-tab to switch between them.  In another virtual desktop I no
longer need to run Eclipse at full screen, I can just give it two thirds
of the screen and use the rest for testing things.  However, all fonts
are really tiny, they are readable and even pleasant to look at but I
would probably like to see them just a little bigger.

Regards,

Daniel


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/55c6515d.8040...@pocock.pro



Re: Debian with HiDPI / 4K displays

2015-08-08 Thread Vincent Bernat
 ❦  8 août 2015 20:58 +0200, Daniel Pocock dan...@pocock.pro :

 The hardware setup was quite straightforward as I chose to buy a new
 graphics card with 4K support and a relatively new monitor.  The
 graphics card and monitor both support DisplayPort 1.2 so I just hook
 them up with the standard cable.

 The graphics card vendor supplies a proprietary driver but everything
 else is currently running using the packages from jessie.

 However, I've come up against the DPI issues.

 The actual DPI is about 131x137 on a 32 display.

 xdpyinfo reports 96x96

 It looks like there has been a history of bug reports about DPI in both
 the Xorg server itself and some individual applications.

 Some web sites suggested using gnome-tweak-tool to change the window
 scaling factor.  It only appears to accept integer values and changing
 it from the default of 1 to 2 makes the fonts too big.

 So, is there any strategy for HiDPI with Debian?  Is a BTS tag needed to
 track such issues perhaps?  Or is it already dealt with in unstable and
 people just have to wait for it?

 My general feeling is that the 32 4K display was a worthwhile purchase
 and it definitely lets me improve my workflow.  For example, I can now
 have all my communication tools (Icedove, IRC and others) arranged in a
 single virtual desktop, none of them overlap each other and I don't have
 to use alt-tab to switch between them.  In another virtual desktop I no
 longer need to run Eclipse at full screen, I can just give it two thirds
 of the screen and use the rest for testing things.  However, all fonts
 are really tiny, they are readable and even pleasant to look at but I
 would probably like to see them just a little bigger.

The support of HiDPI in Debian is pretty good with a few
exceptions. Which DE are you using? I don't know exactly how this work
with Gnome, but the solution is to keep X.org at 96dpi (most apps don't
care, but some I know better than everyone needs that, for example
Chromium) and to change Xft DPI to an appropriate value (I suggest 144
in your case, better try to round a bit).

You can either set Xft.dpi with xrdb. Any new application should now be
scaled correctly (most apps will scale fonts _and_ the interface).

You can also set Xft/DPI in XSETTING. The advantage of doing that is
that all applications will notice the change. In this case, this depends
of your DE. If you don't have a big one, you can use xsettingsd with the
following line:

Xft/DPI 147456

(it's 144*1024)

The best resource is ArchLinux wiki:
 https://wiki.archlinux.org/index.php/HiDPI
However, don't try to apply everything.
-- 
Make the coupling between modules visible.
- The Elements of Programming Style (Kernighan  Plauger)


signature.asc
Description: PGP signature


Re: Debian with HiDPI / 4K displays

2015-08-08 Thread Josh Triplett
Daniel Pocock wrote:
 The actual DPI is about 131x137 on a 32 display.
[...]
 Some web sites suggested using gnome-tweak-tool to change the window
 scaling factor.  It only appears to accept integer values and changing
 it from the default of 1 to 2 makes the fonts too big.

 So, is there any strategy for HiDPI with Debian?  Is a BTS tag needed to
 track such issues perhaps?  Or is it already dealt with in unstable and
 people just have to wait for it?

I have a similar experience with a 2560x1440 14 screen (210 DPI).
Using a scale factor of 2 would make it act like a 720p screen, making
everything far too large.  However, I find that GNOME's font-based
scaling works fine for me: in gnome-tweak-tool, I changed Fonts -
Scaling Factor to 1.4.  That also sets the X property Xft.dpi to 144
(see xrdb -query), which many non-GNOME programs look at too.  Firefox
doesn't, but it has its own setting that even supports non-integer
scaling of the entire UI, so I changed its layout.css.devPixelsPerPx to
1.4 as well.

This handles the majority of programs I use.  A few notable exceptions:
gitk scales up some but not all of its fonts (reported as a bug),
Celestia's and stellarium's in-rendering text (reported as bugs), old X
utilities like xcalc/xconsole/xedit/xdvi/xmag/xman/xmessage (not really
worth reporting, better to replace them with modern tools), and anything
that relies heavily on toolbars like gimp/inkscape/audacity (tools and
other UI elements not scaled up, since they don't use text; unfortunate
but expected, as they don't have non-integer scaling).

- Josh Triplett


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150809011134.GA22883@x