[mythtv] CD/DVD always mounted so eject fails

Nigel Pearson nigel at ind.tansu.com.au
Wed Jul 2 04:47:00 UTC 2008


> Manually unmounting doesn't stop anything from working on the  
> frontend and
> it allows the eject button to work again (much better WAF then!!)  
> so the
> question is, why does the media monitor, when it has sussed there is a
> disk in the drive but its not being used (eg sitting at the main menu)
> still keep it mounted?



OK. There is a patch here which might* fix it for you
(for DVD/VCD only - other disk types are harder to fix)

http://svn.mythtv.org/trac/attachment/ticket/4877/umount-eject.patch

Index: libs/libmyth/mythcdrom.cpp
===================================================================
--- libs/libmyth/mythcdrom.cpp       (revision 17685)
+++ libs/libmyth/mythcdrom.cpp       (working copy)
@@ -119,7 +119,14 @@
      if (MEDIATYPE_DATA == m_MediaType)
          MythMediaDevice::onDeviceMounted();

+
+    // Unlock the door, and if appropriate unmount the media,
+    // so the user can press the manual eject button
      if (m_AllowEject)
+    {
          unlock();
+        if (m_MediaType == MEDIATYPE_DVD || m_MediaType ==  
MEDIATYPE_VCD)
+            unmount();
+    }
  }

Please provide -v media if it fails.




(*) I say "might," 'cause this sort of stuff is very drive and
kernel driver dependent. On two of my three test machines,
I can eject the tray while the volume is mounted!
The drive just magically disappears from df or /proc/mounts.

(There is no kernel message saying what's going on.
  They are newish kernels - 2.6.18 and 2.6.23)

The third machine does exhibit the problem, but it is
currently SVN trunk, which has a broken MediaMonitor.

--
Nigel Pearson, nigel at ind.tansu.com.au|"I haven't tested it yet,
Telstra Net. Eng., Sydney, Australia | but it should be perfectly safe."
Office: 9202 3900    Fax:  9261 3912 |"Just a bit or harmless brain-
Mobile: 0408 664435  Home: 9792 6998 | manipulation, that's all" -  
Wallace



More information about the mythtv-dev mailing list