site  contact  subhomenews

Desktop drive icon fix

July 10, 2009 — BarryK
There was a little problem that shows up sometimes. I only get it with the 2.6.25.16 kernel, but perhaps it could happen with others.

Sometimes I plug in a USB drive, but no icon appears on the desktop. The LED on the drive flashes, so it is getting recognised, and Pmount sees it okay.

What I found is that 'pup_event_frontend_d' scans /sys/block periodically to look for drives added or removed, and if a new one then reads /proc/partitions. However, sometimes the kernel updates /sys/block but then takes a bit to long to update /proc/partitions. My script reads /proc/partitions a bit too soon. I found that the delay can be over half a second sometimes.

I fixed it, not with a fixed sleep but with a little loop that waits for /proc/partitions to be updated.

Comments

woof



Tags: woof