Installing drivers, need new DeviceKit method

David Zeuthen david at fubar.dk
Fri Dec 12 07:44:16 PST 2008


On Fri, 2008-12-12 at 16:28 +0100, Patryk Zawadzki wrote:
> On Fri, Dec 12, 2008 at 2:00 PM, Richard Hughes <hughsient at gmail.com> wrote:
> > Jon wants to automatically download drivers for his soundcard. The way I
> > envisage this happening is:
> >
> > 1. UDEV rule merges in PK_NEEDED_PACKAGE='alsa-firmware'
> > 2. gnome-packagekit/kpackagekit watches DeviceKit for this key to appear
> > 3. session triggers install if it's not already installed
> 
> Wouldn't it be more useful to handle it the same way we handle
> gstreamer deps? I mean automated rpm/apt provides for modules/firmware
> and matching unknown devices by device ids.

Maybe. Here's how I would do it. I'd write a component Foo that starts
with the desktop session. It would

 - Enumerate all PCI and USB devices

 - Consider those devices without driver / firmware

 - Extract the vendor/product id (and for PCI subvendor/subproduct)
   for these devices

 - Check if the user has decided to ignore a device

 - Call into PackageKit asking to find drivers and/or firmware with
   these Id's. Show a notification icon (or maybe a whole dialog
   saying "Searching for drivers" while PackageKit is churning)

 - For cases where we can find drivers/firmware, ask the user if
   he wants to install it. Give the user an option to not install
   the driver (he may not want to install it for various reasons)

 - For cases where we can't find drivers/firmware give an option
   to ignore this device in the future.

   - Also need a way to clear that list

One important thing here is that Foo should never ever call into
PackageKit for the cases where

 - we already have drivers / firmware
 - the user has toggled "ignore this device"

The main reason for this is that we really don't want PackageKit to even
start for the usual case; we really don't want to start the whole
depsolving machinery on every login as it completely (as least with Yum)
trashes the first few minutes of your login experience. And it uses a
lot of battery too.

(The usual case is where people set up their system to only check for
updates once a day or once a week. I think there's currently still a bug
in the PackageKit-gnome stuff where it starts PackageKit and yum and
does this. But that's a bug I think.)

The component, Foo, should probably be a gnome-settings-daemon plug-in
or something. Or part of PackageKit-gnome.

    David




More information about the devkit-devel mailing list