[Intel-gfx] drm i915 weirdness with /sys/class/drm/card0*/status

Lennart Poettering lennart at poettering.net
Mon Jun 15 16:45:00 PDT 2015


heya,

I am experiencing something weird with the i915 driver in kernel
4.1.0-0.rc8 (precisely 4.1.0-0.rc8.git0.1.fc23.x86_64 from fedora
rawhide):

On my laptop, when I type this:
   
        grep . /sys/class/drm/card0*/status

I usually get this:

        /sys/class/drm/card0-DP-1/status:disconnected
        /sys/class/drm/card0-HDMI-A-1/status:disconnected
        /sys/class/drm/card0-LVDS-1/status:connected
        /sys/class/drm/card0-VGA-1/status:disconnected

WHich is fine and looks correct, but sometimes I instead get this:

        /sys/class/drm/card0-DP-1/status:unknown
        /sys/class/drm/card0-HDMI-A-1/status:unknown
        /sys/class/drm/card0-LVDS-1/status:connected
        /sys/class/drm/card0-VGA-1/status:unknown

i.e. the status of the unconnected GPU outputs changes from
disconnected to unknown. It's not really clear to me when this
happens, but it appears to be reproducible after the machine comes
back from suspend.

This actually has a weird effect, as systemd-logind nowadays will
inhibit suspend on lid close when an external screen is plugged in,
and it checks that with these files, counting DRM card outputs with a
state != disconnected. With the issue described above it will then
suddenly count 4 instead of just one screen and hence the lid switch
will be without effect. Which is kinda annoying, of course...

lspci info for the card is:

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])
          Subsystem: Lenovo Device 3977

xorg.log says:

[  9567.487] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4000

This didn't use to be an issue with older kernel versions, such as
various 4.0 kernels. Not sure though since when it is really borked.

This appears to be something to fix in the kernel drivers, but I am
also wondering if I should reconsider the display counting code I
added to logind, which currently counts all displays with a state !=
disconnected. Should that be different, for example count displays
with state == connected only?

Lennart



More information about the Intel-gfx mailing list