9

I've recently done a clean install of 17.04 on a machine with an Nvidia 750Ti card and a Dell 4K monitor. I'm using the Nvidia binary driver 381.09.

All this works great apart from the fact that the display scaling I set in the Ubuntu Screen Display settings always reverts back to 1 when the machine resumes after suspend. I need to set it at 1.5 otherwise everything goes tiny (BTW why doesn't Ubuntu scale to a sensible default with 4K monitors?)

Does anyone else get this? I can't find any mention of it elsewhere.

BTW I've tried the Nouveau driver and that doesn't wake up my screen at all after suspend. So that route's a non-starter.


Edit: Looks like it's been reported as a confirmed bug here Will monitor to see if anything happens.

  • I use intel integrated gfx and noticed the same bug. – Greg Dan May 18 '17 at 10:50
  • Does anyone know a workaround? This is extremely annoying bug. It seems that the bug affects all 17.04 users with HiDPI screens. – Greg Dan May 20 '17 at 17:40
  • It seems that the bug won't be fixed. Unity is being removed from 17.10. And 16.04 and 16.10 have no this bug. – Greg Dan Jun 3 '17 at 11:09
  • Alas, 17.10 still does this on my system, and worse, it only lets you change scaling in 100% jumps, so you either have to live with tiny or massive. It seems Ubuntu can't handle HDPI screens correctly and consistently at all, and it's getting worse with each release. I've now downgraded to 16.04.3 which at least handles fractional scaling. – TommyPeanuts Oct 29 '17 at 14:21
3

For anyone else being frustrated by this bug, here's a quick perl script to watch for changes in the scale_factor value and reset to whatever the value is when the script was first run:

#!/usr/bin/perl -w
use strict;

my $dconf_line = `dconf read /com/ubuntu/user-interface/scale-factor`;
my ($scale_factor) = $dconf_line =~ m/DP1\': (\d+)/;

if ($scale_factor) {
    print STDOUT "Current value of scale_factor: $scale_factor ...\n\n";
} else {
    die "Error: cannot find scale_factor value in dconf\n(value of /com/ubuntu/user-interface/scale-factor was $dconf_line\n\n";
}

open(my $fh, "-|", "dconf watch /com/ubuntu/user-interface/scale-factor");

while (<$fh>) {
    if (m/DP1\': (?!$scale_factor)/) {
        `dconf write /com/ubuntu/user-interface/scale-factor "{'DP1': $scale_factor}"`;
        my $date = `date`;
        print STDOUT "$date -- scaling factor adjusted\n\n";
    }
}

Just leave the script running, and it'll catch and reset any attempts to change away from the value.

Works for me on 17.04 with unity, but it's possible that with the switch to gnome in 17.10 the value is stored in a different dconf registry key -- if so, just replace all instances of the key location in the script with the appropriate one and it should work.

Hope this helps ...

| improve this answer | |

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.