linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers:gpu:vga_switcheroo: Work around dramatic power drain
@ 2012-04-28 20:45 Alexander Tarasikov
  2012-04-28 20:45 ` [PATCH] drivers:gpu:vga_switcheroo: Work around dramatic power drain in laptops Alexander Tarasikov
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Tarasikov @ 2012-04-28 20:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: airlied


Hello! Many modern laptops featuring hybrid graphics show a huge raise in
power drain after a suspend/resume cycle which is caused by the discrete
adapter ignoring ACPI-issued power off call after a resume.

This behaviour (increase in power consumption) has been observed on several
machines by many users. This machines include Thinkpad X220, HP Elitebook and
Sony VAIO series, so this may apply to all laptops.

One of the workarounds is to do an ON/OFF cycle via switcheroo from userland
on each resume but this causes confusion in the VGA BIOS which thinks the card
is already ON and that leads to the GPU lockup and system slowdown for a minute
or so. This kind of behaviour is absolutely unacceptable.

I propose this patch as a workaround. It creates a new module parameter
(vga_switcheroo.resume_powercut). When it is set to 1, on resume the driver
will iterate over the list of registered cards and disable all inactive cards
ignoring their power state in switcheroo struct (ON/OFF).

I have tested this on my laptop (which is Sony VAIO SA3S9R with i5, HM67,
HD3000 and Radeon 6630M).
Without this patch, the idle power consumption is 7-9W. After a suspend/resume
cycle that jumps to 15-19W. With the patch, the consumption is always below
10W after numerous suspend/resume cycles.

I agree that the implementation may be far from clean, therefore I have
not enabled the parameter by default. I am welcome to any suggestions on
improving the implementation but I think that it would not hurt to include
it as-is so that users can test it and report their impressions/bugs. Please
review the patch and forward it to downstream projects if you are involved in
any that may be interested (i.e., ubuntu kernel team).

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-03  2:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-28 20:45 [PATCH] drivers:gpu:vga_switcheroo: Work around dramatic power drain Alexander Tarasikov
2012-04-28 20:45 ` [PATCH] drivers:gpu:vga_switcheroo: Work around dramatic power drain in laptops Alexander Tarasikov
2012-04-28 21:10   ` Alan Cox
2012-04-28 22:17     ` Alexander Tarasikov
2012-05-06 17:36       ` Uwe Bonnes
2012-07-03  1:55         ` Valery Pipin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).