[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X6rLUDuG0N98jz18@kroah.com>
Date: Tue, 10 Nov 2020 18:18:08 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: "Limonciello, Mario" <Mario.Limonciello@...l.com>
Cc: Bastien Nocera <hadess@...ess.net>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Linux PM <linux-pm@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
Hans de Goede <hdegoede@...hat.com>
Subject: Re: How to enable auto-suspend by default
On Tue, Nov 10, 2020 at 04:02:33PM +0000, Limonciello, Mario wrote:
> >
> > 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_autosuspen
> > d_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.
> >
>
> I guess what Bastien is getting at is for newer devices supported by class
> drivers rather than having to store an allowlist in udev rules, can we set
> the allowlist in the kernel instead. Then distributions that either don't
> use systemd or don't regularly update udev rules from systemd can take
> advantage of better defaults on modern hardware.
That's what the "hardware ids" database is supposed to be handling.
It's easier to manage this in userspace than in the kernel.
I just love systems where people feel it is safer to update the kernel
than it is to update a hardware database file :)
> The one item that stood out to me in that rules file was 8086:a0ed.
> It's listed as "Volteer XHCI", but that same device ID is actually present
> in an XPS 9310 in front of me as well and used by the xhci-pci kernel module.
That's an Intel PCI device id. If someone else is abusing that number,
I'm sure Intel would want to know about it and would be glad to go after
them.
But note, PCI devices can be behind lots of different types of busses,
so maybe the "can this device autosuspend" differs for them because of
different implementations of where the device is, right?
> Given we're effectively ending up with the combination of runtime PM turned
> on by udev rules, do we need something like this for that ID:
>
> https://github.com/torvalds/linux/commit/6a7c533d4a1854f54901a065d8c672e890400d8a
>
> @Mika Westerberg should 8086:a0ed be quirked like the TCSS xHCI too?
Submit a patch!
thanks,
greg k-h
Powered by blists - more mailing lists