MakeMKV Linux and USB optical drives: Read issues and solution
Posted: Tue May 25, 2021 9:54 am
I have two drives supplied by Asmcom in the UK. One is an Hitachi LG-BH16NS40 cross-flashed to a Hitachi LG-WH16NS60 on firmware version 1-00DE (LibreDrive) in an OWC Mercury Pro external USB3 enclosure. The other is an LG BH16NS55 on firmware 1.02DE (LibreDrive) in a Vantec external USB3 enclosure.
I am running Ubuntu Desktop 20.04 LTS and the Linux version of MakeMKV installed via the APT repository.
I was running into a problem (with both drives) where DVD (and only DVD) media would cause the drive to seek repeatedly and the disc would never be mounted on the system. If I inserted a DVD into either drive, it would not mount and any disc that I inserted afterwards (bluray or UHD included) would also cause an infinite seek loop and no mount behaviour. The only way to get the drives working again would be to shut the computer down, turn the power to the drive off and on and then start the machine again. I should say that both drives performed without issue under Windows 10 no matter what type of media was inserted.
Initially I thought that the problem was caused by a faulty drive, but when the behaviour happened again with the newer LG in the OWC enclosure, I started to dig deeper. With the help of someone else who was having the same problem with 20.04 LTS and a different drive in a different enclosure, we found a solution which I hope might help others who run into the same issue.
The solution is to make the following configuration changes:
and make the following lines in /etc/udev/rules.d/60-persistent-storage.rules:
look like this:
(the IMPORT... statements are commented out and replaced with GOTO... replacements)
Reboot and then try your DVD media again - it should work now.
Ref:
I ran across this bug report on a Fedora system, which mentions a similar issue on yet more dissimilar hardware. The one thing they had in common was the use of a BluRay drive in a SATA to USB3 external enclosure.
That bug report indicated that their problem was with poor behavior of blkid when optical media was inserted into the drive. Like him, I was able to validate that the drive functioned perfectly fine on a Win10 system, but on multiple Ubuntu 20.04 machines, DVD Movie media would cause the drive to hang for a period and the media would never be recognized by the OS.
Another bug report was referenced as source material where the work-around to this is referenced.
Unfortunately, both bug reports were ultimately closed as not-resolved due to them ageing out. Would love to put this in front of one of the util-linux package maintainers and a kernel maintainer to see where the true fix for this should really be implemented.
[/code]
I am running Ubuntu Desktop 20.04 LTS and the Linux version of MakeMKV installed via the APT repository.
I was running into a problem (with both drives) where DVD (and only DVD) media would cause the drive to seek repeatedly and the disc would never be mounted on the system. If I inserted a DVD into either drive, it would not mount and any disc that I inserted afterwards (bluray or UHD included) would also cause an infinite seek loop and no mount behaviour. The only way to get the drives working again would be to shut the computer down, turn the power to the drive off and on and then start the machine again. I should say that both drives performed without issue under Windows 10 no matter what type of media was inserted.
Initially I thought that the problem was caused by a faulty drive, but when the behaviour happened again with the newer LG in the OWC enclosure, I started to dig deeper. With the help of someone else who was having the same problem with 20.04 LTS and a different drive in a different enclosure, we found a solution which I hope might help others who run into the same issue.
The solution is to make the following configuration changes:
Code: Select all
sudo cp /usr/lib/udev/rules.d/60-persistent-storage.rules /etc/udev/rules.d/60-persistent-storage.rules
sudo vim /etc/udev/rules.d/60-persistent-storage.rules
Code: Select all
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
IMPORT{builtin}="blkid --noraid"
Code: Select all
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
GOTO="persistent_storage_end"
## IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
GOTO="persistent_storage_end"
## IMPORT{builtin}="blkid --noraid"
Reboot and then try your DVD media again - it should work now.
Ref:
I ran across this bug report on a Fedora system, which mentions a similar issue on yet more dissimilar hardware. The one thing they had in common was the use of a BluRay drive in a SATA to USB3 external enclosure.
That bug report indicated that their problem was with poor behavior of blkid when optical media was inserted into the drive. Like him, I was able to validate that the drive functioned perfectly fine on a Win10 system, but on multiple Ubuntu 20.04 machines, DVD Movie media would cause the drive to hang for a period and the media would never be recognized by the OS.
Another bug report was referenced as source material where the work-around to this is referenced.
Unfortunately, both bug reports were ultimately closed as not-resolved due to them ageing out. Would love to put this in front of one of the util-linux package maintainers and a kernel maintainer to see where the true fix for this should really be implemented.
[/code]