4

Edit: I have just realized, the same resizing happens if I maximize a window and then restore it, but only in nautilus, and not in evince/gedit.


Ever since I started using Bionic, I've had the following issue with two desktops connected to HiDPI monitors (3840x2160), at work and at home: if I lock the screen and step away for some time, when I get back some windows are resized/shrinked.

It happens for applications like Nautilus and Evince, but not for others like Firefox or Texmaker. See before: Before resize and after: After resize

Subsequent lock and login cycles shrink the windows further, so that if I'd forgotten an open folder in the morning, by next day Nautilus opens by default to a really small window.

I did some Googling (Ask Ubuntu Question 1, Ask Ubuntu Question 2, Ask Ubuntu Answer, Launchpad bug) and it seems like maybe the culprit is the fact that I use 200% scaling and the login screen. But nothing I tried solved the issue. Is there anything I can do to debug this issue further?


I tried the solutions in Ask Ubuntu Question 1, to set Gnome's automatic window scaling the match what I use by:

$ gsettings set org.gnome.desktop.interface scaling-factor 2

but that didn't work.

I also tried to scale gdm3's login screen so that it matches my desktop as described in Ask Ubuntu Question 2, by editing /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml so that the scaling-factor key reads:

<key name="scaling-factor" type="u">
  <default>2</default>
  <summary>Window scaling factor</summary>
  <description>
    Integer factor used to scale windows by. For use on high-dpi screens.
    0 means pick automatically based on monitor.
  </description>
</key>

and like the second answer suggested creating /usr/share/glib-2.0/schemas/93_hidpi.gschema.override with content

[org.gnome.desktop.interface]
scaling-factor=2

then running

$ sudo glib-compile-schemas /usr/share/glib-2.0/schemas

and that didn't work either.

Finally, trying to make sure gdm3's login screen uses the same resolution as my desktop, I followed this Ask Ubuntu Answer and ran

$ sudo cp -i .config/monitors.xml /var/lib/gdm3/.config/
$ sudo dpkg-reconfigure gdm3

still, no joy. (I'll paste my monitors.xml below, just in case that could help.)

<monitors version="2">
  <configuration>
    <logicalmonitor>
      <x>0</x>
      <y>0</y>
      <scale>2</scale>
      <primary>yes</primary>
      <monitor>
        <monitorspec>
          <connector>DP-2</connector>
          <vendor>DEL</vendor>
          <product>DELL S2817Q</product>
          <serial>J42MC89E181I</serial>
        </monitorspec>
        <mode>
          <width>3840</width>
          <height>2160</height>
          <rate>59.997123718261719</rate>
        </mode>
      </monitor>
    </logicalmonitor>
  </configuration>
</monitors>
2
  • I have exactly the same problem (I'm using pop os 19.04), did you solve it? Nov 27, 2019 at 21:42
  • @LukaszZuchowski I haven't. Nov 28, 2019 at 6:38

1 Answer 1

0

My setup is 1x 4k monitor 3840x2160 and PC under my desk. The issue I had was similar to yours. I observed it mainly on two apps: terminal and chrome.

Now everything works fine, what helped in my case:

  1. Disabling HiDpi deamon in settings

  2. cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications

  3. In copy, change the [Exec] line to: Exec=/usr/bin/google-chrome-stable %U --high-dpi-support=1 --force-device-scale-factor=2

  4. logout/login (or restart just to be sure ;)

TBH I'm not 100% sure if disabling the HiDpi daemon was necessary but since I'm using PC not a laptop, it's not necessary.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .