Can not toggle Display to External only mode

Bug #791752 reported by David Chen
40
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-desktop3 (Ubuntu)
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
Oneiric
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Medium
Keng-Yu Lin
Natty
Won't Fix
Medium
Keng-Yu Lin
Oneiric
Fix Released
Medium
Keng-Yu Lin

Bug Description

Image: Ubuntu 11.04 i386/amd64
Kernel version: 2.6.38-8-generic
CPU: i5-2410M
GPU: UMA

Summary: Can not set dual display to "External only" mode on Intel Sandy bridge systems
Steps to reproduce:
1) Use hotkey/Monitor preferences to toggle display
2) Set to "External only mode"

Expected result:
Should have External display set as primary display

Actual result:
Cannot set External display set as primary

two scenarios:
1) In unity 3D, setting external only will cause compiz crash
2) In unity 2D, setting external only will cause screen blinking

Additional info:
use "xrandr" to switch display does not have this problem

David Chen (david.chen)
Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: hwe-blocker
Chris Van Hoof (vanhoof)
Changed in linux (Ubuntu):
importance: Undecided → High
assignee: nobody → Keng-Yü Lin (lexical)
Revision history for this message
Alberto Milone (albertomilone) wrote :

I think the problem is that g-s-d assigns the first of the possible_crtcs without checking whether this crtc is already in use.

I guess g-s-d is assigning crtc 0 to VGA before unassigning it from LVDS. An additional check when assigning crtc would have made g-s-d assign crtc 1 instead.

Note: outputs can share the same crtc in clone mode

Revision history for this message
Keng-Yu Lin (lexical) wrote :

I tested 2.6.39-rc3 and 3.0.0-rc2 kernel debs from mainline ppa (http://kernel.ubuntu.com/~kernel-ppa/mainline/) on a Dell SandyBridge laptop and a Lenovo i3-2310M laptop, both kernels work well when there is only one video output, eight LVDS or VGA (which means external-only mode and LCD-only work good).

But in the dual-head modes, either extend or mirror, sometimes but not always one output in that mode (either LVDS or VGA) will be lost.

I performed several cycles, but seems the output is lost randomly.

Robert Hooker (sarvatt)
affects: linux (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Bryce Harrington (bryce) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

(ignore the second link... just a mis-paste)

Revision history for this message
Keng-Yu Lin (lexical) wrote :

Robert tried to apply the patch in the xserver-xorg-video-intel debian package: https://launchpad.net/~sarvatt/+archive/yellow.

But it causes build-fail in PPA above.

I modified and re-applied the patch (120_lvds-first_2.patch) and put in my PPA;

https://launchpad.net/~lexical/+archive/drm/

It builds.

But when it boots, the screen goes blank (should show gdm login window) after the Ubuntu logo (plymouth on framebuffer I suppose).

bugbot (bugbot)
tags: added: resolution
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Some bisecting jobs are done, it seems the following commit fixed the external mode issue.

commit 47a05eca72991039e788b25232061f9c9df9ec23
Author: Jesse Barnes <email address hidden>
Date: Mon Feb 7 13:46:40 2011 -0800

    drm/i915: disable PCH ports if needed when disabling a CRTC

    Disable any PCH ports associated with a pipe when disabling it. This
    should prevent transcoder disable failures due to ports still being on.

    Signed-off-by: Jesse Barnes <email address hidden>
    [ickle: introduce *_PIPE_ENABLED() macro]
    Signed-off-by: Chris Wilson <email address hidden>

I put the kernel packages at http://people.canonical.com/~lexical/bugs/lp791752/ for anyone to test.

Keng-Yu Lin (lexical)
affects: xserver-xorg-video-intel (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Also confirmed the bug occurs on the Lenovo Zhaoyang E47 laptop with CPU
  Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz stepping 07

Revision history for this message
David Chen (david.chen) wrote :

Tested the kernel Kengyu provided, "External only mode" can be toggled by pressing hotkey or Monitor Preferences. There are still some minor issues that some display modes are missing after more toggle actions are performed.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

I think the test result of #8 is much similar to my test of 3.0.0-rc2 kernel and is not fixed upstream yet.

Changed in gnome-desktop (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Keng-Yu Lin (lexical) wrote :

It is found that assigning the crtc to "1" by xrandr command can make VGA output work, e.g.:

  `xrandr -d :0.0 --output VGA1 --auto --preferred --crtc 1`

marked the bug as affecting the gnome-desktop source package for investigating if this is something to add in gnome-rr-* functions.

Changed in linux (Ubuntu):
importance: High → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

affects: gnome-desktop (Ubuntu) → gnome-desktop3 (Ubuntu)
Revision history for this message
Keng-Yu Lin (lexical) wrote :

video filmed reproducing the bug.

Revision history for this message
Keng-Yu Lin (lexical) wrote :

sent to Ubuntu Kernel ML for SRU review:

SRU Justification

Impact: Not uable to switch to the externel output-only (e.g. VGA or HDMI) mode.
It causes flickering on the externally attached monitor. This bug is common on
many SandyBridge-based laptops.

Fix: Upstream patch to disable PCH ports if needed when disabling a CRTC.

Test case: I tested on Lenovo Zhaoyang E47 and two Dell SandyBridge-based laptops.

BugLink: http://bugs.launchpad.net/bugs/791752

This backport patch is not in 2.6.38.y because of its end-of-life.
For the reference, the patch helps LP#745112 too, though not perfectly.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Natty):
assignee: nobody → Keng-Yü Lin (lexical)
status: New → Fix Committed
Changed in linux (Ubuntu Oneiric):
status: In Progress → Fix Released
Changed in gnome-desktop3 (Ubuntu Natty):
status: New → Invalid
Changed in gnome-desktop3 (Ubuntu Oneiric):
status: Confirmed → Invalid
Chris Van Hoof (vanhoof)
Changed in gnome-desktop3 (Ubuntu Oneiric):
importance: Medium → Undecided
Changed in linux (Ubuntu Natty):
importance: Undecided → Medium
Revision history for this message
Keng-Yu Lin (lexical) wrote :
Revision history for this message
Herton R. Krzesinski (herton) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-natty' to 'verification-done-natty'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-natty
Revision history for this message
Keng-Yu Lin (lexical) wrote :

Lenovo Zhaoyang E47 with the SandyBridge-base i3-2310M CPU has the same issue too.

I confirmed that the 2.6.38-11 -proposed kernel fixes the bug on this hardware.

tags: added: verification-done
removed: verification-needed-natty
tags: added: verification-done-natty
removed: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (13.4 KiB)

This bug was fixed in the package linux - 2.6.38-11.48

---------------
linux (2.6.38-11.48) natty-proposed; urgency=low

  [Herton R. Krzesinski]

  * Release Tracking Bug
    - LP: #818175

  [ Upstream Kernel Changes ]

  * Revert "HID: magicmouse: ignore 'ivalid report id' while switching
    modes"
    - LP: #814250

linux (2.6.38-11.47) natty-proposed; urgency=low

  [Steve Conklin]

  * Release Tracking Bug
    - LP: #811180

  [ Keng-Yu Lin ]

  * SAUCE: Revert: "dell-laptop: Toggle the unsupported hardware
    killswitch"
    - LP: #775281

  [ Ming Lei ]

  * SAUCE: fix yama_ptracer_del lockdep warning
    - LP: #791019

  [ Stefan Bader ]

  * SAUCE: Re-enable RODATA for i386 virtual
    - LP: #809838

  [ Tim Gardner ]

  * [Config] Add grub-efi as a recommended bootloader for server and
    generic
    - LP: #800910
  * SAUCE: rtl8192se: Force a build for a 2.6/3.0 kernel
    - LP: #805494

  [ Upstream Kernel Changes ]

  * Revert "bridge: Forward reserved group addresses if !STP"
    - LP: #793702
  * Fix up ABI directory
  * bonding: Incorrect TX queue offset, CVE-2011-1581
    - LP: #792312
    - CVE-2011-1581
  * fs/partitions/efi.c: corrupted GUID partition tables can cause kernel
    oops
    - LP: #795418
    - CVE-2011-1577
  * usbnet/cdc_ncm: add missing .reset_resume hook
    - LP: #793892
  * ath5k: Disable fast channel switching by default
    - LP: #767192
  * mm: vmscan: correctly check if reclaimer should schedule during
    shrink_slab
    - LP: #755066
  * mm: vmscan: correct use of pgdat_balanced in sleeping_prematurely
    - LP: #755066
  * ALSA: hda - Use LPIB for ATI/AMD chipsets as default
    - LP: #741825
  * ALSA: hda - Enable snoop bit for AMD controllers
    - LP: #741825
  * ALSA: hda - Enable sync_write workaround for AMD generically
    - LP: #741825
  * cpuidle: menu: fixed wrapping timers at 4.294 seconds
    - LP: #774947
  * drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.
    - LP: #761065
  * USB: ehci: remove structure packing from ehci_def
    - LP: #791552
  * drm/i915: disable PCH ports if needed when disabling a CRTC
    - LP: #791752
  * kmemleak: Do not return a pointer to an object that kmemleak did not
    get
    - LP: #793702
  * kmemleak: Initialise kmemleak after debug_objects_mem_init()
    - LP: #793702
  * Fix _OSC UUID in pcc-cpufreq
    - LP: #793702
  * CPU hotplug, re-create sysfs directory and symlinks
    - LP: #793702
  * Fix memory leak in cpufreq_stat
    - LP: #793702
  * net: recvmmsg: Strip MSG_WAITFORONE when calling recvmsg
    - LP: #793702
  * ftrace: Only update the function code on write to filter files
    - LP: #793702
  * qla2xxx: Fix hang during driver unload when vport is active.
    - LP: #793702
  * qla2xxx: Fix virtual port failing to login after chip reset.
    - LP: #793702
  * qla2xxx: Fix vport delete hang when logins are outstanding.
    - LP: #793702
  * powerpc/kdump64: Don't reference freed memory as pacas
    - LP: #793702
  * powerpc/kexec: Fix memory corruption from unallocated slaves
    - LP: #793702
  * x86, cpufeature: Fix cpuid leaf 7 feature detection
    - LP: #793702
  * ath9k_hw: do noise floor calibration only on required chain...

Changed in linux (Ubuntu Natty):
status: Fix Committed → Fix Released
Robert Hooker (sarvatt)
Changed in linux (Ubuntu Natty):
status: Fix Released → Triaged
tags: added: regression-update
removed: resolution verification-done-natty
Chris Van Hoof (vanhoof)
Changed in linux (Ubuntu Natty):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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