1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" dir=
"ltr">
5 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen
</title>
7 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel=
"alternate" title=
"RSS Feed" href=
"http://people.skolelinux.org/pere/blog/index.rss" type=
"application/rss+xml" />
14 <a href=
"http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen
</a>
23 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Bitcoin_GUI_now_available_from_Debian_unstable__and_Ubuntu_raring_.html">Bitcoin GUI now available from Debian/unstable (and Ubuntu/raring)
</a></div>
24 <div class=
"date"> 2nd February
2013</div>
25 <div class=
"body"><p>My
26 <a href=
"http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html">last
27 bitcoin related blog post
</a> mentioned that the new
28 <a href=
"http://packages.qa.debian.org/bitcoin">bitcoin package
</a> for
29 Debian was waiting in NEW. It was accepted by the Debian ftp-masters
30 2013-
01-
19, and have been available in unstable since then. It was
31 automatically copied to Ubuntu, and is available in their Raring
34 <p>But there is a strange problem with the build that block this new
35 version from being available on the i386 and kfreebsd-i386
36 architectures. For some strange reason, the autobuilders in Debian
37 for these architectures fail to run the test suite on these
38 architectures (
<a href=
"http://bugs.debian.org/672524">BTS #
672524</a>).
39 We are so far unable to reproduce it when building it manually, and
40 no-one have been able to propose a fix. If you got an idea what is
41 failing, please let us know via the BTS.
</p>
43 <p>One feature that is annoying me with of the bitcoin client, because
44 I often run low on disk space, is the fact that the client will exit
45 if it run short on space (
<a href=
"http://bugs.debian.org/696715">BTS
46 #
696715</a>). So make sure you have enough disk space when you run
49 <p>As usual, if you use bitcoin and want to show your support of my
50 activities, please send Bitcoin donations to my address
51 <b><a href=
"bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a></b>.
</p>
56 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
61 <div class=
"padding"></div>
64 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html">Welcome to the world, Isenkram!
</a></div>
65 <div class=
"date">22nd January
2013</div>
66 <div class=
"body"><p>Yesterday, I
67 <a href=
"http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html">asked
68 for testers
</a> for my prototype for making Debian better at handling
69 pluggable hardware devices, which I
70 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">set
71 out to create
</a> earlier this month. Several valuable testers showed
72 up, and caused me to really want to to open up the development to more
73 people. But before I did this, I want to come up with a sensible name
74 for this project. Today I finally decided on a new name, and I have
75 renamed the project from hw-support-handler to this new name. In the
76 process, I moved the source to git and made it available as a
77 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/isenkram.git">collab-maint
</a>
78 repository in Debian. The new name? It is
<strong>Isenkram
</strong>.
79 To fetch and build the latest version of the source, use
</p>
82 git clone http://anonscm.debian.org/git/collab-maint/isenkram.git
83 cd isenkram && git-buildpackage -us -uc
86 <p>I have not yet adjusted all files to use the new name yet. If you
87 want to hack on the source or improve the package, please go ahead.
88 But please talk to me first on IRC or via email before you do major
89 changes, to make sure we do not step on each others toes. :)
</p>
91 <p>If you wonder what 'isenkram' is, it is a Norwegian word for iron
92 stuff, typically meaning tools, nails, screws, etc. Typical hardware
93 stuff, in other words. I've been told it is the Norwegian variant of
94 the German word eisenkram, for those that are familiar with that
97 <p><strong>Update
2013-
01-
26</strong>: Added -us -us to build
98 instructions, to avoid confusing people with an error from the signing
101 <p><strong>Update
2013-
01-
27</strong>: Switch to HTTP URL for the git
102 clone argument to avoid the need for authentication.
</p>
107 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram
</a>.
112 <div class=
"padding"></div>
115 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/First_prototype_ready_making_hardware_easier_to_use_in_Debian.html">First prototype ready making hardware easier to use in Debian
</a></div>
116 <div class=
"date">21st January
2013</div>
117 <div class=
"body"><p>Early this month I set out to try to
118 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">improve
119 the Debian support for pluggable hardware devices
</a>. Now my
120 prototype is working, and it is ready for a larger audience. To test
122 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">source
123 from the Debian Edu subversion repository
</a>, build and install the
124 package. You might have to log out and in again activate the
125 autostart script.
</p>
127 <p>The design is simple:
</p>
131 <li>Add desktop entry in /usr/share/autostart/ causing a program
132 hw-support-handlerd to start when the user log in.
</li>
134 <li>This program listen for kernel events about new hardware (directly
135 from the kernel like udev does), not using HAL dbus events as I
138 <li>When new hardware is inserted, look up the hardware modalias in
139 the APT database, a database
140 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=markup">available
141 via HTTP
</a> and a database available as part of the package.
</li>
143 <li>If a package is mapped to the hardware in question, the package
144 isn't installed yet and this is the first time the hardware was
145 plugged in, show a desktop notification suggesting to install the
146 package or packages.
</li>
148 <li>If the user click on the 'install package now' button, ask
149 aptdaemon via the PackageKit API to install the requrired package.
</li>
151 <li>aptdaemon ask for root password or sudo password, and install the
152 package while showing progress information in a window.
</li>
156 <p>I still need to come up with a better name for the system. Here
157 are some screen shots showing the prototype in action. First the
158 notification, then the password request, and finally the request to
159 approve all the dependencies. Sorry for the Norwegian Bokmål GUI.
</p>
161 <p><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-1-notification.png">
162 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-2-password.png">
163 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-3-dependencies.png">
164 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-4-installing.png">
165 <br><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-21-hw-support-5-installing-details.png" width=
"70%"></p>
167 <p>The prototype still need to be improved with longer timeouts, but
168 is already useful. The database of hardware to package mappings also
169 need more work. It is currently compatible with the Ubuntu way of
170 storing such information in the package control file, but could be
171 changed to use other formats instead or in addition to the current
172 method. I've dropped the use of discover for this mapping, as the
173 modalias approach is more flexible and easier to use on Linux as long
174 as the Linux kernel expose its modalias strings directly.
</p>
176 <p><strong>Update
2013-
01-
21 16:
50</strong>: Due to popular demand,
177 here is the command required to check out and build the source: Use
179 svn://svn.debian.org/debian-edu/trunk/src/hw-support-handler/; cd
180 hw-support-handler; debuild
</tt>'. If you lack debuild, install the
181 devscripts package.
</p>
183 <p><strong>Update
2013-
01-
23 12:
00</strong>: The project is now
184 renamed to Isenkram and the source moved from the Debian Edu
185 subversion repository to a Debian collab-maint git repository. See
186 <a href=
"http://people.skolelinux.org/pere/blog/Welcome_to_the_world__Isenkram_.html">build
187 instructions
</a> for details.
</p>
192 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram
</a>.
197 <div class=
"padding"></div>
200 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Thank_you_Thinkpad_X41__for_your_long_and_trustworthy_service.html">Thank you Thinkpad X41, for your long and trustworthy service
</a></div>
201 <div class=
"date">19th January
2013</div>
202 <div class=
"body"><p>This Christmas my trusty old laptop died. It died quietly and
203 suddenly in bed. With a quiet whimper, it went completely quiet and
204 black. The power button was no longer able to turn it on. It was a
205 IBM Thinkpad X41, and the best laptop I ever had. Better than both
206 Thinkpads X30, X31, X40, X60, X61 and X61S. Far better than the
207 Compaq I had before that. Now I need to find a replacement. To keep
208 going during Christmas, I moved the one year old SSD disk to my old
209 X40 where it fitted (only one I had left that could use it), but it is
210 not a durable solution.
212 <p>My laptop needs are fairly modest. This is my wishlist from when I
213 got a new one more than
10 years ago. It still holds true.:)
</p>
217 <li>Lightweight (around
1 kg) and small volume (preferably smaller
219 <li>Robust, it will be in my backpack every day.
</li>
220 <li>Three button mouse and a mouse pin instead of touch pad.
</li>
221 <li>Long battery life time. Preferable a week.
</li>
222 <li>Internal WIFI network card.
</li>
223 <li>Internal Twisted Pair network card.
</li>
224 <li>Some USB slots (
2-
3 is plenty)
</li>
225 <li>Good keyboard - similar to the Thinkpad.
</li>
226 <li>Video resolution at least
1024x768, with size around
12" (A4 paper
228 <li>Hardware supported by Debian Stable, ie the default kernel and
230 <li>Quiet, preferably fan free (or at least not using the fan most of
235 <p>You will notice that there are no RAM and CPU requirements in the
236 list. The reason is simply that the specifications on laptops the
237 last
10-
15 years have been sufficient for my needs, and I have to look
238 at other features to choose my laptop. But are there still made as
239 robust laptops as my X41? The Thinkpad X60/X61 proved to be less
240 robust, and Thinkpads seem to be heading in the wrong direction since
241 Lenovo took over. But I've been told that X220 and X1 Carbon might
244 <p>Perhaps I should rethink my needs, and look for a pad with an
245 external keyboard? I'll have to check the
246 <a href=
"http://www.linux-laptop.net/">Linux Laptops site
</a> for
247 well-supported laptops, or perhaps just buy one preinstalled from one
248 of the vendors listed on the
<a href=
"http://linuxpreloaded.com/">Linux
249 Pre-loaded site
</a>.
</p>
254 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
259 <div class=
"padding"></div>
262 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/How_to_find_a_browser_plugin_supporting_a_given_MIME_type.html">How to find a browser plugin supporting a given MIME type
</a></div>
263 <div class=
"date">18th January
2013</div>
264 <div class=
"body"><p>Some times I try to figure out which Iceweasel browser plugin to
265 install to get support for a given MIME type. Thanks to
266 <a href=
"https://wiki.ubuntu.com/MozillaTeam/Plugins">specifications
267 done by Ubuntu
</a> and Mozilla, it is possible to do this in Debian.
268 Unfortunately, not very many packages provide the needed meta
269 information, Anyway, here is a small script to look up all browser
270 plugin packages announcing ther MIME support using this specification:
</p>
276 def pkgs_handling_mimetype(mimetype):
281 version = pkg.candidate
283 version = pkg.installed
286 record = version.record
287 if not record.has_key('Npp-MimeType'):
289 mime_types = record['Npp-MimeType'].split(',')
291 t = t.rstrip().strip()
293 thepkgs.append(pkg.name)
295 mimetype = "audio/ogg"
296 if
1 < len(sys.argv):
297 mimetype = sys.argv[
1]
298 print "Browser plugin packages supporting %s:" % mimetype
299 for pkg in pkgs_handling_mimetype(mimetype):
303 <p>It can be used like this to look up a given MIME type:
</p>
306 % ./apt-find-browserplug-for-mimetype
307 Browser plugin packages supporting audio/ogg:
309 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
310 Browser plugin packages supporting application/x-shockwave-flash:
315 <p>In Ubuntu this mechanism is combined with support in the browser
316 itself to query for plugins and propose to install the needed
317 packages. It would be great if Debian supported such feature too. Is
318 anyone working on adding it?
</p>
320 <p><strong>Update
2013-
01-
18 14:
20</strong>: The Debian BTS
321 request for icweasel support for this feature is
322 <a href=
"http://bugs.debian.org/484010">#
484010</a> from
2008 (and
323 <a href=
"http://bugs.debian.org/698426">#
698426</a> from today). Lack
324 of manpower and wish for a different design is the reason thus feature
325 is not yet in iceweasel from Debian.
</p>
330 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
335 <div class=
"padding"></div>
338 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html">What is the most supported MIME type in Debian?
</a></div>
339 <div class=
"date">16th January
2013</div>
340 <div class=
"body"><p>The
<a href=
"http://wiki.debian.org/AppStreamDebianProposal">DEP-
11
341 proposal to add AppStream information to the Debian archive
</a>, is a
342 proposal to make it possible for a Desktop application to propose to
343 the user some package to install to gain support for a given MIME
344 type, font, library etc. that is currently missing. With such
345 mechanism in place, it would be possible for the desktop to
346 automatically propose and install leocad if some LDraw file is
347 downloaded by the browser.
</p>
349 <p>To get some idea about the current content of the archive, I decided
350 to write a simple program to extract all .desktop files from the
351 Debian archive and look up the claimed MIME support there. The result
353 <a href=
"http://ftp.skolelinux.org/pub/AppStreamTest">Skolelinux FTP
354 site
</a>. Using the collected information, it become possible to
355 answer the question in the title. Here are the
20 most supported MIME
356 types in Debian stable (Squeeze), testing (Wheezy) and unstable (Sid).
357 The complete list is available from the link above.
</p>
359 <p><strong>Debian Stable:
</strong></p>
363 ----- -----------------------
386 <p><strong>Debian Testing:
</strong></p>
390 ----- -----------------------
413 <p><strong>Debian Unstable:
</strong></p>
417 ----- -----------------------
440 <p>I am told that PackageKit can provide an API to access the kind of
441 information mentioned in DEP-
11. I have not yet had time to look at
442 it, but hope the PackageKit people in Debian are on top of these
445 <p><strong>Update
2013-
01-
16 13:
35</strong>: Updated numbers after
446 discovering a typo in my script.
</p>
451 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
456 <div class=
"padding"></div>
459 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Using_modalias_info_to_find_packages_handling_my_hardware.html">Using modalias info to find packages handling my hardware
</a></div>
460 <div class=
"date">15th January
2013</div>
461 <div class=
"body"><p>Yesterday, I wrote about the
462 <a href=
"http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">modalias
463 values provided by the Linux kernel
</a> following my hope for
464 <a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">better
465 dongle support in Debian
</a>. Using this knowledge, I have tested how
466 modalias values attached to package names can be used to map packages
467 to hardware. This allow the system to look up and suggest relevant
468 packages when I plug in some new hardware into my machine, and replace
469 discover and discover-data as the database used to map hardware to
472 <p>I create a modaliases file with entries like the following,
473 containing package name, kernel module name (if relevant, otherwise
474 the package name) and globs matching the relevant hardware
478 Package: package-name
479 <br>Modaliases: module(modaliasglob, modaliasglob, modaliasglob)
</p>
482 <p>It is fairly trivial to write code to find the relevant packages
483 for a given modalias value using this file.
</p>
485 <p>An entry like this would suggest the video and picture application
486 cheese for many USB web cameras (interface bus class
0E01):
</p>
490 <br>Modaliases: cheese(usb:v*p*d*dc*dsc*dp*ic0Eisc01ip*)
</p>
493 <p>An entry like this would suggest the pcmciautils package when a
494 CardBus bridge (bus class
0607) PCI device is present:
</p>
498 <br>Modaliases: pcmciautils(pci:v*d*sv*sd*bc06sc07i*)
501 <p>An entry like this would suggest the package colorhug-client when
502 plugging in a ColorHug with USB IDs
04D8:F8DA:
</p>
505 Package: colorhug-client
506 <br>Modaliases: colorhug-client(usb:v04D8pF8DAd*)
</p>
509 <p>I believe the format is compatible with the format of the Packages
510 file in the Debian archive. Ubuntu already uses their Packages file
511 to store their mappings from packages to hardware.
</p>
513 <p>By adding a XB-Modaliases: header in debian/control, any .deb can
514 announce the hardware it support in a way my prototype understand.
515 This allow those publishing packages in an APT source outside the
516 Debian archive as well as those backporting packages to make sure the
517 hardware mapping are included in the package meta information. I've
518 tested such header in the pymissile package, and its modalias mapping
519 is working as it should with my prototype. It even made it to Ubuntu
522 <p>To test if it was possible to look up supported hardware using only
523 the shell tools available in the Debian installer, I wrote a shell
524 implementation of the lookup code. The idea is to create files for
525 each modalias and let the shell do the matching. Please check out and
527 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/hw-support-lookup?view=co">hw-support-lookup
</a>
528 shell script. It run without any extra dependencies and fetch the
529 hardware mappings from the Debian archive and the subversion
530 repository where I currently work on my prototype.
</p>
532 <p>When I use it on a machine with a yubikey inserted, it suggest to
533 install yubikey-personalization:
</p>
536 % ./hw-support-lookup
537 <br>yubikey-personalization
541 <p>When I run it on my Thinkpad X40 with a PCMCIA/CardBus slot, it
542 propose to install the pcmciautils package:
</p>
545 % ./hw-support-lookup
550 <p>If you know of any hardware-package mapping that should be added to
551 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/modaliases?view=co">my
552 database
</a>, please tell me about it.
</p>
554 <p>It could be possible to generate several of the mappings between
555 packages and hardware. One source would be to look at packages with
556 kernel modules, ie packages with *.ko files in /lib/modules/, and
557 extract their modalias information. Another would be to look at
558 packages with udev rules, ie packages with files in
559 /lib/udev/rules.d/, and extract their vendor/model information to
560 generate a modalias matching rule. I have not tested any of these to
563 <p>If you want to help implementing a system to let us propose what
564 packages to install when new hardware is plugged into a Debian
565 machine, please send me an email or talk to me on
566 <a href=
"irc://irc.debian.org/%23debian-devel">#debian-devel
</a>.
</p>
571 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram
</a>.
576 <div class=
"padding"></div>
579 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Modalias_strings___a_practical_way_to_map__stuff__to_hardware.html">Modalias strings - a practical way to map "stuff" to hardware
</a></div>
580 <div class=
"date">14th January
2013</div>
581 <div class=
"body"><p>While looking into how to look up Debian packages based on hardware
582 information, to find the packages that support a given piece of
583 hardware, I refreshed my memory regarding modalias values, and decided
584 to document the details. Here are my findings so far, also available
586 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
587 Debian Edu subversion repository
</a>:
589 <p><strong>Modalias decoded
</strong></p>
591 <p>This document try to explain what the different types of modalias
592 values stands for. It is in part based on information from
593 <URL:
<a href=
"https://wiki.archlinux.org/index.php/Modalias">https://wiki.archlinux.org/index.php/Modalias
</a> >,
594 <URL:
<a href=
"http://unix.stackexchange.com/questions/26132/how-to-assign-usb-driver-to-device">http://unix.stackexchange.com/questions/
26132/how-to-assign-usb-driver-to-device
</a> >,
595 <URL:
<a href=
"http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c">http://code.metager.de/source/history/linux/stable/scripts/mod/file2alias.c
</a> > and
596 <URL:
<a href=
"http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&view=markup">http://cvs.savannah.gnu.org/viewvc/dmidecode/dmidecode.c?root=dmidecode&view=markup
</a> >.
598 <p>The modalias entries for a given Linux machine can be found using
599 this shell script:
</p>
602 find /sys -name modalias -print0 | xargs -
0 cat | sort -u
605 <p>The supported modalias globs for a given kernel module can be found
609 % /sbin/modinfo psmouse | grep alias:
610 alias: serio:ty05pr*id*ex*
611 alias: serio:ty01pr*id*ex*
615 <p><strong>PCI subtype
</strong></p>
617 <p>A typical PCI entry can look like this. This is an Intel Host
618 Bridge memory controller:
</p>
621 pci:v00008086d00002770sv00001028sd000001ADbc06sc00i00
624 <p>This represent these values:
</p>
629 sv
00001028 (subvendor)
630 sd
000001AD (subdevice)
636 <p>The vendor/device values are the same values outputted from 'lspci
637 -n' as
8086:
2770. The bus class/subclass is also shown by lspci as
638 0600. The
0600 class is a host bridge. Other useful bus values are
639 0300 (VGA compatible card) and
0200 (Ethernet controller).
</p>
641 <p>Not sure how to figure out the interface value, nor what it
644 <p><strong>USB subtype
</strong></p>
646 <p>Some typical USB entries can look like this. This is an internal
647 USB hub in a laptop:
</p>
650 usb:v1D6Bp0001d0206dc09dsc00dp00ic09isc00ip00
653 <p>Here is the values included in this alias:
</p>
656 v
1D6B (device vendor)
657 p
0001 (device product)
660 dsc
00 (device subclass)
661 dp
00 (device protocol)
662 ic
09 (interface class)
663 isc
00 (interface subclass)
664 ip
00 (interface protocol)
667 <p>The
0900 device class/subclass means hub. Some times the relevant
668 class is in the interface class section. For a simple USB web camera,
669 these alias entries show up:
</p>
672 usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc01ip00
673 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic01isc02ip00
674 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc01ip00
675 <br>usb:v0AC8p3420d5000dcEFdsc02dp01ic0Eisc02ip00
678 <p>Interface class
0E01 is video control,
0E02 is video streaming (aka
679 camera),
0101 is audio control device and
0102 is audio streaming (aka
680 microphone). Thus this is a camera with microphone included.
</p>
682 <p><strong>ACPI subtype
</strong></p>
684 <p>The ACPI type is used for several non-PCI/USB stuff. This is an IR
685 receiver in a Thinkpad X40:
</p>
688 acpi:IBM0071:PNP0511:
691 <p>The values between the colons are IDs.
</p>
693 <p><strong>DMI subtype
</strong></p>
695 <p>The DMI table contain lots of information about the computer case
696 and model. This is an entry for a IBM Thinkpad X40, fetched from
697 /sys/devices/virtual/dmi/id/modalias:
</p>
700 dmi:bvnIBM:bvr1UETB6WW(
1.66):bd06/
15/
2005:svnIBM:pn2371H4G:pvrThinkPadX40:rvnIBM:rn2371H4G:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
703 <p>The values present are
</p>
706 bvn IBM (BIOS vendor)
707 bvr
1UETB
6WW(
1.66) (BIOS version)
708 bd
06/
15/
2005 (BIOS date)
709 svn IBM (system vendor)
710 pn
2371H4G (product name)
711 pvr ThinkPadX40 (product version)
712 rvn IBM (board vendor)
713 rn
2371H4G (board name)
714 rvr NotAvailable (board version)
715 cvn IBM (chassis vendor)
717 cvr NotAvailable (chassis version)
720 <p>The chassis type
10 is Notebook. Other interesting values can be
721 found in the dmidecode source:
</p>
725 4 Low Profile Desktop
738 17 Main Server Chassis
741 20 Bus Expansion Chassis
742 21 Peripheral Chassis
744 23 Rack Mount Chassis
753 <p>The chassis type values are not always accurately set in the DMI
754 table. For example my home server is a tower, but the DMI modalias
755 claim it is a desktop.
</p>
757 <p><strong>SerIO subtype
</strong></p>
759 <p>This type is used for PS/
2 mouse plugs. One example is from my
763 serio:ty01pr00id00ex00
766 <p>The values present are
</p>
775 <p>This type is supported by the psmouse driver. I am not sure what
776 the valid values are.
</p>
778 <p><strong>Other subtypes
</strong></p>
780 <p>There are heaps of other modalias subtypes according to
781 file2alias.c. There is the rest of the list from that source: amba,
782 ap, bcma, ccw, css, eisa, hid, i2c, ieee1394, input, ipack, isapnp,
783 mdio, of, parisc, pcmcia, platform, scsi, sdio, spi, ssb, vio, virtio,
784 vmbus, x86cpu and zorro. I did not spend time documenting all of
785 these, as they do not seem relevant for my intended use with mapping
786 hardware to packages when new stuff is inserted during run time.
</p>
788 <p><strong>Looking up kernel modules using modalias values
</strong></p>
790 <p>To check which kernel modules provide support for a given modalias,
791 one can use the following shell script:
</p>
794 for id in $(find /sys -name modalias -print0 | xargs -
0 cat | sort -u); do \
796 /sbin/modprobe --show-depends "$id"|sed 's/^/ /' ; \
800 <p>The output can look like this (only the first few entries as the
801 list is very long on my test machine):
</p>
805 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/acpi/ac.ko
807 FATAL: Module acpi:device: not found.
809 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/char/nvram.ko
810 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/leds/led-class.ko
811 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/rfkill/rfkill.ko
812 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/platform/x86/thinkpad_acpi.ko
813 acpi:IBM0071:PNP0511:
814 insmod /lib/modules/
2.6.32-
5-
686/kernel/lib/crc-ccitt.ko
815 insmod /lib/modules/
2.6.32-
5-
686/kernel/net/irda/irda.ko
816 insmod /lib/modules/
2.6.32-
5-
686/kernel/drivers/net/irda/nsc-ircc.ko
820 <p>If you want to help implementing a system to let us propose what
821 packages to install when new hardware is plugged into a Debian
822 machine, please send me an email or talk to me on
823 <a href=
"irc://irc.debian.org/%23debian-devel">#debian-devel
</a>.
</p>
825 <p><strong>Update
2013-
01-
15:
</strong> Rewrite "cat $(find ...)" to
826 "find ... -print0 | xargs -
0 cat" to make sure it handle directories
827 in /sys/ with space in them.
</p>
832 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram
</a>.
837 <div class=
"padding"></div>
840 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html">Moved the pymissile Debian packaging to collab-maint
</a></div>
841 <div class=
"date">10th January
2013</div>
842 <div class=
"body"><p>As part of my investigation on how to improve the support in Debian
843 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
844 Launcher and updated the Debian package
845 <a href=
"http://packages.qa.debian.org/pymissile">pymissile
</a> to make
846 sure udev will fix the device permissions when it is plugged in. I
847 also added a "Modaliases" header to test it in the Debian archive and
848 hopefully make the package be proposed by jockey in Ubuntu when a user
849 plug in his rocket launcher. In the process I moved the source to a
850 git repository under collab-maint, to make it easier for any DD to
851 contribute.
<a href=
"http://code.google.com/p/pymissile/">Upstream
</a>
852 is not very active, but the software still work for me even after five
853 years of relative silence. The new git repository is not listed in
854 the uploaded package yet, because I want to test the other changes a
855 bit more before I upload the new version. If you want to check out
856 the new version with a .desktop file included, visit the
857 <a href=
"http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git">gitweb
858 view
</a> or use "
<tt>git clone
859 git://anonscm.debian.org/collab-maint/pymissile.git
</tt>".</p>
864 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian
">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english
">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/robot
">robot</a>.
869 <div class="padding
"></div>
872 <div class="title
"><a href="http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html
">Lets make hardware dongles easier to use in Debian</a></div>
873 <div class="date
"> 9th January 2013</div>
874 <div class="body
"><p>One thing that annoys me with Debian and Linux distributions in
875 general, is that there is a great package management system with the
876 ability to automatically install software packages by downloading them
877 from the distribution mirrors, but no way to get it to automatically
878 install the packages I need to use the hardware I plug into my
879 machine. Even if the package to use it is easily available from the
880 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
881 suggest to automatically install the python-nxt, nbc and t2n packages
882 I need to talk to it. When I plug in a Yubikey, it could propose the
883 yubikey-personalization package. The information required to do this
884 is available, but no-one have pulled all the pieces together.</p>
886 <p>Some years ago, I proposed to
887 <a href="http://lists.debian.org/debian-devel/
2010/
05/msg01206.html
">use
888 the discover subsystem to implement this</a>. The idea is fairly
893 <li>Add a desktop entry in /usr/share/autostart/ pointing to a program
894 starting when a user log in.</li>
896 <li>Set this program up to listen for kernel events emitted when new
897 hardware is inserted into the computer.</li>
899 <li>When new hardware is inserted, look up the hardware ID in a
900 database mapping to packages, and take note of any non-installed
903 <li>Show a message to the user proposing to install the discovered
904 package, and make it easy to install it.</li>
908 <p>I am not sure what the best way to implement this is, but my
909 initial idea was to use dbus events to discover new hardware, the
910 discover database to find packages and
911 <a href="http://www.packagekit.org/
">PackageKit</a> to install
914 <p>Yesterday, I found time to try to implement this idea, and the
915 draft package is now checked into
916 <a href="http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/
">the
917 Debian Edu subversion repository</a>. In the process, I updated the
918 <a href="http://packages.qa.debian.org/d/discover-data.html
">discover-data</a>
919 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
920 the relevant packages in Debian, and uploaded a new version
921 2.2013.01.09 to unstable. I also discovered that the current
922 <a href="http://packages.qa.debian.org/d/discover.html
">discover</a>
923 package in Debian no longer discovered any USB devices, because
924 /proc/bus/usb/devices is no longer present. I ported it to use
925 libusb as a fall back option to get it working. The fixed package
926 version 2.1.2-6 is now in experimental (didn't upload it to unstable
927 because of the freeze).</p>
929 <p>With this prototype in place, I can insert my Yubikey, and get this
930 desktop notification to show up (only once, the first time it is
933 <p align="center
"><img src="http://people.skolelinux.org/pere/blog/images/
2013-
01-
09-hw-autoinstall.png
"></p>
935 <p>For this prototype to be really useful, some way to automatically
936 install the proposed packages by pressing the "Please install
937 program(s)" button should to be implemented.
</p>
939 <p>If this idea seem useful to you, and you want to help make it
940 happen, please help me update the discover-data database with mappings
941 from hardware to Debian packages. Check if 'discover-pkginstall -l'
942 list the package you would like to have installed when a given
943 hardware device is inserted into your computer, and report bugs using
944 reportbug if it isn't. Or, if you know of a better way to provide
945 such mapping, please let me know.
</p>
947 <p>This prototype need more work, and there are several questions that
948 should be considered before it is ready for production use. Is dbus
949 the correct way to detect new hardware? At the moment I look for HAL
950 dbus events on the system bus, because that is the events I could see
951 on my Debian Squeeze KDE desktop. Are there better events to use?
952 How should the user be notified? Is the desktop notification
953 mechanism the best option, or should the background daemon raise a
954 popup instead? How should packages be installed? When should they
955 not be installed?
</p>
957 <p>If you want to help getting such feature implemented in Debian,
958 please send me an email. :)
</p>
963 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram
</a>.
968 <div class=
"padding"></div>
970 <p style=
"text-align: right;"><a href=
"index.rss"><img src=
"http://people.skolelinux.org/pere/blog/xml.gif" alt=
"RSS feed" width=
"36" height=
"14" /></a></p>
981 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/01/">January (
11)
</a></li>
983 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/02/">February (
1)
</a></li>
990 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/01/">January (
7)
</a></li>
992 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/02/">February (
10)
</a></li>
994 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/03/">March (
17)
</a></li>
996 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/04/">April (
12)
</a></li>
998 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/05/">May (
12)
</a></li>
1000 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/06/">June (
20)
</a></li>
1002 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/07/">July (
17)
</a></li>
1004 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/08/">August (
6)
</a></li>
1006 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/09/">September (
9)
</a></li>
1008 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/10/">October (
17)
</a></li>
1010 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/11/">November (
10)
</a></li>
1012 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/12/">December (
7)
</a></li>
1019 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/01/">January (
16)
</a></li>
1021 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/02/">February (
6)
</a></li>
1023 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/03/">March (
6)
</a></li>
1025 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/04/">April (
7)
</a></li>
1027 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/05/">May (
3)
</a></li>
1029 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/06/">June (
2)
</a></li>
1031 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/07/">July (
7)
</a></li>
1033 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/08/">August (
6)
</a></li>
1035 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/09/">September (
4)
</a></li>
1037 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/10/">October (
2)
</a></li>
1039 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/11/">November (
3)
</a></li>
1041 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/12/">December (
1)
</a></li>
1048 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/01/">January (
2)
</a></li>
1050 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/02/">February (
1)
</a></li>
1052 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/03/">March (
3)
</a></li>
1054 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/04/">April (
3)
</a></li>
1056 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/05/">May (
9)
</a></li>
1058 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/06/">June (
14)
</a></li>
1060 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/07/">July (
12)
</a></li>
1062 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/08/">August (
13)
</a></li>
1064 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/09/">September (
7)
</a></li>
1066 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/10/">October (
9)
</a></li>
1068 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/11/">November (
13)
</a></li>
1070 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/12/">December (
12)
</a></li>
1077 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/01/">January (
8)
</a></li>
1079 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/02/">February (
8)
</a></li>
1081 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/03/">March (
12)
</a></li>
1083 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/04/">April (
10)
</a></li>
1085 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/05/">May (
9)
</a></li>
1087 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/06/">June (
3)
</a></li>
1089 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/07/">July (
4)
</a></li>
1091 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/08/">August (
3)
</a></li>
1093 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/09/">September (
1)
</a></li>
1095 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/10/">October (
2)
</a></li>
1097 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/11/">November (
3)
</a></li>
1099 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/12/">December (
3)
</a></li>
1106 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/11/">November (
5)
</a></li>
1108 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/12/">December (
7)
</a></li>
1119 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (
13)
</a></li>
1121 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/amiga">amiga (
1)
</a></li>
1123 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/aros">aros (
1)
</a></li>
1125 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bankid">bankid (
4)
</a></li>
1127 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (
6)
</a></li>
1129 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (
12)
</a></li>
1131 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bsa">bsa (
2)
</a></li>
1133 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian (
70)
</a></li>
1135 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (
118)
</a></li>
1137 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/digistan">digistan (
9)
</a></li>
1139 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook (
7)
</a></li>
1141 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (
4)
</a></li>
1143 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/english">english (
176)
</a></li>
1145 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (
21)
</a></li>
1147 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (
12)
</a></li>
1149 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (
10)
</a></li>
1151 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (
9)
</a></li>
1153 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/intervju">intervju (
32)
</a></li>
1155 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (
5)
</a></li>
1157 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/kart">kart (
17)
</a></li>
1159 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ldap">ldap (
8)
</a></li>
1161 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/lenker">lenker (
6)
</a></li>
1163 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (
1)
</a></li>
1165 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (
25)
</a></li>
1167 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk (
219)
</a></li>
1169 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug (
148)
</a></li>
1171 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (
6)
</a></li>
1173 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/open311">open311 (
2)
</a></li>
1175 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (
41)
</a></li>
1177 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern (
61)
</a></li>
1179 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/raid">raid (
1)
</a></li>
1181 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/reprap">reprap (
11)
</a></li>
1183 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rfid">rfid (
2)
</a></li>
1185 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/robot">robot (
6)
</a></li>
1187 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rss">rss (
1)
</a></li>
1189 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ruter">ruter (
4)
</a></li>
1191 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (
2)
</a></li>
1193 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (
28)
</a></li>
1195 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (
4)
</a></li>
1197 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (
4)
</a></li>
1199 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/standard">standard (
39)
</a></li>
1201 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (
3)
</a></li>
1203 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (
5)
</a></li>
1205 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (
12)
</a></li>
1207 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (
1)
</a></li>
1209 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/valg">valg (
7)
</a></li>
1211 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/video">video (
35)
</a></li>
1213 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (
4)
</a></li>
1215 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/web">web (
26)
</a></li>
1221 <p style=
"text-align: right">
1222 Created by
<a href=
"http://steve.org.uk/Software/chronicle">Chronicle v4.4
</a>