New issue
Advanced search Search tips

Issue 730757 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 732440
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Chromium UI does not scale well anymore on a HiDPI monitor

Reported by marchand...@gmail.com, Jun 7 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36

Steps to reproduce the problem:
1. Open Chromium on a HiDPI monitor
2. Watch the tabs and buttons being way too small compared to all other applications
3. 

What is the expected behavior?
The user interface should scale well to present a normal sized close, minimize and maximize button, tabs, etcetera. This worked before on version 58.xxx

What went wrong?
The update to 59 lost HiDPI support?

Did this work before? Yes 58

Chrome version: 59.0.3071.86  Channel: stable
OS Version: Arch 4.11.3-1
Flash Version: none

Using KDE Plasma 5.10.1
 
Screenshot_20170607_213743.png
350 KB View Download
Screenshot_20170607_213834.png
412 KB View Download
Bug is not present in Chrome 59 on Windows 10 on the same laptop. (dual boot)
Seems to be limited to linux.
I discovered that Chromium now listens to the KDE Plasma Scale Display setting. 
This seems to be new since v59, but it does solve my problem.
Will attach an example of the final result with 1.5 scaling.
The Scale Display preview becomes way too big as you can see, but the rest of my KDE Plasma setup stays correct after increasing it to 1.5.
Screenshot_20170607_225747.png
578 KB View Download
Labels: Needs-Triage-M59 Needs-Bisect
Cc: pbomm...@chromium.org thomasanderson@chromium.org
Components: -UI Blink UI>HighDPI
Labels: pre-stable-59.0.3071.86 M-59
Labels: -Needs-Bisect
Owner: thomasanderson@chromium.org
Status: WontFix (was: Unconfirmed)
No need to bisect.  This is because Chrome switched from using GTK2 to GTK3, so some of the settings changed around a bit.  How does a GTK3 app like gtk3-widget-factory behave?
Status: Assigned (was: WontFix)
gtk3-widget-factory behaves the same now that I check it.
As do all GTK3 apps on my laptop, apparently. 
I don't have many of those, so that's probably why I didn't notice the same behavior.

I suppose that chromium then functions as it should, thanks for the clarification, Thomas. 
I will try to tweak the GTK3 HiDPI settings to obtain better integration.
Status: WontFix (was: Assigned)
Thanks for the feedback and sorry about the mess of settings :(

Closing this as WontFix
No worries!

For people with the same "issue" as myself that visit this page: using the option below can scale chromium separate from other GTK3 applications.

chromium --force-device-scale-factor=1.5
 Issue 731491  has been merged into this issue.
gtk3-widget-factory scales fine here, but chrome is broken.
Can you attach a screenshot?
Chromium_Screenshot_20170613_125113.png
129 KB View Download
What is the output of gtk-query-settings and dump_xsettings?
I don't have xsettingsd installed, is this a requirement?

gtk-query-settings
              gtk-double-click-time: 400
          gtk-double-click-distance: 5
                   gtk-cursor-blink: TRUE
              gtk-cursor-blink-time: 1200
           gtk-cursor-blink-timeout: 10
                   gtk-split-cursor: TRUE
                     gtk-theme-name: "Breeze-Dark"
                gtk-icon-theme-name: "breeze-dark"
!           gtk-fallback-icon-theme: "Numix"
                 gtk-key-theme-name: NULL
                 gtk-menu-bar-accel: "F10"
             gtk-dnd-drag-threshold: 8
                      gtk-font-name: "Ubuntu Regular 10"
!                    gtk-icon-sizes: NULL
                        gtk-modules: NULL
                  gtk-xft-antialias: 1
                    gtk-xft-hinting: 1
                  gtk-xft-hintstyle: "hintmedium"
                       gtk-xft-rgba: "none"
                        gtk-xft-dpi: 98304
              gtk-cursor-theme-name: "Breeze_Snow"
              gtk-cursor-theme-size: 0
       gtk-alternative-button-order: FALSE
        gtk-alternative-sort-arrows: FALSE
!        gtk-show-input-method-menu: FALSE
!             gtk-show-unicode-menu: FALSE
!               gtk-timeout-initial: 500
!                gtk-timeout-repeat: 50
!                gtk-timeout-expand: 500
!                  gtk-color-scheme: ""
              gtk-enable-animations: TRUE
!              gtk-touchscreen-mode: FALSE
!               gtk-tooltip-timeout: 500
!        gtk-tooltip-browse-timeout: 60
!   gtk-tooltip-browse-mode-timeout: 500
!            gtk-keynav-cursor-only: FALSE
!            gtk-keynav-wrap-around: TRUE
                     gtk-error-bell: TRUE
!                        color-hash: ((GHashTable*) 0xb512a0)
!          gtk-file-chooser-backend: NULL
                 gtk-print-backends: "file,cups,cloudprint"
          gtk-print-preview-command: "evince --unlink-tempfile --preview --print-settings %s %f"
               gtk-enable-mnemonics: TRUE
                  gtk-enable-accels: TRUE
!            gtk-recent-files-limit: 50
                      gtk-im-module: NULL
           gtk-recent-files-max-age: 30
           gtk-fontconfig-timestamp: 0
               gtk-sound-theme-name: "freedesktop"
   gtk-enable-input-feedback-sounds: TRUE
            gtk-enable-event-sounds: TRUE
!               gtk-enable-tooltips: TRUE
!                 gtk-toolbar-style: GTK_TOOLBAR_ICONS
!             gtk-toolbar-icon-size: GTK_ICON_SIZE_LARGE_TOOLBAR
!                gtk-auto-mnemonics: TRUE
    gtk-primary-button-warps-slider: TRUE
!                 gtk-visible-focus: GTK_POLICY_AUTOMATIC
  gtk-application-prefer-dark-theme: FALSE
!                 gtk-button-images: TRUE
          gtk-entry-select-on-focus: TRUE
    gtk-entry-password-hint-timeout: 0
!                   gtk-menu-images: TRUE
!          gtk-menu-bar-popup-delay: 0
!     gtk-scrolled-window-placement: GTK_CORNER_TOP_LEFT
!             gtk-can-change-accels: FALSE
!              gtk-menu-popup-delay: 225
!            gtk-menu-popdown-delay: 1000
          gtk-label-select-on-focus: TRUE
!                 gtk-color-palette: "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90"
!              gtk-im-preedit-style: GTK_IM_PREEDIT_CALLBACK
!               gtk-im-status-style: GTK_IM_STATUS_CALLBACK
           gtk-shell-shows-app-menu: FALSE
            gtk-shell-shows-menubar: FALSE
            gtk-shell-shows-desktop: TRUE
              gtk-decoration-layout: "menu:minimize,maximize,close"
          gtk-titlebar-double-click: "toggle-maximize"
          gtk-titlebar-middle-click: "none"
           gtk-titlebar-right-click: "menu"
             gtk-dialogs-use-header: FALSE
           gtk-enable-primary-paste: TRUE
           gtk-recent-files-enabled: TRUE
                gtk-long-press-time: 500
               gtk-keynav-use-caret: FALSE



Nah, you don't need xsettingsd.

Your gtk-xft-dpi shows just 1x scaling, not 2x needed for HiDpi.  And the other settings added in gtk3 are missing (gdk-window-scaling-factor and gdk-unscaled-dpi).

Is there something else that could be overriding these variables in your environment?  What is the output of env?

Comment 17 Deleted

Comment 18 Deleted

My comments from the web interface show up as 'Deleted' for some reason,
trying via email:

I do have GDK_SCALE=2 in env.
Status: Assigned (was: WontFix)
Aha!  That is the missing link!  We'll try to have a fix for this soon
Components: -Blink
Project Member

Comment 22 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b50cab37a165f1f11d9a046d7f3367e4a563a73f

commit b50cab37a165f1f11d9a046d7f3367e4a563a73f
Author: thomasanderson <thomasanderson@chromium.org>
Date: Fri Jun 16 21:08:58 2017

Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor

This CL is a followup to [1] which used 'gdk-window-scaling-factor'
and 'gdk-unscaled-dpi' to calculate the scaling factor.  I intentially
avoided using the GdkScreen API for this since the required functions
were added in version 3.9.10, and opted to get the settings directly.
This doesn't work all the time though, because GTK allows overriding
these settings with the GDK_SCALE and GDK_DPI_SCALE environment
variables (but only when using the X11 backend).

This CL makes the change to use those functions, at the cost of
bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro
we support, Trusty, has 3.10.8).

As a bonus, GdkScreen has a separate scale factor per monitor, so we
can finally stop using the global scale factor for all monitors.

[1] https://codereview.chromium.org/2899943002/

BUG= 730757 , 732440 
R=erg@chromium.org,thestig@chromium.org
CC=oshima@chromium.org

Review-Url: https://codereview.chromium.org/2937623006
Cr-Commit-Position: refs/heads/master@{#480167}

[modify] https://crrev.com/b50cab37a165f1f11d9a046d7f3367e4a563a73f/chrome/browser/ui/libgtkui/gtk_ui.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7494e43f3d82f3e6232d8b7d26aa175f617aead

commit a7494e43f3d82f3e6232d8b7d26aa175f617aead
Author: thestig <thestig@chromium.org>
Date: Fri Jun 16 22:10:25 2017

Fix up Linux packaging deps after r480167.

BUG= 730757 ,  732440 
TBR=thomasanderson@chromium.org
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2944703003
Cr-Commit-Position: refs/heads/master@{#480193}

[modify] https://crrev.com/a7494e43f3d82f3e6232d8b7d26aa175f617aead/chrome/installer/linux/debian/expected_deps_x64_jessie

Labels: TE-NeedsTriageFromMTV
Tried below scenarios to test this issue on Ubuntu 14.04 
1.Uninstalled existing chrome
2.Set system settings to HiDPI
3.Unable to install M59 build from below options
    a. https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
    b. sudo apt-get install chromium-browser

Since we are unable to test this issue on latest chromium builds from our end, could anyone from MTV team please look into this issue.
Adding TE label .

Thank you..!!
FYI for the MTV team: this reproduces under Debian Testing with the Plasma 5 desktop, and the display physical size parameters set through X.org instead of the KDE scaling option. I'm out of town or I would offer to test. But if you have access to a Debian Testing machine, that's a known reproducer.
Cc: ligim...@chromium.org
Tom  would you be able to verify the fix. We do not have a Plasma 5 desktop in MTV.

Moving with Dev channel release.
The speculative fix has landed and is now in the dev channel.  Can anyone still repro this issue with the latest google-chrome-unstable (which is 61.0.3135.4 as of today)?
c#26 I'm unable to repro the issue (before or after my CL; it was only a speculative fix)
Mergedinto: 732440
Status: Duplicate (was: Assigned)
Project Member

Comment 30 by bugdroid1@chromium.org, Jun 23 2017

Labels: merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d1845c2267b05df565fa33e3c5e2b0e242a21cc

commit 8d1845c2267b05df565fa33e3c5e2b0e242a21cc
Author: thomasanderson <thomasanderson@chromium.org>
Date: Fri Jun 23 21:42:57 2017

[Merge to M60] Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor

> This CL is a followup to [1] which used 'gdk-window-scaling-factor'
> and 'gdk-unscaled-dpi' to calculate the scaling factor.  I intentially
> avoided using the GdkScreen API for this since the required functions
> were added in version 3.9.10, and opted to get the settings directly.
> This doesn't work all the time though, because GTK allows overriding
> these settings with the GDK_SCALE and GDK_DPI_SCALE environment
> variables (but only when using the X11 backend).
>
> This CL makes the change to use those functions, at the cost of
> bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro
> we support, Trusty, has 3.10.8).
>
> As a bonus, GdkScreen has a separate scale factor per monitor, so we
> can finally stop using the global scale factor for all monitors.
>
> [1] https://codereview.chromium.org/2899943002/
>
> BUG= 730757 , 732440 
> R=erg@chromium.org,thestig@chromium.org
> CC=oshima@chromium.org
>
> Review-Url: https://codereview.chromium.org/2937623006
> Cr-Commit-Position: refs/heads/master@{#480167}

BUG= 732440 
TBR=erg@chromium.org,thestig@chromium.org
CC=oshima@chromium.org
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2961473002
Cr-Commit-Position: refs/branch-heads/3112@{#454}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/8d1845c2267b05df565fa33e3c5e2b0e242a21cc/chrome/browser/ui/libgtkui/gtk_ui.cc
[modify] https://crrev.com/8d1845c2267b05df565fa33e3c5e2b0e242a21cc/chrome/installer/linux/debian/expected_deps_x64_jessie

Sign in to add a comment