chromiumos/platform/monitor_reconfig.git
3 years agoRemoved HOTPLUG=1 from the monitor hotplug rules. 0.12.392.B 0.12.433.B 0.12.433.B109 0.12.433.B62 0.13.434.B 0.13.509.B 0.13.558.B 0.13.587.B 0.14.811.B 0.15.877.B 780.B factory-1020.B factory-1235.B factory-1284.B factory-1412.B factory-1987.B factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B factory-2985.B factory-2993.B factory-3004.B factory-3536.B factory-4128.B factory-4290.B factory-4455.B factory-980.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-3842.B factory-spring-4131.B factory-spring-4262.B firmware-881-u-boot-v1 firmware-butterfly-2788.B firmware-falco_peppy-4389.B firmware-kiev-2.112.B firmware-leon-4389.26.B firmware-link-2348.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-pit-4482.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B firmware-stout-2817.B firmware-u-boot-v1 firmware-uboot_v2-1299.B firmware-wolf-4389.24.B master release-1011.B release-R16-1193.B release-R17-1412.B release-R18-1660.B release-R19-2046.B release-R20-2268.B release-R21-2465.B release-R22-2723.B release-R23-2913.B release-R25-3428.B release-R26-3701.B release-R27-3912.B release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize-3658.0.0 stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-bluetooth-smart stabilize-daisy stabilize-link stabilize-link-2913.278 stabilize-spring-4100.53.B stabilize2 test-982.B toolchain-3428.65.B toolchain-3701.42.B toolchainA toolchainB
Doug Anderson [Mon, 11 Apr 2011 16:55:57 +0000 (09:55 -0700)]
Removed HOTPLUG=1 from the monitor hotplug rules.

Since udev didn't understand this key, it wasn't using it anyway.
This gets rid of the confusing error message in /var/log/messages.

BUG=chromium-os:13694
TEST=Plugged/unplugged a VGA monitor and made sure modes still switched.

...also, built with FEATURES=keepwork and checked this file:
/build/x86-mario/tmp/portage/sys-fs/udev-151-r6/work/udev-151/udev/udev-rules.c

...validated that the unknown key was actually being ignored by udev, so this doesn't change behavior (other than getting rid of the error message).

Review URL: http://codereview.chromium.org/6825017

Change-Id: I20fa098407299b0f0ff5cf06e95089fa0c8a7f5a

3 years agoRefactor monitor_reconfigure to stop using system("xrandr"). 0.12.362.B 0.12.369.B
St├ęphane Marchesin [Fri, 25 Mar 2011 22:22:48 +0000 (15:22 -0700)]
Refactor monitor_reconfigure to stop using system("xrandr").

This removes the blinking on monitor plug/unplug.
This also avoids crashes we get on intel because of vsync bugs.

Change-Id: I04ad539a66ba7db1786a4c5d0d4eb7638e99cdd1

BUG=None.
TEST=Plug in a second screen, check that things display on the external screen. Unplug the screen, check that things come back on the internal lcd.

Review URL: http://codereview.chromium.org/6732013

3 years agoAdd support for monitor hotplug detection. 0.11.241.B 11.1.241.B
Bryan Freed [Wed, 8 Dec 2010 23:21:26 +0000 (15:21 -0800)]
Add support for monitor hotplug detection.

Add a udev rule file and script to run monitor_reconfigure instead
of requiring the user to hit Ctrl-Fullscreen (Ctrl-F4, was Ctrl-Alt-M)
to enter/exit Presentation Mode.

BUG=chromium-os:3107
TEST=Plug in/out external monitor and wait a few seconds of reconfiguration.

Change-Id: I222998d64e4b94cd648085fdd70ad5daad48c7af

Review URL: http://codereview.chromium.org/5637002

3 years agoAvoid a kernel driver / X server crash situation.
Bryan Freed [Thu, 18 Nov 2010 22:11:42 +0000 (14:11 -0800)]
Avoid a kernel driver / X server crash situation.

Change the order of our calls to xrandr to mask a situation that can cause
the GPU to hang, i915 driver to give up, and the X server to crash.  This
crash is not recoverable and requires a reboot.

BUG=chromium-os:6701
TEST=manual: [Un]Plug VGA, then hit Ctrl-F4.  Repeat...

This workaround changes the order of xrandr calls from:

xrandr --output LVDS1 --mode 1280x800
xrandr --output VGA1 --off
xrandr --fb 1280x800

to:

xrandr --output VGA1 --off
xrandr --fb 1280x800
xrandr --output LVDS1 --mode 1280x800

In my experimentation, turning on LVDS later makes a big difference.

But it is not perfect.  I have still seen the failure, but it is much
harder to reproduce.

Change-Id: I300887ef2c65173bafeccd8afdf657f91f71c736

Review URL: http://codereview.chromium.org/5024002

3 years agomonitor_reconfig: Disable LCD when using external monitor.
Daniel Erat [Mon, 11 Oct 2010 17:16:03 +0000 (10:16 -0700)]
monitor_reconfig: Disable LCD when using external monitor.

This makes us disable the internal display when it would
otherwise show just a portion of the total screen.  (This
happens when the external display supports a high enough
resolution that we assume it's a monitor rather than a
projector, and choose to use its maximum resolution.)

BUG=chromium-os:7567
TEST=updated

Review URL: http://codereview.chromium.org/3709001

3 years agomonitor_reconfig: Add script to run for external displays.
Daniel Erat [Sat, 9 Oct 2010 00:45:23 +0000 (17:45 -0700)]
monitor_reconfig: Add script to run for external displays.

This adds a run_monitor_configure script that uses xrandr to
check if there's an external display connected, and then
runs monitor_reconfigure if so.  I plan to make us run this
after starting the X server.

Change-Id: Ia19b5832950e405d9d88295226771d6364846b99

BUG=chromium-os:1743
TEST=ran it

Review URL: http://codereview.chromium.org/3647002

3 years agomonitor_reconfig: Disable external output to avoid error.
Daniel Erat [Fri, 17 Sep 2010 20:11:02 +0000 (13:11 -0700)]
monitor_reconfig: Disable external output to avoid error.

If we're using 1920x1200 on an external output and then
unplug it and try to switch back to 1366x768, xrandr gives
us an error like:

xrandr: specified screen 1366x768 not large enough for
output VGA1 (1920x1200+0+0)

when trying to set the screen size.  I think that this is
harmless, but it's easy enough to disable the external
output first in this case before adjusting the screen size.

Change-Id: I344f5af66657cb935b33d4398ec8a94befcf2ead

BUG=none
TEST=plugged and unplugged VGA and ran monitor_reconfigure a bunch

Review URL: http://codereview.chromium.org/3410019

3 years agomonitor_reconfig: Add missing call to CommandLine::Init().
Daniel Erat [Thu, 16 Sep 2010 21:56:24 +0000 (14:56 -0700)]
monitor_reconfig: Add missing call to CommandLine::Init().

My last change must've pulled in a dependency on
base/command_line.h.

Change-Id: Ife04bf1bd18a490ffa44edf311abb1ab2a7a7f27

BUG=none
TEST=ran it
TBR=bfreed

Review URL: http://codereview.chromium.org/3433013

3 years agomonitor_reconfig: Handle external monitors and add tests.
Daniel Erat [Sat, 11 Sep 2010 01:55:36 +0000 (18:55 -0700)]
monitor_reconfig: Handle external monitors and add tests.

This splits the resolution-choosing logic out into its own
class to make it easier to test.  It also adds some
probably-unreliable heuristics to try to guess when the user
would rather that we just use the external output's maximum
resolution instead of trying to find a resolution that'll
also work on the built-in output.

BUG=chromium-os:2933
TEST=added a bunch

Review URL: http://codereview.chromium.org/3304011

3 years agomonitor_reconfig: Call logging::InitLogging().
Daniel Erat [Sat, 11 Sep 2010 01:41:42 +0000 (18:41 -0700)]
monitor_reconfig: Call logging::InitLogging().

We're just telling it to log to stderr, but this will catch
NDEBUG conflicts between monitor_reconfig and libbase.

Change-Id: I7cd61fc02ad05b64aaafef9e1ee3bd0978bb2d07

BUG=chromium-os:1124
TEST=built it with matching and differing NDEBUG settings

Review URL: http://codereview.chromium.org/3293011

3 years agoAdd LICENSE file
J. Richard Barnette [Thu, 5 Aug 2010 21:13:48 +0000 (14:13 -0700)]
Add LICENSE file

4 years agoUpdate Watchlists
Anush Elangovan [Tue, 8 Jun 2010 08:33:22 +0000 (01:33 -0700)]
Update Watchlists

Change-Id: I0b5ba21f13db67a73761653118a85cec1bfa4235

4 years agoSetup code review inheritance
Anush Elangovan [Sat, 5 Jun 2010 20:12:30 +0000 (13:12 -0700)]
Setup code review inheritance

Change-Id: I804d2c503ea749591e822d2f585f590580b00b82

4 years agomonitor_reconfigure: Try to improve resolution selection.
Daniel Erat [Mon, 19 Apr 2010 20:43:17 +0000 (13:43 -0700)]
monitor_reconfigure: Try to improve resolution selection.

My initial thinking was that this should work as follows:
- find the device with the lowest max resolution
- set the other device to use the nearest resolution that
  it has to the first's (that's >= it)
- set the screen to use the first, smaller device's
  resolution (with black bars taking up the extra space
  on the larger device)

xrandr doesn't appear to let the screen be a lower resolution
than any of the devices, though.  Regardless, I tried this
version with a low-res Eee, a high-res Eee, and an X200, on
both a projector and on a VC device, and it did something
reasonable on all of them, so it seems like it's probably
worth checking it in soon to make Kan happy and then refining
it further. :-)

BUG=chromium-os:1796
TEST=tried it on an X200 and various Eee PCs with a few projectors

Review URL: http://codereview.chromium.org/1646010

4 years agomonitor_reconfigure: Clean up build and style.
Daniel Erat [Thu, 15 Apr 2010 19:09:26 +0000 (12:09 -0700)]
monitor_reconfigure: Clean up build and style.

BUG=none
TEST=built it

Review URL: http://codereview.chromium.org/1619018

4 years agobuild: Delete files from the previous build system.
Daniel Erat [Tue, 6 Apr 2010 21:53:55 +0000 (14:53 -0700)]
build: Delete files from the previous build system.

There are other files in sub-repos that I'll delete
in separate changelists.

BUG=none
TEST=built an image using portage

Review URL: http://codereview.chromium.org/1521015

4 years agoARM build: change monitor_reconfigure Makefile variable defs.
Andrew de los Reyes [Wed, 27 Jan 2010 00:51:08 +0000 (16:51 -0800)]
ARM build: change monitor_reconfigure Makefile variable defs.

This helps us put in our different variables for cross compilation.

Review URL: http://codereview.chromium.org/551164

4 years agoAdd dependency to x11-xserver-utils
Chris Sosa [Mon, 11 Jan 2010 21:25:45 +0000 (13:25 -0800)]
Add dependency to x11-xserver-utils

Review URL: http://codereview.chromium.org/546008

4 years agomonitor_reconfig: Switch to new packaging style
Colin Watson [Sat, 9 Jan 2010 00:10:13 +0000 (00:10 +0000)]
monitor_reconfig: Switch to new packaging style

Use dh(1).
Declare build-dependencies correctly.
Pass toolchain parameters correctly for cross-compilation.

Review URL: http://codereview.chromium.org/523062

4 years agoFix bug that would break script for project type screens that do not report physical...
sosa@google.com [Thu, 29 Oct 2009 00:36:36 +0000 (00:36 +0000)]
Fix bug that would break script for project type screens that do not report physical screen dimensions to X

Review URL: http://chromereview.prom.corp.google.com/1180005

git-svn-id: svn://chrome-svn/chromeos/trunk@116 06c00378-0e64-4dae-be16-12b19f9950a1

4 years agoAdds small monitor reconfigure program that reconfigures a monitor to use the max...
sosa@google.com [Tue, 27 Oct 2009 01:29:07 +0000 (01:29 +0000)]
Adds small monitor reconfigure program that reconfigures a monitor to use the max notebook resolution (and fills rest with black)

Review URL: http://chromereview.prom.corp.google.com/1178020

git-svn-id: svn://chrome-svn/chromeos/trunk@95 06c00378-0e64-4dae-be16-12b19f9950a1