<div dir="ltr">Hello,<br>I am writing to report two issues I'm having with a hybrid graphics laptop.<br>Namely, Sony Vaio SA3S9R with Intel HD3000 and Radeon HD6630M<br><br>First one looks like a regression introduced by the commit named<br>

"gpu/vga_switcheroo: add driver control power feature. (v3)". After I echo<div><font face="arial">the "OFF" command to the switch, the DGPU turns off. However, after that</font></div><div><font face="arial">the vga_switcheroo disappears. Reinserting the radeon module makes</font></div>
<div><font face="arial">the kernel print the stack trace.</font></div><div><font face="arial"><font face="arial"><br></font></font></div><div>I have uploaded the dmesg log to <a href="http://paste.debian.net/38539/">http://paste.debian.net/38539/</a> .<font face="arial"><font face="arial"><br>
</font></font><div><br></div><div>Another issue I would like to bring up is the handling of suspend-resume</div><div>cycle on muxless laptops. On most intel/radeon laptops, the DGPU turns</div><div>on after a resume without an ACPI notification (which sound like a bug).</div>
<div>Switcheroo is still thinking it's off, and it keeps draining</div><div>its extra 10W of power. Now, if we do a "echo OFF", switcheroo does nothing.</div><div>If we do "echo ON", <span style="font-family:arial">it fails and gets stuck for some seconds (because it</span></div>
<div><span style="font-family:arial">tries to power-up a powered-up card messing the initialization routine and</span></div><div><font face="arial">then a GPU hang happens). The hacky solution is to turn it on before suspend</font></div>
<div><font face="arial">and turn it off after via a suspend hook script, but this has several limitations:</font></div><div><font face="arial">1. Most distros don't ship the script by default leaving the inexperienced users</font></div>
<div><font face="arial">with hot laptops</font></div><div><font face="arial">2. Doesn't work well when someone is really using the DGPU</font></div><div><font face="arial">3. I have no idea, but maybe turning it on makes it drain more power in suspend</font></div>
<div><font face="arial">(well, since BIOSes tend to be buggy, who knows what happens next).</font></div><div><br></div><div>My hacky solution was to forcibly turn off the DGPU in the switcheroo driver</div><div>at resume if it was unused, ignoring its state inside the switcheroo struct.</div>
<div>I have already made a proof-of-concept patch back in 2012, but somehow</div><div>that received no attention.</div><div><a href="http://lkml.indiana.edu/hypermail/linux/kernel/1204.3/02530.html">http://lkml.indiana.edu/hypermail/linux/kernel/1204.3/02530.html</a></div>
<div><br></div><div>Since fixing ACPI for every broken laptop or shipping a suspend hook is a no-go,</div><div>we need some kind of a workaround. I don't really know how it should be done,</div><div>via DMI probing or whatever, but I would like someone who has more knowledge</div>
<div>to look into that. Well, I guess, a solution would be to forcibly enable my hack</div><div>for radeon/intel combos and then blacklist the laptops for which it breaks the resume</div><div>cycle via DMI (i.e., I think that since most laptops behave this way, we should</div>
<div>make the powersaving behavior default one).</div><div><br>--<br>Regards, Alexander</div>
</div></div>