GNU bug report logs - #56832
29.0.50; Emacs pgtk started on low-DPI doesn't adapt to hi-DPI

Previous Next

Package: emacs;

Reported by: Olivier Crête <olivier.crete <at> ocrete.ca>

Date: Fri, 29 Jul 2022 18:27:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56832 in the body.
You can then email your comments to 56832 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Fri, 29 Jul 2022 18:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Olivier Crête <olivier.crete <at> ocrete.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 29 Jul 2022 18:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Olivier Crête <olivier.crete <at> ocrete.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt to hi-DPI
Date: Fri, 29 Jul 2022 13:58:42 -0400
Hi,

If I start emacs on my low DPI screen (a normal 1080p screen), when I
switch it to another screen which is 4K, it doesn't adapt correctly but
instead I get the blurry scaling from the compositor. I'd expect it to
listen to the appropriate Wayland events and change its internal
scaling factor.

This is all using master built with pgtk (from the copr).

Olivier

In GNU Emacs 29.0.50 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.34, cairo version 1.17.6)
 of 2022-07-14 built on a522b9aae9cf45e9868103ec13e1f348
System Description: Fedora Linux 36 (Workstation Edition)

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-
png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-gpm=no
 --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-
json
 --with-pgtk --with-native-compilation --enable-link-time-optimization
 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu
 CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects
 -fexceptions -g -grecord-gcc-switches -pipe -Wall
 -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-
strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++
 'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
 -grecord-gcc-switches -pipe -Wall -Werror=format-security
 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-
strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-
protection''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS XIM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_CA.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-whitespace-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/ocrete/.emacs.d/elpa/transient-0.3.7/transient hides
/usr/share/emacs/29.0.50/lisp/transient

Features:
(shadow sort mail-extr emacsbug message yank-media dired dired-loaddefs
rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util time-date
mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail
mail-utils cl-extra shortdoc text-property-search help-fns radix-tree
help-mode whitespace cus-load gtimelog derived cl hi-lock url-http
url-auth url-gw nsm puny mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr finder-inf emacs-goodies-loaddefs clang-rename
clang-include-fixer let-alist clang-format xml info package browse-url
url url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x
map byte-opt gv bytecomp byte-compile cconv url-vars cl-loaddefs cl-lib
rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-
hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-
win
pgtk-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register page tab-bar
menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse
jit-lock font-lock syntax font-core term/tty-colors frame minibuffer
nadvice seq simple cl-generic indonesian philippine cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 128041 9251)
 (symbols 48 10824 0)
 (strings 32 36158 2282)
 (string-bytes 1 1133447)
 (vectors 16 18727)
 (vector-slots 8 392717 7091)
 (floats 8 81 88)
 (intervals 56 380 0)
 (buffers 992 12))

-- 
Olivier Crête
olivier.crete <at> ocrete.ca




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Sat, 30 Jul 2022 01:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Olivier Crête <olivier.crete <at> ocrete.ca>
Cc: 56832 <at> debbugs.gnu.org
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Sat, 30 Jul 2022 09:01:41 +0800
Olivier Crête <olivier.crete <at> ocrete.ca> writes:

> Hi,
>
> If I start emacs on my low DPI screen (a normal 1080p screen), when I
> switch it to another screen which is 4K, it doesn't adapt correctly but
> instead I get the blurry scaling from the compositor. I'd expect it to
> listen to the appropriate Wayland events and change its internal
> scaling factor.
>
> This is all using master built with pgtk (from the copr).

Could you please put a breakpoint here:

static void
update_watched_scale_factor (struct atimer *timer)
{
  struct frame *f = timer->client_data;
  double scale_factor = FRAME_SCALE_FACTOR (f);

  if (scale_factor != FRAME_X_OUTPUT (f)->watched_scale_factor)
    {
      FRAME_X_OUTPUT (f)->watched_scale_factor = scale_factor;
      pgtk_cr_update_surface_desired_size (f,
					   FRAME_CR_SURFACE_DESIRED_WIDTH (f),
====>					   FRAME_CR_SURFACE_DESIRED_HEIGHT (f),
					   true);
    }
}

with the following commands:

  p scale_factor
  c

and see if it is ever called, and what the value scale_factor is, once
you move the frame to the other monitor.

Thanks.




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 02 Aug 2022 10:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Wed, 31 Aug 2022 10:18:01 GMT) Full text and rfc822 format available.

Message #13 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56832 <at> debbugs.gnu.org,
 Olivier Crête <olivier.crete <at> ocrete.ca>
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Wed, 31 Aug 2022 12:17:35 +0200
Po Lu <luangruo <at> yahoo.com> writes:

> Could you please put a breakpoint here:

[...]

> and see if it is ever called, and what the value scale_factor is, once
> you move the frame to the other monitor.

This was a month ago -- Olivier, did you have a chance to try this?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Wed, 31 Aug 2022 11:33:02 GMT) Full text and rfc822 format available.

Message #16 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Crête <olivier.crete <at> ocrete.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Po Lu <luangruo <at> yahoo.com>
Cc: 56832 <at> debbugs.gnu.org
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Wed, 31 Aug 2022 13:32:22 +0200
On Wed, 2022-08-31 at 12:17 +0200, Lars Ingebrigtsen wrote:
> Po Lu <luangruo <at> yahoo.com> writes:
> 
> > Could you please put a breakpoint here:
> 
> [...]
> 
> > and see if it is ever called, and what the value scale_factor is, once
> > you move the frame to the other monitor.
> 
> This was a month ago -- Olivier, did you have a chance to try this?

Sorry, I'm currently away from an external monitor, I'll try as soon as
I get to one.

-- 
Olivier Crête
olivier.crete <at> ocrete.ca




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Tue, 04 Oct 2022 11:45:01 GMT) Full text and rfc822 format available.

Message #19 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Olivier Crête <olivier.crete <at> ocrete.ca>
Cc: Po Lu <luangruo <at> yahoo.com>, 56832 <at> debbugs.gnu.org
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Tue, 04 Oct 2022 13:44:48 +0200
Olivier Crête <olivier.crete <at> ocrete.ca> writes:

>> This was a month ago -- Olivier, did you have a chance to try this?
>
> Sorry, I'm currently away from an external monitor, I'll try as soon as
> I get to one.

This was another month ago.  😀




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Fri, 14 Oct 2022 21:10:02 GMT) Full text and rfc822 format available.

Message #22 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Olivier Crête <olivier.crete <at> ocrete.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Po Lu <luangruo <at> yahoo.com>, 56832 <at> debbugs.gnu.org
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Fri, 14 Oct 2022 17:08:59 -0400
[Message part 1 (text/plain, inline)]
I finally managed to get to an external screen, and with commit c464bcb
(the build from the Fedora copr), I can't reproduce this issue anymore. I
guess it was fixed in the mean time. Thank you for you patience and help!
I'll let you know if I see it coming back.

On Tue, Oct 4, 2022 at 8:00 AM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> Olivier Crête <olivier.crete <at> ocrete.ca> writes:
>
> >> This was a month ago -- Olivier, did you have a chance to try this?
> >
> > Sorry, I'm currently away from an external monitor, I'll try as soon as
> > I get to one.
>
> This was another month ago.  😀
>


-- 
Olivier Crête
olivier.crete <at> ocrete.ca
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56832; Package emacs. (Sat, 15 Oct 2022 09:39:01 GMT) Full text and rfc822 format available.

Message #25 received at 56832 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Olivier Crête <olivier.crete <at> ocrete.ca>
Cc: Po Lu <luangruo <at> yahoo.com>, 56832 <at> debbugs.gnu.org
Subject: Re: bug#56832: 29.0.50; Emacs pgtk started on low-DPI doesn't adapt
 to hi-DPI
Date: Sat, 15 Oct 2022 11:37:56 +0200
Olivier Crête <olivier.crete <at> ocrete.ca> writes:

> I finally managed to get to an external screen, and with commit
> c464bcb (the build from the Fedora copr), I can't reproduce this issue
> anymore. I guess it was fixed in the mean time. Thank you for you
> patience and help! I'll let you know if I see it coming back.

Thanks for checking; I'm closing this bug report, then.




bug closed, send any further explanations to 56832 <at> debbugs.gnu.org and Olivier Crête <olivier.crete <at> ocrete.ca> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 15 Oct 2022 09:39:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 12 Nov 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.