[Bug 1065979] Re: external/internal monitors mirrored on boot when laptop lid is closed

Ritesh Khadgaray 1065979 at bugs.launchpad.net
Thu Jan 31 14:46:34 UTC 2013


> * you are changing "do-nothing" to do something, the main reason that this 
> setting was added is that the xrandr calls can be slow on some drivers
> (e.g taking over a second), your patch will add several seconds delay on boot
> on some configuration


The upstream code has changed this behaviour. The patch reflects the upstream behaviour closely.

from gsd-xrandr-manager.c

1692 static GnomeRRConfig *
1693 make_default_setup (GsdXrandrManager *manager)
1694 {
1695         GsdXrandrManagerPrivate *priv = manager->priv;
1696         GnomeRRConfig *config;
1697         GsdXrandrBootBehaviour boot;
1698 
1699         boot = g_settings_get_enum (priv->settings, CONF_KEY_DEFAULT_MONITORS_SETUP);
1700         g_debug ("xrandr default monitors setup: %d\n", boot);
1701 
1702         switch (boot) {
1703         case GSD_XRANDR_BOOT_BEHAVIOUR_DO_NOTHING:
1704                 config = make_xinerama_setup (manager, priv->rw_screen);
1705                 break;
1706         case GSD_XRANDR_BOOT_BEHAVIOUR_FOLLOW_LID:
1707                 if (laptop_lid_is_closed (manager))
1708                         config = make_other_setup (priv->rw_screen);
1709                 else
1710                         config = make_xinerama_setup (manager, priv->rw_screen);
1711                 break;
1712         case GSD_XRANDR_BOOT_BEHAVIOUR_CLONE:
1713                 config = make_clone_setup (manager, priv->rw_screen);
1714                 break;
1715         case GSD_XRANDR_BOOT_BEHAVIOUR_DOCK:
1716                 config = make_other_setup (priv->rw_screen);
1717                 break;
1718         default:
1719                 g_assert_not_reached ();
1720         }
1721 
1722         return config;
1723 }


The default being "follow-lid" . 

The upstream change is massive ( more to do with power management and
systemd ), and as per me not worth it.


This is the code which we use

1810 static void
1811 apply_default_boot_configuration (GsdXrandrManager *mgr, guint32 timestamp)
1812 {
1813         GsdXrandrManagerPrivate *priv = mgr->priv;
1814         GnomeRRScreen *screen = priv->rw_screen;
1815         GnomeRRConfig *config;
1816         GsdXrandrBootBehaviour boot;
1817 
1818         boot = g_settings_get_enum (priv->settings, CONF_KEY_DEFAULT_MONITORS_SETUP);
1819 
1820         switch (boot) {
1821         case GSD_XRANDR_BOOT_BEHAVIOUR_DO_NOTHING:
1822                 return;
1823         case GSD_XRANDR_BOOT_BEHAVIOUR_CLONE:
1824                 config = make_clone_setup (mgr, screen);
1825                 break;
1826         case GSD_XRANDR_BOOT_BEHAVIOUR_DOCK:
1827                 config = make_other_setup (screen);
1828                 break;
1829         default:
1830                 g_assert_not_reached ();
1831         }
1832 

The do-nothing does not exists anymore, and we use follow-lid or do-
nothing which still call xinerama.


> * you make the default to be xinerama when there is no lid closed, that's 
> wrong in some cases.
> E.g we want to default to mirror for projectors configurations) ... there is
>  no good way to detect projectors at the moment though, that's why we default
> to mirror

This might be the current behaviour, but not an acceptable behaviour as
per upstream ( and our customer ).


> * the lid status is not an accurate info, some hardware don't rely that status
> correctly

In this case, imho, we would need to file a but against
kernel/acpi/hardware vendor as this would break g-s-d xrandr plugin with
or without the patch.


> Did you consider suggesting to the customer to just change the
> "default-monitors-setup" gsettings key from 'do-nothing' to 'dock'.
> The schemas documentation says: 'dock' will switch off the internal monitor

The current behaviour is not acceptable, and should be updated to be
suitable.


> That seems like what they want, and they should be able to just deplay a custom
>  settings package including a schemas override easily?

Personally, I believe we should have saner defaults in Ubuntu .


-- ritz

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1065979

Title:
  external/internal monitors mirrored on boot when laptop lid is closed

Status in Gnome Settings Daemon:
  Fix Released
Status in “gnome-settings-daemon” package in Ubuntu:
  Confirmed
Status in “gnome-settings-daemon” source package in Oneiric:
  Won't Fix
Status in “gnome-settings-daemon” source package in Precise:
  Won't Fix
Status in “gnome-settings-daemon” source package in Quantal:
  Won't Fix
Status in “gnome-settings-daemon” source package in s-series:
  Fix Committed

Bug description:
  If I put my X220 in a dock, and plug in an external monitor. Then I
  close the lid and turn on the computer, the computer will boot up with
  both the internal laptop screen and external monitor on and mirror.
  Because I can't see the laptop screen, I would expect the external
  monitor to be only on at its maximum resolution. I've actually tried
  this without the dock by plugging in an external monitor to my laptop
  and shutting the lid during boot quickly, the same problem persists.
  This problem is exhibited on Precise/Oneiric as well as Quantal.

  In particular this specification mentions this behavior: 
  https://wiki.ubuntu.com/X/Blueprints/MultiMonitor
  In this user story:
  """Alan goes to the office, puts his laptop with the lid closed into a docking station and boots it up. The external display should be run at its native resolution. Later that day he needs to see a customer. He suspends the laptop and takes it out of the docking station. At the customer he wakes up the laptop and the internal screen is used at its native resolution. Finishing his visit the laptop is suspended, brought back to the office. There it is placed in the docking station, woken up and the external display should run again at its native resolution."""

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: xserver-xorg-video-intel 2:2.20.9-0ubuntu2
  ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
  Uname: Linux 3.5.0-17-generic x86_64
  .tmp.unity.support.test.0:

  ApportVersion: 2.6.1-0ubuntu3
  Architecture: amd64
  CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
  CompositorRunning: compiz
  Date: Fri Oct 12 08:16:04 2012
  DistUpgraded: Fresh install
  DistroCodename: quantal
  DistroVariant: ubuntu
  ExtraDebuggingInterest: Yes, including running git bisection searches
  GraphicsCard:
   Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
     Subsystem: Lenovo Device [17aa:21da]
  InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121001)
  MachineType: LENOVO 42872WU
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-17-generic root=UUID=aeedfe74-da24-46f5-837e-ec386440a8c8 ro quiet splash vt.handoff=7
  SourcePackage: xserver-xorg-video-intel
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 11/01/2011
  dmi.bios.vendor: LENOVO
  dmi.bios.version: 8DET55WW (1.25 )
  dmi.board.asset.tag: Not Available
  dmi.board.name: 42872WU
  dmi.board.vendor: LENOVO
  dmi.board.version: Not Available
  dmi.chassis.asset.tag: No Asset Information
  dmi.chassis.type: 10
  dmi.chassis.vendor: LENOVO
  dmi.chassis.version: Not Available
  dmi.modalias: dmi:bvnLENOVO:bvr8DET55WW(1.25):bd11/01/2011:svnLENOVO:pn42872WU:pvrThinkPadX220:rvnLENOVO:rn42872WU:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
  dmi.product.name: 42872WU
  dmi.product.version: ThinkPad X220
  dmi.sys.vendor: LENOVO
  version.compiz: compiz 1:0.9.8.4-0ubuntu2
  version.ia32-libs: ia32-libs N/A
  version.libdrm2: libdrm2 2.4.39-0ubuntu1
  version.libgl1-mesa-dri: libgl1-mesa-dri 9.0-0ubuntu1
  version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
  version.libgl1-mesa-glx: libgl1-mesa-glx 9.0-0ubuntu1
  version.xserver-xorg-core: xserver-xorg-core 2:1.13.0-0ubuntu6
  version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.3-0ubuntu2
  version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.99.99~git20120913.8637f772-0ubuntu1
  version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.20.9-0ubuntu2
  version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.2-0ubuntu3

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-settings-daemon/+bug/1065979/+subscriptions



More information about the Ubuntu-sponsors mailing list