Second screen position isn't saved from one session to another

Bug #1292398 reported by Thierry Mallard
This bug affects 345 people
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Incomplete
Medium
GNOME Shell
Confirmed
Undecided
Unassigned
Mutter
Expired
Low
Ubuntu GNOME
Confirmed
Undecided
Unassigned
Trusty
Confirmed
Undecided
Unassigned
Xenial
Confirmed
Undecided
Unassigned
Ubuntu GNOME Flashback
Confirmed
Undecided
Unassigned
Unity
New
Undecided
Unassigned
elementary OS
Fix Released
Medium
Tom Beckmann
gnome-settings-daemon (Ubuntu)
Triaged
Low
Unassigned
mutter (Ubuntu)
Fix Released
High
Unassigned

Bug Description

(Noticed on Ubuntu 14.04 beta 1 GNOME)
At work I have a second screen, which I prefer to virtually put on the left side of my laptop screen.
Using gnome-control-center I can change the position of the second without problem.
But when I disconnect the second screen (to work on another place) and then connect it again
OR if I just power off the laptop and turn it on again,
the second screen position is set back to the default right position.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gnome-control-center 1:3.6.3-0ubuntu53
ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
Uname: Linux 3.13.0-17-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Mar 14 08:50:00 2014
InstallationDate: Installed on 2014-03-01 (12 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 "Trusty Tahr" - Alpha amd64 (20140226)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-control-center
UpgradeStatus: No upgrade log present (probably fresh install)
usr_lib_gnome-control-center: deja-dup 29.5-0ubuntu2

Revision history for this message
Thierry Mallard (thierrymallard) wrote :
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
rmais96 (cgenre-dev) wrote :

Exactly the same issue with my desktop machine (Ubuntu and Gnome Shell).
I can change settings to put my secondary screen on the left but after system reboot secondary screen is on the right again.
Whereas it was all right with previous Ubuntu 12.04 and 13.10.

Revision history for this message
Smith (smith434) wrote :
Revision history for this message
Julien (julien-behem) wrote :

Same problem on Ubuntu GNOME 14.04 64bits also
Workaround is to restart gnome-settings-daemon at session startup : http://askubuntu.com/questions/450767/multi-display-issue-with-ubuntu-gnome-14-04/457100?iemail=1&noredirect=1#457100

Revision history for this message
schwartuntu (schwarte) wrote :

Same Problem on Gubuntu 14.04 64 bits. Also change with nvidia x server settings (safe to xorg.conf) does not help.

Revision history for this message
Rob McCabe (rrrob9) wrote :

Same proble for me, Ubuntu Gnome 14.04 64 bit, AMD Radeon 7470, thx

Revision history for this message
HaraldK (pifpafpuf) wrote :

Can confirm Juliens solution of killing the gnome-settings-daemon on statup. It may help to delete ~/.config/monitors.xml and configure your monitos freshly to clean this file up.

Revision history for this message
mustangtyson (tysonsmith) wrote :

Marked my bug as duplicate.
https://bugs.launchpad.net/ubuntu/+source/meta-gnome3/+bug/1312763

14.04 64 bit
3 monitors running on nouveau driver
gnome 3

Will not remember monitor position through reboots

Revision history for this message
mika (mic-schaller) wrote :

it's happening every time gnome-shell is (re-)started, not only at login (or is there a silent logout/login when we alt+f2 then r ?)

please increase importance

Revision history for this message
mustangtyson (tysonsmith) wrote :

Deleted ~/.config/monitors.xml and have tried a fresh configuration across reboots. Did not resolve issue.

Revision history for this message
germulvey (gerardmulvey) wrote :

Similar issue,
nvidia 550ti - gnome ubuntu 14.04 also mint 17
setting tv to off and main monitor on - no change to position on saving in either nvidia-settings or display results in both turned on after reboot.
this worked fine previously on mint 16 or ubuntu gnome 13.10

Plus setting importance to low is not very helpful to those who have the issue, I bet if it affected a developer it would be much higher importance, every bug is important to those it affects!

Revision history for this message
DigingBil (digingbil) wrote :

Same issue here, it is driving me mad :(

Ubuntu Gnome 14.04 , 3.13.0-24-generic, same problem with catalyst and radeon drivers

2 dvi monitors, on reboot position not saved and I have to manually run "killall gnome-settings-daemon" , so the monitors position could be applied.

It is really not right to leave this with low importance. What's the criteria to set it to "low" anyway??

Revision history for this message
gord-s (gord-sssnaps) wrote :

I have it on every single machine that has more than one monitor (that's every single machine I own, basically), across various video card manufacturers. Because of that, my hunch is that everyone is affected if they use more than one monitor :|

Revision history for this message
Sebastien Bacher (seb128) wrote :

is anyone having the issue on Unity or is that specific to gnome-shell?

Revision history for this message
Michael Zedeler (michael-zedeler) wrote :

Same problem here. Ubuntu 14.04 on AMD64 with gnome-shell-3.10.4-0ubuntu5.

Revision history for this message
Mrpgruber (mrpgruber) wrote :

Same deal here: Ubuntu 14.04 with gnome-shell-3.10.4-0ubuntu5 on Intel i5-2400, 64bit.

Not on my XFCE installation, though.

Fixed by swapping my (identical) monitors.

Revision history for this message
Adi (aditzah-z) wrote :

@Sebastien Bacher:
It is also happening on Unity, even if you set screen settings from AMD Catalyst (I have an AMD card), until you make changes from Gnome Control Center and save them. After that problems are "almost" fixed.
"Almost" means that before the login process everything is still messed up (my login prompt appears on my TV), but after login problem dissapear.

Revision history for this message
The Gavitron (me-gavitron) wrote :

this is probably related to this bug: https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1283615

I'm not yet sure which is cause vs effect, but doing:

$ sudo cp ~/.config/monitors.xml /etc/gnome-settings-daemon/xrandr/

caused lightdm to start with the 'correct' monitor configuration for me. Sadly, it did not persist through login to gnome-shell, but

$ nohup gnome-settings-daemon -r

seems to fix it for my user session.

Revision history for this message
The Gavitron (me-gavitron) wrote :

it's possible that this is an upstream issue, per
https://bugzilla.gnome.org/show_bug.cgi?id=694761

Revision history for this message
Smith (smith434) wrote :

Has anyone explained why this bug is set to low? We waste a lot of time dealing with this bug during the development of our systems, an explanation as to the choice of importance would be appreciated.

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Smith

That bug happens only to few users, it has not even been confirmed to apply to the default desktop environement. The bug settings are also not that important, having it flagged "low" doesn't mean it's not going to be worked on or resolved, it's just not a security issue or a data lost issue, mostly an usability one

Revision history for this message
Smith (smith434) wrote :

Thank you for the explanation. I understand this is not a critical bug, but your comment about the default desktop environment concerns me. Does this mean that the support for other desktop environments is not held in as high regard as that for unity? Also concerning is your statement about affect few users, this bug is marked as affecting 58 users, the most important bug in the tracker (rated by importance, https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/805376) says it affects 77 users. I do not see how 58 is much less than 77.

Revision history for this message
Sebastien Bacher (seb128) wrote :

> Does this mean that the support for other desktop environments is not held in as high regard as that for unity?

Well, Unity is the default desktop/what most users are running, so yes we look in priority to bugs that affect it.
Canonical is also paying people to work on Unity where GNOME is community maintained (though we help fixing issues when we can)

The user numbers are only one metric, those numbers are low, the importance of the other bug is High due to the fact that it's a segfault an not only an usability issue...

Revision history for this message
gord-s (gord-sssnaps) wrote :

Sebastian said:
>The user numbers are only one metric, those numbers are low, the importance of the other bug is High due to the fact that..

Then in that case, may I suggest a change of policy somewhere? I've just been informed that this weekend our entire corporate entity will move to Mint (MATE) from Ubuntu Gnome, due to this bug. The kicker is that they now won't be going for Landmark next quarter, which is annoying. That's over 3,100 desktops lost to a competitor (it's business, so competitor is the appropriate word in this case), according to the feeling I'm hearing they may jump ship on servers soon too, which is more my department, so I'm extremely disappointed.

The bug simply doesn't happen on Mint and time is money, simple as that, it's not my decision, it was board-level no less.
Every decision on bug triage as well as release policies have consequences, I shouldn't have to mention how much the adoption and force-feeding of Unity has tainted the reputation of Ubuntu in many corporate eyes that were used to Gnome2 or legacy CDE-lookalikes. 58 affected - yeah right.

Moving forward: we use local mirrors to do all install and updates, we also have very strict firewalling and all traffic at every site goes though a application gateway to sanitise traffic - could that be a reason why "those numbers are low"? If so, what should be allowed (popcon?, not using local mirrors? something else?) to allow Canonical HQ to see the true user numbers of non-Unity DEs?

Revision history for this message
Sebastien Bacher (seb128) wrote :

@gord:

What your company is doing is their decision, not a lot we can do. Changing OS over a bug doesn't seems like a rationnal decision, your company could have looked at this issue, and contributed a fix for likely a lot less of efforts than it's going to take them to change systems on a thousand mahcines.

It might be that Mint is going to have the same bug next time they update/rebase on Ubuntu (they are based on it after all), in which case you handle a transition for an OS which is having a less strong security and support story, good luck with that.

Not sure about the numbers, we don't track users/installations nor collect datas. It's just that Canonical supports Unity as its main product, tyou liking the desktop or not is not changing that fact. I'm sure you could find somebody selling support for GNOME remix though...

Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue is a gnome-shell one (see e.g comment #10), gnome-control-center/settings-daemon work correctly, it's gnome-shell that reconfigure the monitors when it starts, reassigning to that component

affects: gnome-control-center (Ubuntu) → gnome-shell (Ubuntu)
Revision history for this message
Tim Lunn (darkxst) wrote :

I can't reproduce this here with my 3 monitor system...

mutter via gnome-shell writes out the monitors.xml, in exactly the same format as g-s-d and it will get read back in at startup unless there is some sort of race condition messing things up. (gdm/Greeter configs are currently unsupported, but I have a patch for that will atleast get uploaded to utopic at some point.)

Revision history for this message
mustangtyson (tysonsmith) wrote :

@darkxst
We need to compare the monitors.xml that is written when running gnome3 vs unity to see if there are any differences.

Tim Lunn (darkxst)
Changed in ubuntu-gnome:
milestone: none → trusty.1
Revision history for this message
claus (claus2) wrote :

It seems to me, that the problem is related to the setting of the primary display in the monitors.xml. Everything works fine unless I move the primary to a display, other than the very left.
My setup is a three monitor setup. Primary on the left display works. If I move primary to the center, than the center screen is moved to the left on the next login.

Changed in ubuntu-gnome:
status: New → Confirmed
Revision history for this message
HaraldK (pifpafpuf) wrote :

Someone says it might be a timing problem. Since upstart does not log time stamps (:-/), would it help to run strace on lightdm or gnome-shell when they start and provide the resulting log to see which processes are started in which order and which files are accessed on the way?

Revision history for this message
ilektron (robotoman) wrote :

I have to add my opinion on the importance of this bug. This bug can render a second monitor unusable, if every time I wish to log in I must turn on my TV and switch to the proper input. Shouldn't the severity of the bug escalate the importance to some degree? By no means is this a high importance bug, but it would be nice to know that it is at least high enough importance to be worked into a scheduled development effort.

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

We're experiening this same bug in Pantheon on development versions of elementary OS Freya (based on Ubuntu 14.04).

Revision history for this message
Cassidy James Blaede (cassidyjames) wrote :

@claus2, I can confirm that behavior.

Revision history for this message
Frank Neirynck (redactie-stadsomroep) wrote :

I have the same problem here: using Ubuntu 14.04 on AMD64 with gnome-shell-3.10.4-0ubuntu5 after everey reboot the screen sequence is reset. Most annoying "improvement" from 12.04!

Revision history for this message
Jody Albritton (jody-albritton) wrote :

I was able to resolve this issue by moving to the gnome/staging ppa. I still have my default monitor moving to the left for the greeter at login. I am using the current nvidia driver with two dvi monitors and one HDMI.

Revision history for this message
Greg Wilkins (gregw-wiltel) wrote :

@Sebastien

Sorry to comment on a meta-issue, but it concerns me when you say:

"What your company is doing is their decision, not a lot we can do. Changing OS over a bug doesn't seems like a rationnal decision, your company could have looked at this issue, and contributed a fix for likely a lot less of efforts than it's going to take them to change systems on a thousand mahcines."

As an open source developer, I too get a little frustrated by responses saying they will switch to a competitor. However, I also think it is dangerous to entirely dismiss such feedback. Changing OS over a bug does seem like a lot of work, so you have to ask yourself why? Perhaps it is because it is becoming all too frequent with ubuntu that your desire to add new featues is causing you to frequently break existing behaviours. This bug is not an isolated occurance and my own user experience is that the gnome3 ubuntu desktop experience is that things that have worked for literally decades are likely to just break and stay broken for some time. Since 14.04 I've had issues with sloppy mouse focus, screen lock, suspend/resume and now screen placement.

I really think ubuntu needs to give higher priority in your processes to broken existing behaviour.

Changed in gnome-shell:
status: New → Confirmed
Changed in elementaryos:
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
Gabriel Hege (gabriel-hege) wrote :

I was also affected by this bug, but copying the correct monitors.xml from ~/.config to /etc/gnome-settings-daemon/xrandr fixed the problem for me (in contrast to #19).

Revision history for this message
Jody Albritton (jody-albritton) wrote :

Does your layout stay in the proper configuration even on the greeter?

summary: - multi-monitor : second screen position isn't saved from one session to
- another
+ Second screen position isn't saved from one session to another
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Low
Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-shell (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-settings-daemon:
importance: Unknown → Low
status: Unknown → New
Cody Garver (codygarver)
Changed in elementaryos:
importance: Undecided → Medium
milestone: none → freya-rc1
Cody Garver (codygarver)
Changed in elementaryos:
status: Confirmed → Won't Fix
Cody Garver (codygarver)
Changed in elementaryos:
milestone: freya-rc1 → none
Cody Garver (codygarver)
Changed in elementaryos:
assignee: nobody → Tom Beckmann (tombeckmann)
milestone: none → freya-rc1
status: Won't Fix → In Progress
Tim Lunn (darkxst)
Changed in ubuntu-gnome:
milestone: trusty.1 → trusty.3
Changed in elementaryos:
status: In Progress → Fix Committed
102 comments hidden view all 158 comments
Revision history for this message
In , Jan B (hey-e) wrote :

I have a laptop and a monitor as secondary display. There’s 2 use-cases I have for it:

1. Use the monitor as only display. When watching movies, or sometimes when working.
2. Use the monitor as primary display and the laptop monitor as secondary display.

Now this works nearly perfectly using the display manager except for one thing. Every time I switch back from only using the monitor (laptop display disabled) to using the laptop display as a second screen – I need to rearrange the displays. By default they are side-by-side but I always want the monitor above the laptop display.

Especially since the resolution and everything else (like using the monitor as primary display when it’s plugged in) is already remembered, it would be cool if the layout can also be remembered.

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

Usually we handle one configuration per displays combination. So if you plug your laptop in your TV, it will have the same configuration the next time you plug it in the TV.

But in your case, we wouldn't know whether you're modifying the current configuration, or creating a new one.

The only thing I would guess is that mutter (which loads and saves the configuration) doesn't remember the position of the display you turn off, dropping it from the configuration. It should probably include it in the ~/.config/monitors.xml file, with its previous position, even if disabled.

That way, re-enabling it would pop it back in the same location.

Revision history for this message
In , Jan B (hey-e) wrote :

Yep, it seems to drop the position. Because when I switch from:
Monitor primary, laptop secondary
to
Monitor secondary, laptop primary
the configuration is properly remembered. That is, the external monitor is always correctly above the laptop.

It’s just when switching to »Mirror« or »Off« and then back to one of Primary/Secondary that the positioning is reset.

So basically yes, it would be good if the last used positioning could not only be remembered when switching between the two/multiple-screen setups, but also when there’s only a one-screen setup so that it’s properly restored when switching back to the multiple-screen one.

Thanks!

Changed in elementaryos:
status: Fix Committed → Fix Released
Changed in gnome-settings-daemon:
importance: Low → Unknown
status: New → Unknown
tags: added: xenial
Tim Lunn (darkxst)
Changed in ubuntu-gnome:
milestone: trusty.3 → yakkety
Changed in ubuntu-gnome-flashback:
status: New → Confirmed
tags: added: multimonitor
Changed in gnome-shell (Ubuntu):
importance: Low → Medium
Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → Incomplete
Rich.T. (rich.t.)
tags: added: artful
Changed in gnome-shell (Ubuntu):
status: Triaged → Incomplete
Changed in gnome-shell (Ubuntu):
status: Incomplete → Fix Released
25 comments hidden view all 158 comments
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

kevin335200,

Please confirm you are talking about the monitor positions being forgotten and not talking about window positions?

Can anyone else reproduce this bug with 18.04 or 18.10?

Changed in gnome-shell (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
kevin335200 (kevin335200) wrote :

Daniel,
yes i'm talking about the monitor positions. But it seems like after some updates about gnome this month i'm not able to reproduce this problem anymore. Problem seems to be fixed.
I will reply if it happens again. Anyway thanks!

Revision history for this message
Carmelo Carrillo (carmelocarrillo) wrote :

I confirm this bug with 18.10.

The configuration monitors always is lost when suspend/hibernate.

How can I solve???? Thanks.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think that's possibly a different bug.

Suspend/hibernate and resume is the same session. This bug was about different sessions.

Revision history for this message
Alex Tomko (alextomko) wrote :

I also confirm this bug with fresh install Ubuntu 16.04. Any-time I leave my PC for 5 minutes, reboot or come back from a locked session my monitors go back not being aligned properly like I have saved them.

Revision history for this message
Alex Tomko (alextomko) wrote :

I am using "gnome-session-fallback" with metacity fyi.

Revision history for this message
Alex Tomko (alextomko) wrote :

I prefer to run this script from a terminal since I open one the first thing I do but found a way to fix related to what others have done with a desktop shortcut.

I tried a `systemctl service` upon login but it errors on so many items that I gave up.

Following the third answer's direction's - login with bad configuration:

     cd .config
     mv monitors.xml{,.bak}

Now set your monitors with system settings.

Copy fixed script with `wget https://raw.githubusercontent.com/alextomko/monitors/master/monitors` and put it in a path to run from terminal.

     cd /home/$USER/bin

     mkdir /home/$USER/bin

     wget https://raw.githubusercontent.com/alextomko/monitors/master/monitors

     mv monitors /home/$USER/bin/monitors

     chmod +x /home/$USER/bin/monitors

      # Run it

       monitors

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Best I can tell, this bug was fixed (for gnome-shell) in 18.04. The latest duplicates are from Ubuntu 17.10, and the above comments about later releases appear to be different bugs from this one.

If anyone finds a similar problem in Ubuntu 18.04 or later then please run this command to create a new bug:

  ubuntu-bug gnome-shell

Changed in gnome-shell (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

alextomko, do you have same problem in 18.04?

Revision history for this message
Nick G (nick--g) wrote :

@Alberts this is still an issue in Xubuntu 18.04 :(

I have been battling with in xubuntu 16.04 and thought it would have been resolved by now...no love for xubuntu :(

root issue:
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1283615

A Work around solution:
http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost#h1-setup-a-clean-configuration

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug doesn't seem to cover Xubuntu or XFCE. If you have problems with those then please open a new bug.

P.S. Bug 1283615 has been untouched for over 4 years so it's likely the information there is now out of date.

Revision history for this message
Thomas Maier (thaier) wrote :

@muktupavels (#127): I do not have this bug in 18.04.1 LTS. My settings persist over a restart.

One thing I noticed though is that the screens are reset every time when switching to "Built-In Only" and then "Join Displays" via WindowsKey+p. A workaround I found for this is to switch back to "External only" and then to "Join displays". This restores the settings. Hope this saves anyone some time.

Revision history for this message
Chris Rainey (ckrzen) wrote :

WORKAROUND FOR UBUNTU 18.10(clean install):

Replace gdm3 with slick-greeter + lightdm-settings + gnome-screensaver + numlockx(optionally)

See: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1820423

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Remember this bug is closed for Gnome Shell per comment #126.

But I understand that maybe some people are still experiencing similar problems. It appears to me one such similar problem that wouldn't have been fixed here is with laptop display switching where the set of connected displays changes (unlike a desktop). If you experience such problems with laptop display switching then please open a new bug by running:

  ubuntu-bug gnome-shell

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, I give in... Since this bug is so popular and I can't find any explicit code fix we can reopen this one. Unfortunately I still cannot reproduce this bug myself.

Changed in gnome-shell (Ubuntu):
importance: Medium → High
status: Fix Released → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: bionic
removed: artful
tags: added: cosmic
Revision history for this message
Christopher Nelson (nadiasvertex) wrote :

To reproduce it, try switching the order of your displays. For example, make the display on port 0 be on the right of the display on port 1 (instead of the "natural" order of 0=left, 1=right.) I also notice that changing the orientation of the primary display to "portrait right" causes problems, whereas landscape or portrait left don't.

Revision history for this message
Chris Rainey (ckrzen) wrote : Re: [Bug 1292398] Re: Second screen position isn't saved from one session to another

Our setup:

1. Older GPU(Integrated Intel® HD Graphics 2000)

2. Always using some sort of display multiplexer(splitter) on VGA out to
dual TV’s, previously, now only single local monitor on VGA and 4K
Tx(wireless) on HDMI out to a projector, currently.

Thoughts:

1. Could the splitter or wireless transmitter be inducing some sort of
delay or interference with the EDID detection of the monitors expected by
gdm3 + gnome-session + mutter in an X11 session?

2. What is slick-greeter doing differently from gdm3 that avoids this
problem?

3. Does LightDM differ from slick-greeter all that much?

On Thu, Apr 18, 2019 at 07:15 Christopher Nelson <email address hidden>
wrote:

> To reproduce it, try switching the order of your displays. For example,
> make the display on port 0 be on the right of the display on port 1
> (instead of the "natural" order of 0=left, 1=right.) I also notice that
> changing the orientation of the primary display to "portrait right"
> causes problems, whereas landscape or portrait left don't.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1292398
>
> Title:
> Second screen position isn't saved from one session to another
>
> Status in elementary OS:
> Fix Released
> Status in GNOME Settings Daemon:
> Incomplete
> Status in GNOME Shell:
> Confirmed
> Status in Ubuntu GNOME:
> Confirmed
> Status in Ubuntu GNOME trusty series:
> Confirmed
> Status in Ubuntu GNOME xenial series:
> Confirmed
> Status in Ubuntu GNOME Flashback:
> Confirmed
> Status in Unity:
> New
> Status in gnome-settings-daemon package in Ubuntu:
> Triaged
> Status in gnome-shell package in Ubuntu:
> Confirmed
> Status in mutter package in Ubuntu:
> Confirmed
>
> Bug description:
> (Noticed on Ubuntu 14.04 beta 1 GNOME)
> At work I have a second screen, which I prefer to virtually put on the
> left side of my laptop screen.
> Using gnome-control-center I can change the position of the second
> without problem.
> But when I disconnect the second screen (to work on another place) and
> then connect it again
> OR if I just power off the laptop and turn it on again,
> the second screen position is set back to the default right position.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: gnome-control-center 1:3.6.3-0ubuntu53
> ProcVersionSignature: Ubuntu 3.13.0-17.37-generic 3.13.6
> Uname: Linux 3.13.0-17-generic x86_64
> ApportVersion: 2.13.3-0ubuntu1
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Fri Mar 14 08:50:00 2014
> InstallationDate: Installed on 2014-03-01 (12 days ago)
> InstallationMedia: Ubuntu-GNOME 14.04 "Trusty Tahr" - Alpha amd64
> (20140226)
> ProcEnviron:
> TERM=xterm
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=fr_FR.UTF-8
> SHELL=/bin/bash
> SourcePackage: gnome-control-center
> UpgradeStatus: No upgrade log present (probably fresh install)
> usr_lib_gnome-control-center: deja-dup 29.5-0ubuntu2
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/elementaryos/+bug/1292398/+subscriptions
>

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug should not be about the greeter/login screen at all. If you have problems with the login screen then please use bug 1760849 instead.

Please do not discuss greeter/login screen problems here.

Revision history for this message
Chris Rainey (ckrzen) wrote :

@vanvugt: not sure if #136 is directed at my comment in #135, but the _only_ way to produce the problem is to logout or reboot which naturally involves the display manager. Again, the problem goes away, for my case, simply by using a different display manager, as stated in #131.

The problem is clearly related to the display manager process as it starts up the user session and is directly responsible for _causing_ the issue for me.

If I use a different display manager with gnome-session(mutter), the monitor settings work correctly.

To be clear: I don't care which monitor the login box widget is displayed on. I care about the monitor/display orientation _after_ I successfully login.

slick-greeter = works

gdm3 = not working

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for clarifying that.

Yes it was a general statement I wanted to remind everyone of, too.

Revision history for this message
Max (macbreeze) wrote :

Using lightdm and xfce this problem exists as well. Additionally with this setup there are no monitors.xml in ~/.config. Although the login screen is on the main monitor, which is awkward.

There are also other slightly funny situations, as when closing the lid on laptop then connecting laptop to additional monitors, the monitor setup is sometimes(?) restored. That is most likely due to that laptop was earlier connected to these monitors, then disconnected and then later connected again.

Still really annoying bug when using laptop on- and off-site.

Revision history for this message
Chris Rainey (ckrzen) wrote :

@macbreeze you might want to open a bug for the xfce4-session package or the xubuntu meta package as this one is targeting the gnome-shell package. LightDM has settings in /etc/lightdm for overriding which monitor is used for the login widget and xrandr tool may help in the session after login.

tags: added: disco
tags: removed: cosmic
tags: removed: trusty
Revision history for this message
Nikolaj Løbner Sheller (nikolaj-l) wrote :

I am seeing this problem on Disco Dingo using Wayland.

Revision history for this message
Bastian N (maxiqboy) wrote :

@Daniel, just send the bug report to forum,

As @Max said above, it really really annoying bug when using a laptop with an external monitor.

When I using dual screen with my laptop on the left, external monitor on the right, I set that on Display setting.

when I press Super + P to turn off whatever monitor and turn it on again ( by choosing join display ) the last monitor used ( not turn off ) will automatically show on the upper - left of another.

tags: removed: disco
Changed in mutter:
importance: Unknown → Low
status: Unknown → Confirmed
3 comments hidden view all 158 comments
Revision history for this message
Ian Johnson (anonymouse67) wrote :

Just to clarify, I still see this bug with Focal and X11 and nvidia drivers

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ian,

Please try this:

0. Delete ~/.config/monitors.xml

1. Configure your preferred monitor arrangement.

2. Log out.

3. Ctrl+Alt+F4 and log into the text console.

4. cp ~/.config/monitors.xml monitors-before.xml

5. Ctrl+Alt+F1 and log into the graphics console.

6. Compare ~/.config/monitors.xml and monitors-before.xml - do either or both contain the arrangement you wanted?

tags: added: focal
Revision history for this message
Grant Smith (gmsmi) wrote :

Hi Daniel,

I'm having this problem, so I tried the test you detailed in comment #147. Both XML files were identical and they also have the settings I want. Still when I log in the monitors are in the wrong place, orientation, scaling level, and primary monitor.

I'm using a fresh installation of Ubuntu 20.04, X11, and AMD open-source drivers.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Hi Daniel, I tried your instructions and there is no difference between ~/.config/monitors.xml and monitors-before.xml. Both files specify the desired configuration, but upon logging in the monitors are in the wrong configuration.

Let me know if there's anything else I can try to help debug this issue.

Revision history for this message
Grant Smith (gmsmi) wrote :

I tried testing what happens if I try a configuration with only one monitor enabled. The log in screen has all three monitors on, but then when I log in it properly disables two of them and the config loads as it was when I logged out. Monitor 2 enabled with fractional scaling 1.5 and monitors 1 and 3 disabled.

I will attach the files of the working config and the config I want that does not load.

After comparing the two XML files, my best guess as to what is going on is that if there is more than one "<logicalmonitor>" element then the config will not load properly.

Revision history for this message
Grant Smith (gmsmi) wrote :

This is the other xml file that does not work.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think bug 1825593 covers a more current problem related to fractional scaling in Ubuntu 20.04. That might also cause the whole screen layout to be forgotten, I would guess.

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Daniel, I just turned off fractional scaling and I no longer have this problem, so for me at least with nvidia drivers and focal, I don't see this bug and instead see 1825593 as you mentioned.

tags: removed: xenial
Revision history for this message
Michele Gastaldo (poomerang) wrote :

Hi Daniel,

I did some testing because I seemed to be affected by this issue on Ubuntu 20.04. In fact I first used the script from bernaerts mentioned above (#4 for instance). Anyway I disabled its startup before these tests, I mentioned it to clear the ground.

So I followed your instructions in #147: everything seems to work, the two monitors.xml are identical and the configuration is correctly applied on my system.

Then I tested some different real use behaviours, as I am working with a laptop attached to a TV and I not always have them connected, but most importantly I only use the TV to watch videos, while in normal use I prefer to work on my screen only.

So I started with a new monitors.xml, setup the dual monitors (Join Displays) view, and then tried:
1. unconnecting the TV "on hot", then connecting it again
2. the same, but logging out and in between the two steps
3. turning off the computer as it is, unconnecting the TV, restarting, and connect the TV at some point
4. switching the configuration to Single-Display, then activating dual view again

In cases 1-3 the configuration is back as expected, so everything ok. In case 4 the configuration is lost.
This is because in 1-3 monitors.xml is unaffected (a monitors.xml~ is instead created and apparently used; not sure how that is handled), whereas in 4 it is overwritten and the TV is not only marked <disabled>, but its whole configuration (X,Y, scale, etc.) deleted.

This might seem trivial, but I originally expected the single-display configuration not to interfere with the dual one in case 4 just as in the other ones. 4 is quite a usual behaviour of mine, and maybe not only: 1 and 2 are not recommendable (in fact, in one case the X session crashed); 3 is surely correct, but 4 might also be quite likely - a monitor/TV is physically connected, but used only at times (e.g., for watching movies or for particular tasks), so one would switch it off and want windows not to open there. Expecting the system to understand that "Off" does not mean "forget its configuration"...

I think more people here fall in this kind of behaviour (surely #143 and likely #114), which is not really an issue of the configuration not being loaded, but rather a 'bad managing' of different situations

Revision history for this message
Nemanja V (vooxo) wrote :

On Ubuntu 19.10 I'm experiencing the same thing as the comment above:

###################################
Jan B (hey-e) wrote on 2015-04-08: #143
I have a laptop and a monitor as secondary display
...
Every time I switch back from only using the monitor (laptop display disabled) to using the laptop display as a second screen – I need to rearrange the displays. By default they are side-by-side but I always want the monitor above the laptop display.
###################################

I don't have Ubuntu 20.x installed at the moment to confirm whether it happens there, too.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ubuntu 19.10 is no longer supported (since July 2020) so please don't add comments about that.

https://wiki.ubuntu.com/Releases

Revision history for this message
In , Gnome-sysadmin (gnome-sysadmin) wrote :

GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/mutter/-/issues/

Thank you for your understanding and your help.

Changed in mutter:
status: Confirmed → Expired
Revision history for this message
Daniel van Vugt (vanvugt) wrote (last edit ):

No bug reports since 2020 so I assume this is fixed for GNOME. At least in Ubuntu 22.04.

Anyone still experiencing problems, please open a NEW bug by running:

  ubuntu-bug gnome-shell

Changed in gnome-shell (Ubuntu):
status: Confirmed → Fix Released
Changed in mutter (Ubuntu):
status: Confirmed → Fix Released
no longer affects: gnome-shell (Ubuntu)
Displaying first 40 and last 40 comments. View all 158 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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