Laptops with eDP panels do not suspend when lid closed

Bug #933710 reported by Seth Forshee
26
This bug affects 7 people
Affects Status Importance Assigned to Milestone
gnome-desktop
Fix Released
Medium
gnome-desktop3 (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned
xserver-xorg-video-intel (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Unassigned

Bug Description

Recently this machine stopped suspending when the lid is closed. It suspends just fine from the menu, but when the lid is closed the backlight turns off for a few seconds then comes back on, but the machine never suspends. I can't find any indication in the logs that anything even attempted to initiate a suspend. Often after opening the lid the desktop has become completely unresponsive.

I'm not sure that this is a bug in gnome-settings-daemon, but I've traced it up the stack far enough to know that the events are coming out of the kernel and that upower is detecting the lid status changes and sending out events on dbus.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-settings-daemon 3.3.5-0ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-16.25-generic 3.2.6
Uname: Linux 3.2.0-16-generic x86_64
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
Date: Thu Feb 16 12:03:27 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64+mac (20111208)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-settings-daemon
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Seth Forshee (sforshee) wrote :
Revision history for this message
Seth Forshee (sforshee) wrote :

I determined that gsd is opting not to suspend the machine because it thinks an external display is connected. This is not the case, and the i915 driver is showing that only the eDP connector (i.e. the internal display connector) is connected. So it seems that there's some problem with the logic being used to determine whether or not a given output is the built-in panel.

Revision history for this message
Seth Forshee (sforshee) wrote :

Okay, it turns out the problem is in gnome_rr_output_is_laptop(), so I'm changing this over to libgnome-desktop-3-2. This function needs to check for outputs starting with eDP if it's going to work correctly for this machine.

affects: gnome-settings-daemon (Ubuntu) → gnome-desktop3 (Ubuntu)
Revision history for this message
Seth Forshee (sforshee) wrote :

Attaching a patch that gets this machine suspending when the lid is closed.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "03_eDP_is_laptop_panel.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Tim Gardner (timg-tpi)
Changed in gnome-desktop3 (Ubuntu Precise):
milestone: none → ubuntu-12.04-beta-1
assignee: nobody → Ubuntu Desktop (ubuntu-desktop)
status: New → Confirmed
importance: Undecided → Critical
Seth Forshee (sforshee)
summary: - MacBook Air 4,1 does not suspend when lid closed
+ Laptops with eDP panels do not suspend when lid closed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in gnome-desktop3 (Ubuntu Precise):
assignee: Ubuntu Desktop (ubuntu-desktop) → nobody
importance: Critical → High
Revision history for this message
Seth Forshee (sforshee) wrote :

I added the upstream bug watch. However I'm not in agreement with the reclassification of this as high. This bug means that someone could close their laptop lid and think the machine is suspended when it isn't, which can have severe consequences. It's also a regression due to the recent changes in g-s-d.

I'm also adding xserver-xorg-video-intel to the bug, as I'm beginning to think the root cause of the issue may lie here. libgnome-desktop first queries with RandR to see whether or not the output drives a laptop panel, and obviously this is failing to report the status correctly. I see that there's some code in intel_display.c that's commented out to treat eDP similarly to LVDS, due to a bug [1] that marked as being fixed. It's a guess, but maybe this is why RandR fails to recognize the eDP output as driving a laptop panel?

[1] https://bugs.freedesktop.org/show_bug.cgi?id=38012

Changed in xserver-xorg-video-intel (Ubuntu Precise):
importance: Undecided → Critical
status: New → Confirmed
Changed in gnome-desktop:
importance: Unknown → Medium
status: Unknown → New
Seth Forshee (sforshee)
Changed in xserver-xorg-video-intel (Ubuntu Precise):
milestone: none → ubuntu-12.04-beta-1
Changed in gnome-desktop:
status: New → Confirmed
Revision history for this message
Seth Forshee (sforshee) wrote :

Upon further inquiry I've found out that the ConnectorType property that gnome_rr_output_is_laptop() just isn't implemented for most of the video drivers in X, and it isn't likely to be fixed in the near future.

So for precise something along the lines of the patch I've attached is going to be required. Federico Mena-Quintero commented on the upstream bug report that the patch makes sense. Is that enough to move forward with it? This really ought to be fixed for precise, or else the code in g-s-d that using this function to leave the machine running when the lid is closed ought to be removed.

Seth Forshee (sforshee)
Changed in xserver-xorg-video-intel (Ubuntu Precise):
importance: Critical → Medium
milestone: ubuntu-12.04-beta-1 → none
bugbot (bugbot)
tags: added: resume
Revision history for this message
Seth Forshee (sforshee) wrote :
Changed in gnome-desktop:
status: Confirmed → Fix Released
Changed in gnome-desktop3 (Ubuntu Precise):
status: Confirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I've uploaded that fix, it's in the unapproved queue due to beta freeze though

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-desktop3 - 3.3.90-0ubuntu2

---------------
gnome-desktop3 (3.3.90-0ubuntu2) precise; urgency=low

  * debian/control.in:
    - drop the scrollkeeper build-depends, it's not needed
  * debian/patches/git_edp_output.patch: "Laptops with eDP panels do not
    suspend when lid closed", thanks Seth Forshee (lp: #933710)
 -- Sebastien Bacher <email address hidden> Mon, 27 Feb 2012 11:52:12 +0100

Changed in gnome-desktop3 (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Eugene San (eugenesan) wrote :

Confirming working solution.
Tested on MBA4.1

Thanks.

Changed in xserver-xorg-video-intel (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
kimus (kimus) wrote :

I have the same problem in a MacBookPro5,5 with nvidia and I have installed gnome-desktop3-data 3.3.91-ubuntu2 (not sure why I don't have gnome-desktop3 package). When I open the laptop ther's an error "could not set configuration for crtc NNN" (where N is a number).

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.