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?

Revision history for this message
The Bright Side (me-knowingme) wrote :

Thanks for your suggestion, Gabriel! Just to chime in - didn't work for me.

Revision history for this message
Chris (chris-scott) wrote :

In case it's useful:

I have confirmed the issue on Ubuntu Gnome 14.04 but only when the monitor on the left is not the primary monitor. i.e. I can set my external monitor to be on the left of my laptop's built in screen, but only if I set it as the primary display. This might be important because, for me at least, it was not a "timing problem" but a configuration problem.

Working monitors.xml attached.

Revision history for this message
HaraldK (pifpafpuf) wrote :

What do you mean "on the left"? Somehow it is hard to believe the actual physical location should be important. But clearly one of the monitors must be listed first in monitors.xml and gets x,y=0,0 assigned, while the other monitor is then relative to this one.

So we have three properties a monitor can have:

1) internal laptop or external (or put it: hardware's main monitor and additional monitor)
2) has the gnome panel or not
3) is listed with x,y=0,0 as reference in monitors.xml

Makes 8 possibilities. Argh, do I really want to try them now?

(BTW: my monitors are stacked up vertically, the external one on top has the panel. And, hell, I just notice my monitors.xml gathered 3 configurations meanwhile. Ohh my.)

Revision history for this message
HaraldK (pifpafpuf) wrote :

Now here is something that did help. In effect it is likely much the same as killing gnome-settings-manager, except it is not killed, but just started later:

sudo echo manual >/usr/share/upstart/sessions/gnome-settings-daemon.override

This prevents the gnome-settings-daemon to be started by the 'init --user' session manager.

I thought now the gnome-settings-daemon might be started by one of

/usr/share/upstart/xdg/autostart/gnome-settings-daemon.desktop
/etc/xdg/autostart/gnome-settings-daemon.desktop

but these don't seem to do anything. Therefore I created a ~/.config/autostart/gsd.desktop which starts gnome-settings-daemon.

The downside of this approach in contrast to the kill-approach is that the if the daemon falls over, it is not automatically restarted.

Obviously it helps to start the daemon rather later than earlier. Looking at the preconditions in
/usr/share/upstart/sessions/gnome-settings-daemon.conf, they are

  start on started dbus and starting gnome-session INSTANCE=GNOME

There is probably only one little thing missing here, but I have no background to guess what it might be.

Revision history for this message
Chris (chris-scott) wrote :

@HaraldK

Weirdly, I actually mean on the left. I tested different configurations where the origin was not 0,0 (for example moving both monitors by 1 to the right) and the monitors.xml file only takes when the primary display is on the left. For example:

<output name="eDP1">
          <vendor>APP</vendor>
          <product>0x9cf0</product>
          <serial>0x00000000</serial>
          <width>1440</width>
          <height>900</height>
          <rate>60</rate>
          <x>1920</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>yes</primary>
      </output>
      <output name="VGA1">
      </output>
      <output name="HDMI1">
          <vendor>AOC</vendor>
          <product>0x2369</product>
          <serial>0x0000073e</serial>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
          <x>0</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>no</primary>
      </output>

will not be used but swapping the HDMI1 monitor to be primary (as per previous attachment) will work.

I have not tried any vertical configurations.

Revision history for this message
Thomas C. (thw-th) wrote :

Because this seems to be a timing issue, I extend the approach of HaraldK. The idea is just start the g-s-d a little bit later. Therefore I create a file /usr/share/upstart/sessions/gnome-settings-daemon.override which overrides the exec statement:

script
  sleep 2
  exec /usr/lib/gnome-settings-daemon/gnome-settings-daemon
end script

This works for me on several setups (with SSD and conventional hard disks). Adding a somewhat random delay is not really a satisfying solution. A real Bugfix is still needed!

Other test relying on /etc/xdg/autostart/ completely fail, although the autostart is basically working and a g-s-d startup file is installed by default.

Revision history for this message
Matthias Jordan (matthiasjordan) wrote :

I tried the workaround proposed by thw-th. It works, but only for the first login. That means the screen configuration is wrong

- on the login screen (gdm)
- after locking the screen and unlocking it again

With lightdm, the login screen works like a charm but the desktop is affected by the screen config issue right after logging in, when the above workaround is not installed.

So, yes, seems like a GNOME issue. Not the only one, I'd like to add.

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
Revision history for this message
HaraldK (pifpafpuf) wrote :

Tried the approach of thw-th (comment #46) and it kind of works. This is an 8 year old Lenovo T500 laptop and I had to enter 6 seconds delay before it started to work. A downside is that my selected desktop background image is not set, or rather removed that way: it is set at some time first, then monitors flash, and flicker like many brokens settings are tried until finally presumably gnome-settings-daemon puts some order onto it, but with a completely black desktop. When using the settings UI to set the background, it looks like it should actually be set. :-(

Revision history for this message
Aaron Segner (asegner) wrote :

As a workaround, I have had good luck using my ubuntu / gnome laptop with two differently configured locations -- one location having 2 screens and the other having 3 screens -- by adding the following to my "startup applications"

    gnome-settings-daemon --replace

Revision history for this message
chris (christian.ego) wrote :

I have also the same issue with 2 external monitors on my laptop.

<monitors version="1">
  <configuration>
      <clone>no</clone>
      <output name="eDP1">
          <vendor>SEC</vendor>
          <product>0x3642</product>
          <serial>0x00000000</serial>
          <width>1366</width>
          <height>768</height>
          <rate>60</rate>
          <x>1920</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>yes</primary>
      </output>
      <output name="VGA1">
          <vendor>FUS</vendor>
          <product>0x0780</product>
          <serial>0x01010101</serial>
          <width>1680</width>
          <height>1050</height>
          <rate>60</rate>
          <x>3286</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>no</primary>
      </output>
      <output name="HDMI1">
          <vendor>FUS</vendor>
          <product>0x082a</product>
          <serial>0x00012569</serial>
          <width>1920</width>
          <height>1080</height>
          <rate>60</rate>
          <x>0</x>
          <y>0</y>
          <rotation>normal</rotation>
          <reflect_x>no</reflect_x>
          <reflect_y>no</reflect_y>
          <primary>no</primary>
      </output>
      <output name="VIRTUAL1">
      </output>
  </configuration>
</monitors>

Revision history for this message
Yogu (yogu) wrote :

Thomas W., you're my hero. Although I had to include the start-stop stuff in the file:

description "The Gnome Settings Daemon"
author "Stéphane Graber <email address hidden>"

start on started dbus and starting gnome-session INSTANCE=GNOME
stop on stopping gnome-session

respawn
script
  sleep 2
  exec /usr/lib/gnome-settings-daemon/gnome-settings-daemon
end script

(END)

But I don't get it why this bug is "low". It seems to affect every user with two monitors.

Revision history for this message
darthanubis (darthanubis) wrote :

Ubuntu-Gnome 14.10 beta 2, Nvidia, Dual Monitors.

Revision history for this message
Alfredo Tschamler (atschamler) wrote :

Same problem here. Ubuntu 14.04. GNOME Shell 3.10.4. All the issue started when I switch from unity to gnome-shell. I hadn't this problem with unity. The workaround "gnome-settings-daemon --replace" or update-monitor-position ->
(http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost)

work for me, but these workaround cause that the lock screen shield get blank (blue screen with the hour), and that is very annoying!
:(

Revision history for this message
Christian Bender (cbender) wrote :

I have the same issue on Ubuntu 14.04 LTS.
Restarting the settings daemon works, but adding 2 seconds waiting time to the upstart script
caused my background to behave strangely (I'm using conky and the windows I move leave a copy of themselves on the desktop).
Also it doesn't solve the issue with the login screen. It is displayed on my tv, in another room.

Revision history for this message
HaraldK (pifpafpuf) wrote :

If the login screen is not properly set, it may actually help to copy a working monitors.xml to /etc/gnome-settings-daemon/xrandr. If Windows drag ghost pictures, gnome-settings-daemon was still started to early. For my setup it helped to increase the waiting time to 6 seconds.

Cody Garver (codygarver)
Changed in elementaryos:
importance: Undecided → Medium
milestone: none → freya-rc1
Revision history for this message
Sascha Heuterer (theanachron) wrote :

Hey guys, I've written a script https://github.com/Anachron/scripts/blob/master/display.sh which I invoke at the startup of my system https://github.com/Anachron/scripts/blob/master/startup.sh , which checks the system every second for changed display settings. (It will generate a list of attached screen devices and compare to the old list) If a change has been detected, it will check what displays are used and will setup a predefined behavior.

This works pretty well! Whenever I attach/detach screens from my pc, it will do as it says.
Also, the interval of 1 second may be overkill for you, but it doesn't need any CPU power (under 1%) and it seems very smooth.

You should run the command xrandr before using/modifying the display script to get a list of possible devices that you can use.
That's what always bothered me with linux, and that's my solution.

I hope you enjoy!

Revision history for this message
marco tarabella (l6-postmaster-qh-deactivatedaccount-deactivatedaccount) wrote :

Same problem for me, fresh install of ubuntu gnome 14.04,
monitor change position when i reboot or when i do ALT f2 r
another thing: when i do alt f2 r the keyboard layout switch from italian to english.
hoping gnome team solve

Revision history for this message
Björn B (bjorn-c) wrote :

My setup is three monitors, one 24" 1920x1080, one 27" 2560x1440 and one 17" 1024x1280 (rotated).
Because my biggest screen is the primary and the others are on each side (according to the description above), when the settings are lost the rotated screen gets "unrotated" and the alignment is 27, 17, 24 instead, leaving me with a middle monitor rotated the wrong way and a very frustrated wife... :*( ;)

The bug seems to be based in gnome-shell, as it's like marco said, as soon as gnome-shell is restarted the monitor settings are forgotten. Restarting the daemon works, but to make it work even when restarting the shell it has to be triggered by the process gnome-shell rather than the service gnome-session, i believe.

For me, it doesn't work to get the settings loaded before or at the login page. Tried all of the above and executing xrandr at differenct rc levels, gdm levels, etc. I'm not sure what initiates the default settings for all users, which would be the logical options to load at the loginpage and whenever a new user login.

There are alot of workarounds to load the correct settings after user login, the best by far is the one HaraldK, Thomas W. and Yogu came up with together. To sum it up a bit, because it's all mixed up right now:

Edit this file: /usr/share/upstart/sessions/gnome-settings-daemon.conf

The file should look like this:
___________________________________________________________________________

description "The Gnome Settings Daemon"
author "Stéphane Graber <email address hidden>"

start on started dbus and starting gnome-session INSTANCE=GNOME
stop on stopping gnome-session

respawn
script
  sleep 2
  exec /usr/lib/gnome-settings-daemon/gnome-settings-daemon
end script
___________________________________________________________________________

As Thomas W. said, the sleep timing should be changed to whatever works for you.
I've tried to

This bug should change status to medium at least.

I hope you guys find a resolution for this soon!

Revision history for this message
Matthew Jeppesen (themattman2751) wrote :

I'm running Edubuntu 14.04.1 with Gnome-shell on a 17" laptop with a 19" monitor on the right, which is higher than the laptop (as set in display settings). However, upon reboot, the settings put the monitor on the left, with the laptop higher. Shouldn't this be saved to the video card?

Revision history for this message
HaraldK (pifpafpuf) wrote :

Wow, what a day. Hoping for relieve on this bug I apt-get install'ed xfce. It has the same problem with a crashing settings-deamon (it has its own). And I noticed that even xrandr just crashed on, what I think, where completely sane inputs with a floating point exception. And I did not really like the output of xrandr showing LVDS2, LVDS-1-0, VGA-1-1, VGA2 with at least three of them always in a connected state. My impression is that this is a source for confusion. The reason may be that my laptop has what I reckon is hybrid graphics, i.e. two graphics cards:

% lspci |grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV635/M86 [Mobility Radeon HD 3650]

Then I noticed that I had not installed fglrx. I apt-get install'ed it, rebooted, logged into gnome3 as well as xfce, fixed the display settings to my likings, rebooted, logged in and, wow, it is still there.

The remarkable part about xrandr output: It has now LVDS1, VGA1, LVDS-1-1, VGA-1-1, but no '2' and only the first two are listed as connected.

So in the end it seems this is rather a bug of whatever Xorg driver was superseeded by fglrx (I am not at all an expert of these drivers of X). I wonder if all others affected by this bug have hybrid graphics too.

Lets see if the settings survive one more reboot.

Revision history for this message
HaraldK (pifpafpuf) wrote :

Well, what is strange is that lsmod does not show fglrx. So it may be that I installed fglrx but am not using it and still it seems to have helped.-(

Revision history for this message
a8ksh4 (spam-dn) wrote :

This affects me as well. Thanks for the attention to this one.

Revision history for this message
Aaron Segner (asegner) wrote :

This appears to be completely resolved on any machine with Ubuntu 4.10 & gnome-shell 3.14.3-0ubuntu1~utopic1 also using the graphics drivers from oibaf ppa.

Revision history for this message
Steve O (stratus-ss) wrote :

This is definitely an issue on a fully up-to-date Ubuntu 14.04 64 bit system with 4 monitors and GNOME Shell 3.10.4. I will update out of the gnome3-staging repo and report back on whether it is still an issue or not

Revision history for this message
Steve O (stratus-ss) wrote :

After the upgrade on the initial boot it still was not respecting the changes but the ghosting was gone.

I reset the displays with the "Displays" utility, saved changes and rebooted again. The Login screen is still experiencing issues (only 3 of the 4 monitors turned on... I believe this is an Nvidia issue) and The primary monitor was assumed to be on the far left throwing all the monitors out of order. However upon logging in my monitors were in their saved positions with no fiddling and best of all, no ghosting!

To summarize, updating with the packages in gnome3-staging repo seems to have fixed the bug

Revision history for this message
Cody Garver (codygarver) wrote :

elementary OS did not get the Mutter 3.14 backport stabilized in time for Freya's release. It was required to fix this bug.

Changed in elementaryos:
status: Confirmed → Won't Fix
Cody Garver (codygarver)
Changed in elementaryos:
milestone: freya-rc1 → none
Revision history for this message
Seth (bugs-sehe) wrote :

Hah. I've lived with this annoying bug for over a year now, only to bump into this unresolved beauty by accident.

Interestingly,

 - this made me require to babysit any use of the family PC (fixing their screen resolutions on each login). It also made me force Unity onto my clients because that's what Canonical unilaterally chose
 - There were also annoying effects with switching user sessions (losing the monitor layout again) and
 - sometimes things just getting awry spontaneously during a session (symptom invariably apparent keyboard lockup; needed to change to another VT to forcibly `gnome-shell --replace`. Then the monitors would be swapped (annoying mousing) and unfixable (something about dbus unreachable). Also, keyboard input would get duplicated on another VT (which has lead me to finding entire private chat conversations in /root/.bash_history on two occasions.... Luckily I rarely chat "rm -rf" or similar)

Now, nvidia card gave the ghost, meaning I get the builtin intel chipset to handle the graphics. Problem vanished! I just found this bug finding a solution to the problem that I can't find the place to configure where the GDM greeter is shown (if I switch off the secondary monitor, I don't see the greeter).

I second the sentiment that it's aggravating to see Canonical dismiss high-impact bugs like this on the sole reason that "We only support Unity".

This is by far not the only upstart/timing related bug (I vividly remember the issue where X would start on the wrong vt, so that "random keys" would tear down the desktop without warning). The fact that this one seems to manifest with other DMs shouldn't really make it less of an issue.

It's at 228 affected users now. And if more people - like me - have become so used to having to live with utterly broken UX since they opt out of Unity (for clearly superior Gnome3 - it's actually responsive, no advertisements) that they only flag as "also affects me" after they accidentally bump into it when searching for other things... The real number is going to be a bit higher.

Revision history for this message
Richard Eames (naddiseo) wrote :

This issue resolved for me with Ubuntu 14.10, but I seem to be the only one for whom it did

Revision history for this message
Sebastian Koch (skoch) wrote :

This issue also resolved for me in 14.10!

Revision history for this message
Leonardo Nicolas (leonicolas) wrote :

I had this problem only on Elementary OS Freya and Ubuntu Gnome 14.10. Currently I use Manjaro with Gnome 3.14.3 and I haven't had this problem since.

Revision history for this message
a8ksh4 (spam-dn) wrote :

I'm on Ubuntu Gnome 14.04 LTS with an nvidia card. Still seeing the prob. Wish I had time to fix this myself... :/ lol.

Revision history for this message
fleamour (gtx-swift) wrote :

Wont fix?!? You gits!!!

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
Revision history for this message
emarkay (mrk) wrote :

Workarounds? - nvidia - multiple monitors - have to reconfigure each time .. thanks.

Revision history for this message
elr77 (segunb77) wrote :

I would be very disappointed if this bug was not resolved because my personal work on agent based modelling and development in Java and SciLab/Matlab means I need to use 3 possibly 4 monitors with the centre monitor as my primary monitor.

I didn't comment earlier because after web searches I noticed that this was a problem with any thing based on Ubuntu 14.04 and partly why I wished Freya was based on a new version of ubuntu. Anyway for me the solution posted by Nicolas Bernaerts worked perfectly and consistently. There was the one moment if broken after running a dist-upgrade but I resolved by just rerunning the fix. If it is any help to the developers or other users you can find the fix at

http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost

I would help develop an integration of the fix into elementary OS but, my coding skills only go as far as Java a bit of C# and Matlab.

Changed in elementaryos:
status: In Progress → Fix Committed
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!

Revision history for this message
suoko (suoko) wrote :

Unfortunately the fix from bernaerts does not work on a PC I'm setting up now.
Is it possible to port the fix for elementaryos (if available) to this distro ?

Revision history for this message
suoko (suoko) wrote :

I compared the gnome-settings-daemon.install file in the gnome-settings-daemon package from trusty with the utopic one and found some differences:

UTOPIC

etc/xdg/autostart
usr/lib/gnome-settings-daemon*
usr/share/dbus-1/services
usr/share/icons
usr/share/locale
usr/share/gnome-settings-daemon*
usr/share/polkit-1
debian/source_gnome-settings-daemon.py /usr/share/apport/package-hooks

TRUSTY

etc
usr/lib/gnome-settings-daemon*
usr/share/dbus-1
usr/share/icons
usr/share/locale
usr/share/gnome-settings-daemon
usr/share/polkit-1
debian/source_gnome-settings-daemon.py /usr/share/apport/package-hooks

Could that missing "/xdg/autostart" in the Trusty package be the problem ?

See
http://packages.ubuntu.com/source/utopic/gnome-settings-daemon
http://packages.ubuntu.com/source/trusty/gnome-settings-daemon

Changed in elementaryos:
status: Fix Committed → Fix Released
Revision history for this message
The Bright Side (me-knowingme) wrote :

Great news! Fixed in Ubuntu GNOME 15.04, 64-bit, for me. Love it!!

Revision history for this message
Carlos Paz (phoenixsampras) wrote :

Problem persist. I have Ubuntu 15.04 , Gnome 3 from repositories. Using Gnome CLASSIC.

Revision history for this message
Carlos Paz (phoenixsampras) wrote :

Problem persist. 3 Monitors, HDMI, VGA, laptop monitor, 64 bits.

Revision history for this message
a8ksh4 (spam-dn) wrote :

Just did a fresh install of Ubuntu Gnome 14.04.2 and the problem is still there. Nvidia card w/ dual monitor. 64 bit. DVI.

Revision history for this message
Indaleto (indaleto) wrote :

With Elementary OS Freya the problem persists (64b, NVidia card, VGA)

Revision history for this message
Witold Szczeponik (wsz) wrote :

Had to install Ubuntu GNOME 14.04.2 lately (64 bit, NVIDIA Corporation GT216GLM [Quadro FX 880M], VGA.). Problem still persists.

Revision history for this message
fleamour (gtx-swift) wrote :

This seems fixed in elementary when power cycling but still bites when resuming from suspend, but only intermittently.

Revision history for this message
Bruce Pieterse (octoquad) wrote :

Looking at the upstream bug, some users seem to get this working with gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup do-nothing, which is the fix released for Elementary OS. Those still affected, could you confirm if this helps?

Changed in gnome-settings-daemon:
importance: Low → Unknown
status: New → Unknown
Revision history for this message
a8ksh4 (spam-dn) wrote :

OMFG, I just ran updates, rebooted, and my screen positions were preserved! I hope this is actually fixed... Thanks to whoever might have done this... !

Ubuntu Gnome 14.04.2 w/ Nvidia.

Revision history for this message
a8ksh4 (spam-dn) wrote :

Meh, false alarm, it was back to normal today. :P

Revision history for this message
Fredrik Jacobsson (smask) wrote :

I'm seeing this bug in the normal Unity Greeter, but booting into Unity sets the displays correctly where booting into Flashback doesn't

Versions of Ubuntu: Work computer with 15.10 and Home computer with 16.04 (devel and devel-proposed)

Revision history for this message
Emix (emix-pam) wrote :

I have the same bug in Ubuntu 15.10

Revision history for this message
maddin (ich-martin-drees) wrote :

Same problem here in Ubuntu Gnome 15.10 ... really annoying.

Revision history for this message
The Bright Side (me-knowingme) wrote :

Guys, this is just a total shot in the dark and probably won't work, but has anybody tried installing the nvidia-modprobe package? I did this some time ago (I think during 14.10) to fix issues with Darktable. Around the same time, but possibly only later, the second-screen issue disappeared for me. It never occurred to me until now, but there just miiiight be a connection?

I've been using nvidia-modprobe ever since, so I don't know if this has anything to do with it and frankly, I don't think so. But perhaps give it a shot and report back?

Revision history for this message
xavi (xaviersarrate) wrote :

I have the same bug in Ubuntu 15.10 classic desktop

Revision history for this message
Seppo (brack-sebastian) wrote :

I have the same/similar issue with Ubuntu 15.10, Unity, NVidia GTX 970, NVidia-352 prop driver.

My main display (the left one) is 1920x1080 plugged in via HDMI, and my second monitor is 1280x1024 via DVI. I setup my big monitor to be the left one, and my smaller to be the right one via Unity display settings. On system boot, boot screen and information is only shown on my smaller right monitor, left monitor doesn't even get a signal. On login screen, login credentials are only shown on the smaller right screen, with an expanded wallpaper showing on the left.
After login, the left monitor is set correctly to the left, but full screen applications like most of my games start on the smaller right monitor by default. I can fix this after every login via NVidia Xserver Settings app and marking my left monitor as primary, then every game starts correctly on my left monitor. I worked around this now with a startup script setting the primary monitor to the left one via xrandr command.
Can't understand why this issue is still low, as it is a very annoying usability bug. Hope this get's fixed in 16.04 LTS!

Revision history for this message
emarkay (mrk) wrote :

OK, 14.04.3 has come and gone, still not fixed.
Why?
Is there a working solution as a temporary fix?

Revision history for this message
Andriy Podanenko (podarokua) wrote :

Same on 16.04

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

Yeah still have the same problem in a test install of 16.04, though we've been using other distros since this bug occurred years ago as it makes it totally unusable for work.

In fact I'm only posting here because I initially misread Bruce's tag addition above as a typo for "denial" in the email :)

Tim Lunn (darkxst)
Changed in ubuntu-gnome:
milestone: trusty.3 → yakkety
Revision history for this message
Tim Lunn (darkxst) wrote :

I know there is an issue on Xenial where positions get lost on monitor changes (like adding/removing a monitor) but is anyone seeing the settings disappear on xenial across reboots?

Revision history for this message
Andriy Podanenko (podarokua) wrote :

Same thing is for Unity
I'm using
Ubuntu 16.04 (upgraded from 12.04->14.04->16.04)
lightdm 1.18.1
Unity 7.4.0

When system is booting first look at login window is good, then it rewrites a screen and makes monitors changed to wrong order. Changing monitors to right order after login via system settings helps only for the current session untill reboot

Needs fix

Changed in ubuntu-gnome-flashback:
status: New → Confirmed
Revision history for this message
Aurélien Léger (dexyne) wrote :

Same problem here for Ubuntu 15.10.

Login window is fine, then it inverse my screens order.
I need to change it again in the system panel to set it good again, but
it save the settings for only the current session.

Revision history for this message
eOrange (s-s-naumov) wrote :

The same bug on Ubuntu 16.04.1 on the clean installation.

My workaround for a moment - run xrandr command to change monitor position on startup.

Revision history for this message
Donjan Rodic (bryonak) wrote :

Not sure if this is equivalent, as I run unity-settings-daemon instead of gnome-settings-daemon (with the Compiz Unity-plugin turned off and gnome-panel instead), but it seems similar enough.

Just upgraded from 14.04 to 16.04.1.

I drop my laptop on a dock with two vertically oriented (rotated to portrait) monitors. This was working fine before, now it lights them up without the rotation. Rotating them manually via System Settings -> Displays, undocking and docking again reverts to the wrong (landscape) orientation.

The ~/.config/monitors.xml looks fine but seems to be ignored.
Reloading the settings with

  killall unity-settings-daemon

gives me the correct orientation, which is read from the monitor.xml (editing the file by hand and killing u-s-d accepts whatever changes I make), it just doesn't get triggered on docking changes.

That's the workaround for now: kill u-s-d every time I dock to that workplace, which may help with g-s-d too.
It would be nice for patchlvl 1 LTS upgrades to not break such basic stuff.

Revision history for this message
Filofel (filofel) wrote :

Same problem here after upgrading three days ago from Ubuntu 14.04.4 (that worked) to 16.04.1 (that's broken as explained below).

Desktop Environment: GNOME-Flashback:Unity (gnome-flashback-metacity)
Dual screen, notebook + external VGA monitor.
NVidia Quadro FX 770M, 3.3.0 NVIDIA 340.96

I set the primary monitor to the notebook screen using nvidia-settings, and the setting stuck across logout: I see the gnome panel properly moving to the notebook screen when the Gnome GUI comes up after logout and reboot.

OTOH, my notebook is positioned to the right of my VGA monitor, and that's where the problem starts. The system insists on placing the notebook built-in screen to the left of the monitor.

If I set the primary monitor (notebook built-in screen) to the right of the VGA screen using nvidia-settings, I get what I want for the current session. But this setting is lost after the next session logout (or reboot for that matter).

If alternately, I set the primary monitor (notebook built-in screen) to the right of the VGA screen using "System Settings / Displays", I get what I want for the session, but this setting is also lost after the next logout (reboot).

The trick suggesting at #39 doesn't work for me (to start with, I have no etc/gnome-setting-daemon/xrandr on my system)

To add insult to injury, the upgrade also brought me a similar problem with the alsamixer settings: They are set to some default muted values that makes the machine totally silent at each session start, and whatever way I set them, they are reset to the same muted default values upon the next logout / login.
Not sure whether I also owe this to gnome-shell, but that's what I suspect.
I use "sudo alsactl" to manually handle the problem and reload the proper alsamixer value, but I hate it.

I have so far not found any simple, reliable fix or workaround for either problem. <sigh>

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

I've just reproduced this bug on Mint 18.1 with Mate.

Revision history for this message
Davias (davias) wrote :

Hi guys, same problem after upgrading from 14.04 LTS to 16.04.2 LTS...Gnome fallback of course (it is called fallback becouse Unity is supposed to be an improvement?) I had this problem in 14.04, with AMD Catalyst Control Center not remembering monitors position. Solved using system/monitors to set them and it was ok. After the upgrade, Catalyst is gone for free Gallium...but I get the bug. Strange enough at login monitors are correctly positioned...after login they get messed up. Same system since 7.04, always worked with 3 monitors...I know there is a script to work back the monitor config file...but is such an inelegant solutions...c'mon this bug is old years!

Revision history for this message
s.illes79 (s-illes79-gmail) wrote :

started happening with kernel 4.12.0-rc

if I plug in an external screen, configure the layout, than when I disconnect and reconnect the layout is reset to the default.

if I boot back to 4.10.X all works fine.

Revision history for this message
Miles Marx (k-vp) wrote :

This appears to persist in 17.04....I installed Ubuntu Server first, and then installed Xubuntu via Tasksel because I needed to do some additional setup before any display manager would be able to function. I also tried MATE and LXDE on the same system, and they did not appear to suffer from this issue. Thus it would appear this is specific to XFCE.

GPU is GTX 980M on an MSI GT72s laptop.

I also tried setting the monitor configs through the Nvidia control panel to no avail. It's not just session to session but actually even just letting the screens idle to sleep, the layout is bombed and I have to reset it when they are powered back on.

It also fails to detect my external monitor's max refresh rate 9 times out of 10 but I suspect that is a deeper, unrelated issue.

Changed in gnome-shell (Ubuntu):
importance: Low → Medium
Revision history for this message
Rob (usofrob) wrote :

I had a problem with Ubuntu 14.04 and the latest supported nvidia drivers. Every time I locked my screen, it would lose the orientation. I was regularly using the nvidia X server settings application to correct the screen layout.

In order to correct it, I opened the System Settings application and made a couple modifications via the Displays options, and applied my changes. The changes weren't important, I just put it back to the same settings when I was done. Now the displays stay put when I lock my screen.

Changed in gnome-settings-daemon:
importance: Unknown → Medium
status: Unknown → Incomplete
Revision history for this message
juanca (peyroneljc) wrote :

Same problem, when updating, from 14.04 LTS to 16.04 LTS.
Desktop Environment: GNOME-Flashback: Unity (gnome-flashback-metacity)
The strange thing is that in 14.04, this did not happen to me.
I'm thinking of going back to Trusty.
The momentary solution with the script, does not provide solution for the icons on the desktop, these, change their position and overlap, and not put back in their original position.
Needs fix

Revision history for this message
Davias (davias) wrote :

Ok I got it! I was about to implement this solution http://www.calgorithms.com/blog/2014/07/30/fixing-multiple-monitor-position-in-ubuntu-gnome-14-dot-04/ (thanks for this one, even it was a patch I did not like to use) when I was enlighted by this: Gnome is not getting monitor IDs correctly. I have 2 digital BenQ and one analog Asus. If I run Ubuntu 16.04 (on Gnome Fallback) System settings, they are identified correctly, albeit in the wrong position (note: right after login, the monitor position is set correctly for a few seconds, then when desktop is loaded, is messed up again). So, I execute step 1 of the above solution, deleted monitors.xml, installed gnome-control-center and run it: the monitors where wrongly identified. I changed monitor position using the wrong IDs for the monitor, getting them were I wanted. Then just shut down and re-boot...voilà: after login the desktop was loaded with correct monitor position for all the 3 monitor!

Hope this can shed some light on this annoying Ubuntu bug...the fact that Ubuntu system settings/monitor and gnome-control-center IDs monitor in different ways is clearly the problem. I remember something similar when using Catalyst Control Center in 14.04 with fgrlx: could not get it to set it right - then, using system settings/monitor, I was able to fix it - and it stayed there until the upgrade to 16.04.

Revision history for this message
Filofel (filofel) wrote :

@davias (#108):
This works for me too!
Thanks a lot!

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

Please in (https://bugzilla.gnome.org/show_bug.cgi?id=734959):

- Add you to the CC list.
- Answer the developers questions.

Thank you.

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

Consider deduplicating with bug 1716341?

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

Or consider deduplicating with bug 1726538?

Rich.T. (rich.t.)
tags: added: artful
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

No comments here for 3 months... but also I have been using the second screen saved position in my day to day work, and it works.

If anyone can still reproduce this bug with Ubuntu 18.04 then please let us know.

Changed in gnome-shell (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Roland Giesler (lifeboy) wrote :

I have this problem with Ubuntu 17.10.

Unity (17.04) didn't have this problem.

Asus Zenbook Flip: I work primarily in 2 locations. I have large monitors at each location. When I'm at home, my notebook is positioned to the left of the monitor. I have configuration set for that.

When I get to the client site, the notebook is on the right of the monitor and the monitor is bigger than the one at home. After having my home settings active, gnome does not remember my client setup and vice versa.

I expect the configuration to be restored the moment I connect a previously set up external monitor, the way it was working on Unity.

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

Did anyone else find this was fixed in 18.04? I never encountered the problem when using multi monitors, as mentioned above.

If a fix went into 18.04 somewhere then it seems the relevant bugs were not updated. So we also don't know what fixed it :P

Revision history for this message
Jan Drabner (thesheeep) wrote :

I am also on 18.04 and this bug is definitely not fixed.

Whenever I restart my PC, all the windows open on the primary monitor again, no matter where they were before.

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

Jan, that's a very different bug about window positions. Please log a new bug.

This bug is about the monitor's position in screen space being forgotten (even with zero windows open).

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

Daniel, the problem is still not be fixed in 18.04.

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
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)
To post a comment you must log in.
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.