site  contact  subhomenews

Woof: optical drive detection

July 30, 2013 — BarryK
I was working late last night, fixing the problem of external USB optical drive desktop icon not appearing. I even went out and bought one, to test with!

After a lot of messing around, fixed it. Here are the most recent Woof commits:

again fix optical media detection:
http://bkhome.org/fossil/woof2.cgi/info/3831c64698
fix timing detect external usb optical media:
http://bkhome.org/fossil/woof2.cgi/info/809fbe4176
inserting media in usb external optical drive was not detected:
http://bkhome.org/fossil/woof2.cgi/info/6b11212f7d

Basically, the problem is that the kernel does not detect insertion or removal of optical media for external optical drives.
The issue is further complicated, as I reported recently, the kernel detects insertion of optical media in internal drives, but only on some PC -- I presume very modern PCs.

Then there is another timing problem. /dev/sr1 (or whatever) will appear if a external optical drive is plugged in, however, the media is unusable for 6-7 seconds. That is, the 'cddetect_quick' utility will not detect inserted media until 6-7 seconds after the /dev node has appeared.

The above fix is in the Service Pack for precise 5.7.

The actual commit used to build Precise 5.7:
http://bkhome.org/fossil/woof2.cgi/info/2e7a971a77

Comments

Something had changed
Username: K Godt
I recently recognized that recent kernels (3.5.0) seem to detect when a media is inserted in some slot ( USB Multi-Card-Reader ) and the partition shows up in /sys/class/block , but when removing the media without unplugging the reader from the USB port , the /sys/class/block entry is not deleted . Running some commands like mount triggers the kernel to check everything and the entry gets removed . Have checked with kernel 2.6.30 and 2.6.37 and there /sys/class/block gets updated as expected . My first thought was that it would have something to do with kernel options ( Server or RT instead of Desktop ) .

USB DVD writer
Username: don570
" I tested a removable USB DVD writer (LG GP30) on precise-5.6.4.iso and after a restart of X the icon appeared on the desktop. Note that service update WASN'T installed. [IMG]http://i1176.photobucket.com/albums/x323/don570/screenshot-precise-7_zpse9063afa.png[/IMG]


Tags: woof