Bug 100641

Summary: Broadwell-U HD Graphics 5500. DisplayPort status unknown after suspend/resume
Product: Drivers Reporter: kuddel.mail
Component: Video(DRI - Intel)Assignee: intel-gfx-bugs (intel-gfx-bugs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: felash, intel-gfx-bugs, mzxreary, phatina, tiagomatos
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 4.1.0 Subsystem:
Regression: No Bisected commit-id:

Description kuddel.mail 2015-06-29 10:03:50 UTC
I am using a Thinkpad X1 Carbon 3rd with 
Intel Core i7-5500U CPU with integrated Intel HD Graphics 5500

after suspend and resume the display status of all display ports is unknown.

Output before suspend looks like
/sys/class/drm/card0-DP-1/status:disconnected
/sys/class/drm/card0-DP-2/status:disconnected
/sys/class/drm/card0-eDP-1/status:connected
/sys/class/drm/card0-HDMI-A-1/status:disconnected
/sys/class/drm/card0-HDMI-A-2/status:disconnected

Output after suspend looks like
/sys/class/drm/card0-DP-1/status:unknown
/sys/class/drm/card0-DP-2/status:unknown
/sys/class/drm/card0-eDP-1/status:unknown
/sys/class/drm/card0-HDMI-A-1/status:unknown
/sys/class/drm/card0-HDMI-A-2/status:unknown

As systemd reads this values to interpret correct lid closure behaviour subsequent lid closures do not suspend my machine.
Comment 1 Jani Nikula 2015-06-29 10:15:43 UTC
Thread at http://mid.gmane.org/20150615234500.GA27201@gardel-login
Comment 2 kuddel.mail 2015-06-29 16:46:28 UTC
Thank you
Comment 3 Jani Nikula 2015-07-01 10:41:13 UTC
NOTOURBUG.
Comment 4 Jani Nikula 2015-07-01 10:41:36 UTC
*** Bug 100741 has been marked as a duplicate of this bug. ***
Comment 5 Jani Nikula 2015-07-01 11:16:56 UTC
Related https://bugs.freedesktop.org/show_bug.cgi?id=91137
Comment 6 Lennart Poettering 2015-07-03 16:48:12 UTC
I am pretty sure one instance of this bug should be kept open, as long as the issue is unfixed. Daniel Vetter even prepared a patch to fix it, but I was too lazy to test it:

http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/62584/focus=62733

The kernel change broke userspace there, and Daniel Vetter's patch should be able to fix that, if it works.

Jani, could you reopen the bug.
Comment 7 kuddel.mail 2015-07-04 09:57:02 UTC
I tried the suggested patch and it fixed the issue for me.
Comment 8 Julien Wajsberg 2015-07-05 09:45:01 UTC
This fixes the issue for me as well (Thinkpad Yoga, i7-4500U, HD Graphics 4400).
Comment 9 Julien Wajsberg 2015-07-16 12:47:24 UTC
See the related issue at systemd bugtracker: https://github.com/systemd/systemd/issues/451

A workaround landed in systemd but we believe the root issue should be fixed in the kernel as well. Can someone please reopen and fix this bug? I run my laptop with Daniel Vetter's patch for 2 weeks now and I saw no side-effect.
Comment 10 Rui Matos 2015-07-16 14:14:00 UTC
I've also tried the kernel patch and it also fixes the issue for me.
Comment 11 Jani Nikula 2015-07-27 08:30:46 UTC
(In reply to Lennart Poettering from comment #6)
> I am pretty sure one instance of this bug should be kept open, as long as
> the issue is unfixed. Daniel Vetter even prepared a patch to fix it, but I
> was too lazy to test it:
> 
> http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/62584/
> focus=62733
> 
> The kernel change broke userspace there, and Daniel Vetter's patch should be
> able to fix that, if it works.
> 
> Jani, could you reopen the bug.

For completeness, INVALID -> CODE_FIX

commit 5677d67ae3949f09f57357241b88222d49b8c782
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jul 16 16:47:50 2015 +0200

    drm: Stop resetting connector state to unknown
Comment 12 Peter Hatina 2015-08-03 14:40:38 UTC
Having applied the patch, I still don't have the external monitor activated, when resuming.

My setup:

-ThinkPad T430s; Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])

- Fedora 22
- kernel: 4.1.3 with 5677d67ae3949f09f57357241b88222d49b8c782
- intel gpu driver: xorg-x11-drv-intel-2.99.917-12.20150615.fc22.x86_64

Thanks for any advice.
Comment 13 Peter Hatina 2015-08-10 05:52:30 UTC
(In reply to Peter Hatina from comment #12)
> Having applied the patch, I still don't have the external monitor activated,
> when resuming.
> 
> My setup:
> 
> -ThinkPad T430s; Intel Corporation 3rd Gen Core processor Graphics
> Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
> 
> - Fedora 22
> - kernel: 4.1.3 with 5677d67ae3949f09f57357241b88222d49b8c782
> - intel gpu driver: xorg-x11-drv-intel-2.99.917-12.20150615.fc22.x86_64
> 
> Thanks for any advice.

OK, it seems to be working now... Ignore my comment