UI scale being reset to 1 everytime when display sleeps for a while

Bug #1689356 reported by Juhyung Park
232
This bug affects 49 people
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Confirmed
Undecided
Unassigned
unity-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After upgrading to Ubuntu 17.04,
the HiDPI setting(Scale for menu and title bars)
is being reset to 1 everytime when display sleeps for a while,
making everything looks small.

If the display sleeps and I resume it instantly, it's fine,
but if the display slept for long, the HiDPI setting gets reset to 1.

My guess is that if a display is plugged in(detected), the old DPI setting is not restored.

This issue is not present on previous Ubuntu versions
and the same issue persists even after a fresh install.

*---------------------------------*
This bug is now present also in 16.04 since a recent update, experiencing this in Xenial since 23 Feb 2018 at least. We could trace the cause of the bug in the recent backports/bugfix updates to Xenial.
*---------------------------------*

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: xorg 1:7.7+16ubuntu3
Uname: Linux 4.10.14-zen+ x86_64
NonfreeKernelModules: nvidia_modeset nvidia
.proc.driver.nvidia.gpus.0000.01.00.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0000:01:00.0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 375.66 Mon May 1 15:29:16 PDT 2017
 GCC version: gcc version 6.3.0 20170406 (Ubuntu 6.3.0-12ubuntu2)
.proc.driver.nvidia.warnings.fbdev:
 Your system is not currently configured to drive a VGA console
 on the primary VGA device. The NVIDIA Linux graphics driver
 requires the use of a text-mode VGA console. Use of other console
 drivers including, but not limited to, vesafb, may result in
 corruption and stability problems, and is not supported.
.tmp.unity_support_test.0:

ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: compiz
CompositorUnredirectDriverBlacklist: '(nouveau|Intel).*Mesa 8.0'
CompositorUnredirectFSW: true
CurrentDesktop: Unity:Unity7
Date: Tue May 9 02:08:25 2017
DistUpgraded: Fresh install
DistroCodename: zesty
DistroVariant: ubuntu
DkmsStatus: nvidia, 375.66, 4.10.14-zen+, x86_64: installed
ExtraDebuggingInterest: Yes
GraphicsCard:
 NVIDIA Corporation GP104 [GeForce GTX 1080] [10de:1b80] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. GP104 [GeForce GTX 1080] [1043:85aa]
 Advanced Micro Devices, Inc. [AMD/ATI] Bonaire XTX [Radeon R7 260X/360] [1002:6658] (prog-if 00 [VGA controller])
   Subsystem: Gigabyte Technology Co., Ltd Bonaire XTX [Radeon R7 260X/360] [1458:227b]
InstallationDate: Installed on 2017-05-06 (1 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: ASUS All Series
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.10.14-zen+ root=UUID=e1130f0b-d82f-4976-989f-c8b18f0965eb ro intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/18/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3402
dmi.board.asset.tag: Default string
dmi.board.name: X99-A
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3402:bd08/18/2016:svnASUS:pnAllSeries:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnX99-A:rvrRev1.xx:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.name: All Series
dmi.product.version: System Version
dmi.sys.vendor: ASUS
version.compiz: compiz 1:0.9.13.1+17.04.20170109-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.76-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.0.3-1ubuntu1
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 17.0.3-1ubuntu1
version.nvidia-graphics-drivers: nvidia-graphics-drivers-* N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.19.3-1ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.9.0-0ubuntu1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.14-0ubuntu1
xserver.bootTime: Tue May 9 00:26:57 2017
xserver.configfile: /etc/X11/xorg.conf
xserver.errors:

xserver.logfile: /var/log/Xorg.0.log
xserver.outputs:

xserver.version: 2:1.19.3-1ubuntu1

Revision history for this message
Juhyung Park (arter97) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg (Ubuntu):
status: New → Confirmed
Timo Aaltonen (tjaalton)
affects: xorg (Ubuntu) → unity-settings-daemon (Ubuntu)
Revision history for this message
Grzegorz Daniluk (dgregd) wrote :

My desktop has integrated Intel gfx so the bug seems to be not related to gfx driver.

Anyway the bug is super annoying. For the first time I am considering to downgrade the Ubuntu. Does anyone knows some work around?

Revision history for this message
ytyLa9z2ru (ytyla9z2ru) wrote :

To be able to use the UI of both Ubuntu and any applications you're using when running Ubuntu in a high resolution mode you have to use the UI scale settings. With the scale settings resetting every time the display sleeps a high resolution setting becomes practically useless.

As this issue has the impact that high resolution settings become useless it should be prioritized, especially since there are no workarounds available as far as I know.

Revision history for this message
Mattias Sandstrom (msand) wrote :

Also it is pretty annoying to restart all automatically started application (for example Slack, shutter and owncloud) that doesn't pickup the correct setting and the window layout is messed up.

Revision history for this message
Clyde McQueen (clydemcqueen) wrote :

I just started seeing this behavior on 16.04.

Revision history for this message
fcole90 (fcole90) wrote :

Happening to me as well since few days. I tough it was a configuration issue, but probably this is a regression caused by some backport.

tags: added: regression-update
tags: added: verification-done-xenial xenial
fcole90 (fcole90)
description: updated
Revision history for this message
fcole90 (fcole90) wrote :

Temporary workaround for me is to use

dconf read /com/ubuntu/user-interface/scale-factor

to read the value when the setting is still correct, then copy the output and assign it back with

dconf write /com/ubuntu/user-interface/scale-factor "{'DP-6': 16}"

Note that this dconf value gets resetted every time this bug happens, so you have set it again. Anyway I find it faster to just have it as a command.

Revision history for this message
fcole90 (fcole90) wrote :

Reference on how to write/read these values: https://askubuntu.com/a/510476

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu):
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
david6 (andrew-dowden) wrote :

Started seeing this behaviour on 16.04 (fully updated), since 26-Feb.

Revision history for this message
Wick (hhatch) wrote :

Just updated 16.04 and seeing this behavior.

Revision history for this message
Francis Bolduc (fbolduc) wrote :

I have an the same problem. It is very unpleasant.

Ubuntu 16.04

Revision history for this message
Dmitry (cross.c) wrote :

Got the same problem on 16.04. It seems the issue was caused by Unity upgrade to 7.4.5.
I manually downgraded it to 7.4.0 and the issue was gone:

sudo apt-get install unity=7.4.0+16.04.20160415-0ubuntu1 libunity-core-6.0-9=7.4.0+16.04.20160415-0ubuntu1 unity-services=7.4.0+16.04.20160415-0ubuntu1 unity-schemas=7.4.0+16.04.20160415-0ubuntu1 compiz-core=1:0.9.12.2+16.04.20160415-0ubuntu1 compiz=1:0.9.12.2+16.04.20160415-0ubuntu1 compiz-plugins-default=1:0.9.12.2+16.04.20160415-0ubuntu1 compiz-gnome=1:0.9.12.2+16.04.20160415-0ubuntu1 libcompizconfig0=1:0.9.12.2+16.04.20160415-0ubuntu1 libdecoration0=1:0.9.12.2+16.04.20160415-0ubuntu1

Revision history for this message
snapy (sdfjsfjaei-hans) wrote :

I have the same problem in 16.04. (It only started happening in 2 days ago.)

Revision history for this message
snapy (sdfjsfjaei-hans) wrote :

Thank you fcole90 for the link. :)

At least I have now a way to restore my scale automatically.

Revision history for this message
Goury (madoo) wrote :

I have the same behavior on 16.04 after last kernel update, I am on 4.13.0-36-generic now and I was on 4.10.0-42-generic before that started happening.

Revision history for this message
nvrmndr (nvrmndr) wrote :

Confirmed on Ubuntu 16.04.4
Dmitry's fix seems to work, although (at least in my case) browsers (Chrome, Firefox) no longer seem to be be aware of HiDPI display and do not adjust scaling accordingly anymore.

Revision history for this message
masat (masat) wrote :

Same problem here in 16.04.4 after updating to unity 7.4.5.

Revision history for this message
Juhyung Park (arter97) wrote :

With Ubuntu switching to GNOME, looks like Unity folks don't care about this anymore.

This and the fractional scaling issue were the only 2 issues
that kept me from using anything higher than 16.10 until now,
and I've decided to take the matter into my own hands.

I've bisected the recent commit logs and found 2 possible faulty commits.
Reverting those fixed the fractional scaling issue,
and I'm pretty sure it fixes the reset bug.
(The commit almost directly tells itself.)

I'm still using 16.10 and tested those new Unity builds within a VM,
so I can't test whether it fixes the reset bug myself.
I'm preparing those PPAs to get ready for 18.04 LTS.
(As I prefer Unity over GNOME.)

https://launchpad.net/~arter97/+archive/ubuntu/unity
I've added build for Xenial(16.04) as well.

Please test it and let me know how it goes!

Revision history for this message
xin (pursue) wrote :

Thank you Park very much for the patch! I am running Xenial (16.04) and installed the patch yesterday. Both fractional scaling issue and reset issue were fixed and the ubuntu has been running well since then.

Revision history for this message
xin (pursue) wrote :

By the way, I am using native ubuntu and a 4k monitor.

Revision history for this message
Juhyung Park (arter97) wrote :

Awesome, thanks for the confirmation :)

Revision history for this message
tbenst (tbenst) wrote :

In my case, simply turning the monitor off and on would reset scaling to 1. Can confirm that Dmitri's fix works for me.

Revision history for this message
Dick Wall (dick-bldc) wrote :

@arter97 yes, thank you for this fix, it works great for me too.

Revision history for this message
Peter (doob) wrote :

@arter97
can you post a link to the repo and or the two commits you mentioned? I don’t find my way to the source the package is build of. I assume it’s somewhere here on launchpad, but this thing is so confusing I never find anything.

Revision history for this message
Juhyung Park (arter97) wrote :

Neatly uploaded in my GitHub repository:

https://github.com/arter97/unity/branches

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.