platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luke Jones <luke@ljones.dev>
To: Lukas Wunner <lukas@wunner.de>
Cc: hdegoede@redhat.com, markgross@kernel.org,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] asus-wmi: Support the hardware GPU MUX on some laptops
Date: Mon, 15 Aug 2022 09:44:35 +1200	[thread overview]
Message-ID: <BEKMGR.6HATWYKRRTJQ1@ljones.dev> (raw)
In-Reply-To: <20220814104210.GA22519@wunner.de>



On Sun, Aug 14 2022 at 12:42:10 +0200, Lukas Wunner <lukas@wunner.de> 
wrote:
> On Sun, Aug 14, 2022 at 09:09:43PM +1200, Luke Jones wrote:
>>  On Sat, 2022-08-13 at 12:55 +0200, Lukas Wunner wrote:
>>  > On Sat, Aug 13, 2022 at 09:26:24PM +1200, Luke D. Jones wrote:
>>  > > Support the hardware GPU MUX switch available on some models. 
>> This
>>  > > switch can toggle the MUX between:
>>  > >
>>  > > - 0, Dedicated mode
>>  > > - 1, Optimus mode
>>  > >
>>  > > Optimus mode is the regular iGPU + dGPU available, while 
>> dedicated
>>  > > mode switches the system to have only the dGPU available.
>>  >
>>  > Could you please integrate this with the framework provided by:
>>  >
>>  >   include/linux/vga_switcheroo.h
>>  >   drivers/gpu/vga/vga_switcheroo.c
>>  >
>>  > vga_switcheroo will then automatically expose a sysfs interface.
>> 
>>  I did investigate this first before submitting. The way asus does 
>> it is
>>  not standard at all. On switch you must reboot, and the change isn't
>>  reflected by the ACPI get method until reboot. It's very reflective 
>> of
>>  how they used dgpu_disable to work around windows issues that we do 
>> in
>>  Linux by removing the device from the device tree.
>> 
>>  The key thing is a reboot is required. This is not done on-the-fly. 
>> I
>>  have a two year old GX502 which has the same method as exposed here,
>>  and also a 2022 TUF laptop with same method. My understanding of 
>> this
>>  pariicular method is that it isn't the same one as what Nvidia is
>>  advertising, and ASUS is perhaps misadvertising it - the suspision 
>> is
>>  raised by the fact that my GX502 machine predates what Nvidia is
>>  advertising.
> 
> I see, thanks for the explanation.  You may want to add that
> background information to the commit message if/when respinning.
> Indeed vga_switcheroo facilitates GPU switching at runtime,
> not upon next reboot.
> 
> Thanks,
> 
> Lukas

Good point, yes I will do that after reviews.



  reply	other threads:[~2022-08-14 21:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-13  9:26 [PATCH] asus-wmi: Support the hardware GPU MUX on some laptops Luke D. Jones
2022-08-13 10:55 ` Lukas Wunner
2022-08-14  9:09   ` Luke Jones
2022-08-14 10:42     ` Lukas Wunner
2022-08-14 21:44       ` Luke Jones [this message]
2022-08-16  4:16 ` Mario Limonciello
2022-08-21 23:07   ` Luke Jones
2022-08-22 15:43     ` Limonciello, Mario
2022-08-24 12:40       ` Hans de Goede
2022-08-24 12:53         ` Mario Limonciello
2022-08-24 13:03           ` Hans de Goede
2022-08-24 13:09             ` Mario Limonciello
2022-08-24 13:49               ` Hans de Goede
2022-08-24 13:55                 ` Mario Limonciello
2022-08-28  8:05               ` Luke Jones
2022-08-29 15:03                 ` Limonciello, Mario
2022-08-24 13:51 ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BEKMGR.6HATWYKRRTJQ1@ljones.dev \
    --to=luke@ljones.dev \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).