From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Omar_Andr=E9s_Zapata_Mesa?= Subject: Re: properly check for _DSM function support and Optimus support for vga_switcheroo Date: Sun, 18 Dec 2011 23:39:15 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1060521610==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Errors-To: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org To: Lekensteyn Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1060521610== Content-Type: multipart/alternative; boundary=bcaec54ee922def73104b46a8a7a --bcaec54ee922def73104b46a8a7a Content-Type: text/plain; charset=ISO-8859-1 Tested on toshiba m645 optimus intel/nvidia 310m output bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P2.VGA_ [21832.787656] bbswitch: detected an Optimus _DSM function [21832.787664] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on but dont work nvidia video card. do it work with not mux optimus? On Sat, Dec 17, 2011 at 5:50 PM, Lekensteyn wrote: > Hello guys, > > I've prepared a patch based on my findings for the bbswitch module > (https://github.com/Lekensteyn/acpi-stuff/tree/master/bbswitch). This > adds a proper > check whether a _DSM function is supported or not and make OFF / ON for > vga_switcheroo work for nVidia Optimus models. The patch is based against > the > mainline kernel. > > It has been tested on my Clevo B7130 laptop running kernel 3.2 which has a > GT425M > dGPU: > # cat /sys/kernel/debug/vgaswitcheroo/switch > 0:IGD:+:Pwr:0000:00:02.0 > 1:DIS: :Pwr:0000:01:00.0 > # tee /sys/kernel/debug/vgaswitcheroo/switch << OFF > # cat /sys/kernel/debug/vgaswitcheroo/switch > 0:IGD:+:Pwr:0000:00:02.0 > 1:DIS: :Off:0000:01:00.0 > # tee /sys/kernel/debug/vgaswitcheroo/switch << ON > # cat /sys/kernel/debug/vgaswitcheroo/switch > 0:IGD:+:Pwr:0000:00:02.0 > 1:DIS: :Pwr:0000:01:00.0 > > The iGPU/dGPU LEDS on the keyboard also change as a result. > > A second patch to make the device stay off after suspend is in progress. > > Regards, > Peter > > > _______________________________________________ > Nouveau mailing list > Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > http://lists.freedesktop.org/mailman/listinfo/nouveau > > -- Omar Andres Zapata Mesa Fundamental Interaction Phenomenology Gruop (Gfif) Head Developer http://gfif.udea.edu.co Gfif Developers (Gfif Dev) Division of computer science http://gfifdev.udea.edu.co System Engineering Student Universidad de Antioquia At Medellin - Colombia Usuario Linux #490962 --bcaec54ee922def73104b46a8a7a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Tested on toshiba m645 optimus intel/nvidia 310m
output
bbswitch: Fou= nd discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P2.VGA_
[21832.787656]= bbswitch: detected an Optimus _DSM function
[21832.787664] bbswitch: Su= ccesfully loaded. Discrete card 0000:01:00.0 is on
but dont work nvidia video card. =A0do it work with not mux optimus?

On Sat, Dec 17, 2011 at 5:50 PM= , Lekensteyn <lekensteyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello guys,

I've prepared a patch bas= ed on my findings for the bbswitch module
(https://gith= ub.com/Lekensteyn/acpi-stuff/tree/master/bbswitch). This adds a proper<= br> check whether a _DSM function is supported or not and make OFF / ON for
= vga_switcheroo work for nVidia Optimus models. The patch is based against t= he
mainline kernel.

It has been tested on my Clevo B7130 laptop r= unning kernel 3.2 which has a GT425M
dGPU:
# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:0= 0:02.0
1:DIS: :Pwr:0000:01:00.0
# tee /sys/kernel/debug/vgaswitcheroo= /switch <<<OFF
OFF
# cat /sys/kernel/debug/vgaswitcheroo/swi= tch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0
# tee /sys/kernel/d= ebug/vgaswitcheroo/switch <<<ON
ON
# cat /sys/kernel/debug/v= gaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0=

The iGPU/dGPU LEDS on the keyboard also change as a result.

A se= cond patch to make the device stay off after suspend is in progress.
Regards,
Peter


_______________________________________________
Nouveau mailing list
Nouveau@= lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau




--
= Omar Andres Zapata Mesa
Fundamental Inter= action Phenomenology Gruop (Gfif)
Head Developer=A0
Gfif Developers (Gfif Dev)
= Division of computer science=A0
System= Engineering Student
Universidad de Antioquia At Medellin - Colombia
Usuario Linu= x =A0#490962

--bcaec54ee922def73104b46a8a7a-- --===============1060521610== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nouveau mailing list Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org http://lists.freedesktop.org/mailman/listinfo/nouveau --===============1060521610==--