3

Having an issue with Google Chrome resolution/dpi changing when I turn my monitor off. I'm pretty sure that this is all related to the scaling factor from Universal Access Panel. in which I have large text turned on. This setting makes Chrome have bigger tabs, but is not recognized when monitor is turned off. I have to shut down Chrome, and restart it it to recognize the Universal Access setting.

To see what is going on with my display settings while my monitor is turned off I used `xrandr'.

The output of xrandr while monitor is ON is:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 890mm x 500mm
   1920x1080      60.0*+   59.9     30.0     24.0     30.0     24.0  
   1920x1080i     60.1     60.0  
   1280x720       60.0     59.9  
   720x480        60.0     59.9  
   640x480        60.0     59.9 

The output of xrandr while monitor is OFF is:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
   1280x720       60.0 +   50.0     30.0     59.9     30.0     24.0     24.0  
   4096x2160      24.0     24.0  
   3840x2160      30.0     25.0     24.0     30.0     24.0  
   1920x1080      60.0*    50.0     59.9     30.0     25.0     24.0     30.0     24.0  
   1920x1080i     60.1     50.0     60.0  
   720x576        50.0  
   720x480        60.0     59.9  
   640x480        60.0     59.9

In any case I would like to figure out how to keep chrome's dpi/resolution stable so that I don't have to restart it each time my monitor is turned off/on. Here are two screenshots of before and after.

before after

Please note that the second photo is what Chrome would look like if I did NOT have Universal Access with large text turned ON.

Something interesting that I noticed is that in this larger mode (second photo), the buttons and navigation don't actually correlate to the items on the screen. If I click any of the bookmark bar icons at the top with the mouse, the browser would not navigate to the right one. For example, if I clicked on the UTUBE short cut in the bookmarks bar it would take me to the $$$ link. It seems to be behaving as though the object & frame mappings are still 'calibrated' for when the scale was bigger.

  • 1
    Interesting question! I'll chew on it a bit. The ration indeed seems much different from just a dpi - interpretation – Jacob Vlijm Apr 29 '16 at 6:20
  • 1
    Although.... I'll do some proper measuring when I get home! 890 <> 708 is quite a difference. – Jacob Vlijm Apr 29 '16 at 7:12
  • @JacobVlijm thank you so much for taking the time to look into this. – Kalamalka Kid Apr 29 '16 at 7:17
  • You're welcome, it's interesting! – Jacob Vlijm Apr 29 '16 at 7:18
  • 1
    @KalamalkaKid if this is true it should be fixable! I need some time to look into it :) – Jacob Vlijm May 2 '16 at 19:04
5

I discovered that Chrome has changed to the Aura framework, and no longer uses GTK framework.

A simple workaround is to launch Chrome with:

google-chrome --high-dpi-support=1 --force-device-scale-factor=1.5
  • 3
    You did it! Great job. – Jacob Vlijm May 2 '16 at 19:23
  • @JacobVlijm i am receiving notices about having to award the bounty, despite that it was not me who posted it (i think it was you). I see no way to do that, so how should we proceed on this? Thanks again for your help. – Kalamalka Kid May 5 '16 at 6:29
  • Wow, only, when I post, it is kind of a copy of your answer, and you did the final work, just let me know what you suggest :) – Jacob Vlijm May 5 '16 at 6:47
  • No, you did all the work! – Jacob Vlijm May 5 '16 at 6:51
  • 1
    @JacobVlijm TAKE THE MONEY AND RUN! – Kalamalka Kid May 5 '16 at 6:55
1
+50

As mentioned here, Chrome has changed to the Aura framework, and no longer uses GTK framework. This causes however some peculiarities.

As mentioned by Kalamalka Kid, who actually did practically all of the work, it can be worked around by running Chrome with the command:

google-chrome --high-dpi-support=1 --force-device-scale-factor=<scale_factor>

e.g.:

google-chrome --high-dpi-support=1 --force-device-scale-factor=1.5

How to make Google Chrome start by default with the changed scale factor

  1. Copy the global Google-chrome launcher from /usr/local/share/applications to ~/.local/share/applications:

    cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications
    
  2. Open the local copy with gedit:

    gedit ~/.local/share/applications/google-chrome.desktop
    

    Look for the line: Exec=/usr/bin/google-chrome-stable %U, change it into:

    google-chrome --high-dpi-support=1 --force-device-scale-factor=1.5
    

Now after you log out/in, Chrome starts by default in your altered scaling.

  • theres a new similar problem with the new 50.0.2661.102 (64-bit) of Chrome. I noticed after upgrading that this solution no longer works the same, as the object mapping is relative to the old resolution (but the resolution problem is ok). If i run Chrome with google-chrome --high-dpi-support=1 --force-device-scale-factor=1.5 from Terminal it works fine, but not when launched from icon (which has been edited to have /usr/bin/google-chrome --high-dpi-support=1 --force-device-scale-factor=1.5 thoughts? – Kalamalka Kid May 18 '16 at 5:54
  • ok fixed it. There were actually 3 entries with EXEC= in the latest .desktop file that needed to be modified. They were for main, new window, and incognito launch. What i am gooing to do is simply save a backup copy of the modified .desktop file and replace it with every upgrade of Chrome. I think that should work. – Kalamalka Kid May 18 '16 at 6:12
  • 1
    Most likely, if you copy it to ~/.local/share/applications, you won't have to change unless there is a major update. – Jacob Vlijm May 18 '16 at 6:22
  • can you invite me to chat for a second? i dont know how to do this – Kalamalka Kid May 18 '16 at 6:28
  • @KalamalkaKid sure! we have one still: chat.stackexchange.com/rooms/39381/… – Jacob Vlijm May 18 '16 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.