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:
fix timing detect external usb optical media:
inserting media in usb external optical drive was not detected:

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:


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][/IMG]

Tags: woof