linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Bastien Nocera <hadess@hadess.net>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	linux-usb@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Hans de Goede <hdegoede@redhat.com>,
	Mario Limonciello <mario.limonciello@dell.com>
Subject: Re: How to enable auto-suspend by default
Date: Tue, 10 Nov 2020 12:34:17 +0100	[thread overview]
Message-ID: <X6p6ubTOoMPUPPXi@kroah.com> (raw)
In-Reply-To: <fe8ab4cab3740afd261fa902f14ecae002a1122d.camel@hadess.net>

On Tue, Nov 10, 2020 at 11:57:07AM +0100, Bastien Nocera wrote:
> Hey,
> 
> systemd has been shipping this script to enable auto-suspend on a
> number of USB and PCI devices:
> https://github.com/systemd/systemd/blob/master/tools/chromiumos/gen_autosuspend_rules.py
> 
> The problem here is twofold. First, the list of devices is updated from
> ChromeOS, and the original list obviously won't be updated by ChromeOS
> developers unless a device listed exists in a ChromeBook computer,
> which means a number of devices that do support autosuspend aren't
> listed.
> 
> The other problem is that this list needs to exist at all, and that it
> doesn't seem possible for device driver developers (at various levels
> of the stack) to opt-in to auto-suspend when all the variants of the
> device (or at least detectable ones) support auto-suspend.

A driver can say they support autosuspend today, but I think you are
concerned about the devices that are controlled by class-compliant
drivers, right?  And for those, no, we can't do this in the kernel as
there are just too many broken devices out there.

As proof of this, look at other operating systems.  They had to
implement the same type of "allowed devices" list that we do.  In fact,
we did this for Linux because they did this, which means that when
hardware manufacturers test their device, they only test with other
operating systems and not Linux and so, we need to match what those
other OSes do as well.

Sorry,

greg k-h

  reply	other threads:[~2020-11-10 11:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 10:57 How to enable auto-suspend by default Bastien Nocera
2020-11-10 11:34 ` Greg KH [this message]
2020-11-10 16:02   ` Limonciello, Mario
2020-11-10 17:18     ` Greg KH
2020-11-10 17:45       ` Limonciello, Mario
2020-11-10 18:00         ` Greg KH
2020-11-10 18:08           ` Limonciello, Mario
2020-11-10 19:55             ` Theodore Y. Ts'o
2020-11-10 20:45               ` Limonciello, Mario
2020-11-10 17:25     ` Mika Westerberg
2020-11-11 11:27       ` Hans de Goede
2020-11-11 14:31         ` Mika Westerberg
2020-11-23 13:54           ` Hans de Goede
2020-11-23 14:01             ` Mika Westerberg
2020-11-24 12:37             ` Mathias Nyman
2020-11-24 12:38               ` Hans de Goede
2020-11-24 15:53               ` Bastien Nocera
2020-11-11 16:03         ` Limonciello, Mario
2020-11-11 16:32           ` Greg KH
2020-11-24 16:02             ` Bastien Nocera
2020-11-24 16:35               ` Greg KH

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=X6p6ubTOoMPUPPXi@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@dell.com \
    /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).