September 18, 2008

Extremely easy driver installation

We have something really cool in.

How it works, usecase and experience.

The usecase. I have a webcam, but it does not work, because it requires the quickcam-kmp-default package. But I don’t know that.

The webcam

Desktop

You are in your desktop. You can see in the tray the applet telling you that there are security updates to install.

Tray Icon

Now I connect the webcam to the computer:

Webcam connected

Notice the tray icon. It went from “There are security updates available” to a “hardware” icon (we will add a more visible notification too).

Tray Icon

Now you click on the icon and you see:

Install Dialog

You click install, and after 10 seconds quickcam-kmp-default is installed.

See it live

Do you want to see it live?. I did a recording of the process as a flash movie.

Background

Since openSUSE 10.1, ZYpp has the ability to recommend packages based on drivers and other useful system information. Packages can supplement any namespace, which is in turn evaluated at solving time. This allows to automatic select drivers on installation, based on the machine hardware, for example.

You could also plug new hardware, and call

# zypper up

And that would recommend you to install the right drivers.

However this functionality was not used to its own potential. What we really wanted here was to recommend packages when hardware was plugged.

With PackageKit, filling that gap was possible, as we can easily talk to ZYpp from the desktop over dbus, using an abstracted interface.

So in the last weeks, Stefan Haas implemented support for this in our PackageKit ZYpp backend. Thomas Goettlicher added the needed glue in the kupdater applet. That is, listening to added devices events, and calling PackageKit to let ZYpp recommend new hardware.

Yesterday I sat to see it working. Some small one liners prevented it to work, but after some tweaking in the PackageKit backend, it worked really well. Thanks for everyone putting the pieces together.

Comments (14)

  1. September 18, 2008

    [...] Automatic driver installation on openSUSE quote: "The usecase. I have a webcam, but it does not work, because it requires the quickcam-kmp-default package. But I don

  2. September 18, 2008
    TheBlackCat said...

    Wow, this is really nice. It should make installing new drivers much easier.

    I have two questions. First, does this require that the applet use one of the two backends, or will it work with either backend?

    Second, shouldn’t some notification message pop up automatically? I doubt a lot of people would know what the icon means, or necessarily even notice that it has changed, so they will plug in their webcam and wonder why it doesn’t work. Knowledgeable openSUSE users will open Yast, which in my experience automatically downloads the drivers, but new users won’t have any clue what to do. If the whole point is for people to get drivers for their new hardware easily than some clear, obvious, and unambiguous way of telling them that is important. A changed tray icon is neither clear, obvious, nor unambiguous if there is no attention-grabbing text-based notice. In KDE4 at least the new notify applet would be the ideal place to put something like this (as well as a way to display the progress of the resulting driver download and installation as well as other software downloads and updates).

  3. September 18, 2008
    duncan said...

    It is clear from the post (said explicitly) that we are aware that the notification is missing.

  4. September 19, 2008
    TheBlackCat said...

    Somehow I missed that. Sorry.

  5. September 19, 2008

    [...] zypper que estará presente na próxima versão do openSUSE. Este post é uma tradução do blog do Duncan Mac-Vicar, um dos desenvolvedores do [...]

  6. September 19, 2008
    bico said...

    This is very useful. SuSE had a hardware detection/info tray applet in the 9.x series (suseplugger?), but it dissapeared since the newer versions. It was not able to install drivers, but at least it notified the user about new hardware.

  7. September 19, 2008
    dum said...

    nice work.

    Will it also work with ATI and Nvidia drivers after installing OpenSUSE? And what happens when there is no driver available?

  8. September 19, 2008
    duncan said...

    It requires the driver to be in one of the repositories you have in your system when plugging the hardware. So, no, it does not solve the repository case.

  9. September 19, 2008
    Nathan said...

    Enabling OSS, Non-OSS, and update repos is already possible during the installation process. Is it possible for them to be enabled before the hardware check?

    If so, is it possible to have the installation media check the ATI and Nvidia repositories during installation?

    If they could, then maybe the user could be notified 1) that those drivers are available – click to add, 2) those drivers are proprietary, etc.

  10. September 20, 2008
    ryan said...

    That is outstanding! Do you know yet if it will be available in openSUSE 11.1 or 11.2?

  11. September 20, 2008
    duncan said...

    You should be able to see it already in Factory in the following days, that means 11.1 :-)

  12. September 20, 2008

    [...] neat feature of device installation (driver selection) is shown in this blog post from Duncan. Since openSUSE 10.1, ZYpp has the ability to recommend packages based on drivers and [...]

  13. November 8, 2008

    [...] Ekstremalnie łatwa instalacja sterowników [...]

  14. May 7, 2009
    Sławek said...

    “It requires the driver to be in one of the repositories you have in your system when plugging the hardware. So, no, it does not solve the repository case.”

    One Click Install will solve it? Not, really. :-) At repositories can use mirror servers(maybe).

Leave a Reply