Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
dvd_drives [2013/07/13 15:51]
beandog
dvd_drives [2018/03/28 14:35]
beandog
Line 1: Line 1:
 ====== DVD Drives ====== ====== DVD Drives ======
  
-Polling DVD drives to see if it is closed or not is a real pain to do in Linux.+  * [[dvd_drive_status]] 
 +  * [[dvd_eject]] 
 +  * [[regionset]] 
 +  * [[trayopen]] 
 + 
 +Spec: a 1x DVD drive reads at 1385 kilobytes per second (KB/s), or 1.385 megabytes per second (MB/s) 
 + 
 +==== Polling a Drive: Is Open / Has Media ==== 
 + 
 +Polling DVD drives to see if it is closed or not is a real pain to do in Linux. (**Edit:** it was!  Check out [[dvd_drive_status]] which solves everything here) 
 + 
 +I highly recommend reading [[http://​wonkabar.org/​2013/​07/​03/​reading-ejecting-ripping-and-polling-dvd-devices-in-linux-also-notes-on-my-dvd-library/​| this blog post]] where I describe various ways I poll the drive to see if it is empty or not. 
 + 
 +Also, check out [[trayopen]],​ which I added to this wiki after writing that blog post.
  
 The reason is because there are race conditions. The reason is because there are race conditions.
Line 14: Line 27:
 Ideally, this would work perfectly fine.  However, the problem happens after step #3, closing the tray.  The device becomes available **before** it is actually ready to read from.  This is particularly annoying with DVD drives because some firmware (most of them, that I've seen) for the devices will freak out if you are trying to access the data encrypted by CSS. Ideally, this would work perfectly fine.  However, the problem happens after step #3, closing the tray.  The device becomes available **before** it is actually ready to read from.  This is particularly annoying with DVD drives because some firmware (most of them, that I've seen) for the devices will freak out if you are trying to access the data encrypted by CSS.
  
-The best solution I've found to work around this mess?  Close the DVD tray and wait 30 seconds for the device to finish polling.+The best solution I've found to work around this mess?  Close the DVD tray and wait 30 seconds for the device to finish polling.  Seriously. ​ Just avoid the problem by applying some patience.
  
 You can duplicate the scenario if you like, like this: You can duplicate the scenario if you like, like this:

Navigation