Bug 77246 - dual-gpu (vgaswitcheroo) laptop doesn't suspend when lid closed
Summary: dual-gpu (vgaswitcheroo) laptop doesn't suspend when lid closed
Status: RESOLVED NOTOURBUG
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Herrmann
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-09 17:25 UTC by Mirco Tischler
Modified: 2014-06-23 16:41 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mirco Tischler 2014-04-09 17:25:58 UTC
I'm seeing the same symptoms on my laptop as in https://bugs.freedesktop.org/show_bug.cgi?id=76267 : closing the lid doesn't suspend while the suspend button does, but, as I understand, the cause is a different one so new bug. Please mark as duplicate if I was wrong ;)

In the logs I see this (with SYSTEMD_LOG_LEVEL=debug for logind):
systemd-logind[4178]: Lid closed.
systemd-logind[4178]: Ignoring lid switch request, 2 displays connected.

However there is only one (the integrated) display.

The laptop has two gpus using vgaswitcheroo, an intel igp and a radeon dedicated gpu, both are working with the free drivers. And both connectors

/sys/class/drm/card0-LVDS-1/status (the igp, actually in use)

and

/sys/class/drm/card1-LVDS-2/status (the radeon gpu, dynamically powered off)

show "connected", so src/login/logind-core.c:manager_count_displays() returns 2.

Is the kernel supposed to advertise two connectors as connected in this case even though there's only one display? If so, what is a better way to recognize the actual number of displays connected?

Thanks
Mirco
Comment 1 David Herrmann 2014-04-14 01:56:04 UTC
There is no way to figure out that both cards have the same hardware assigned. Therefore, systemd thinks it's two different display-controllers. The kernel people need to provide a proper API for us so we can read such information.

The only API available right now is vga-switcheroo, which is in debugfs and unstable. Hence, we cannot use it.
Comment 2 Lennart Poettering 2014-06-23 16:41:31 UTC
Closing for now. Should be posted against the kernel, so that they add a good API for us. If that exists, please file an RFE bug against systemd so that we make use of it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.