External CDROM - problem after changing the disk

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
kuzja

External CDROM - problem after changing the disk

Post by kuzja »

I have bought an external USB CD/DVD drive, type LG GP57EW40. Even though Linux is not officially supported by the manufacturer, users reported it worked fine under Linux.
I am using Linux Mint 17.1.

When I connect the drive and insert the first CD/DVD, everything is fine. There is a disc icon on the desktop and the file browser shows the CD/DVD content correctly. However, after I change the disc, the icon is updated, the new disc label is shown, but the file list is corrupted: there are strange characters in the filenames (Chinese?), the number of files is small or even there are no files shown.

To correct this problem, I have to do one of the following:
- to disconnect the drive and to connect it again, or
- to unmount the drive, and to re-insert the CD/DVD, or
- to eject the disc from Linux (i.e. not by the eject button on the drive itself), and to re-insert it.

So there are workarounds, but it is not very convenient when you change discs often.
Any ideas where the problem lies?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mute Ant

Re: External CDROM - problem after changing the disk

Post by Mute Ant »

"to eject the disc from Linux (i.e. not by the eject button on the drive itself), and to re-insert it" Yah three years it's been doing this. The eject-button event doesn't get to all the processes that need to know about it, so you get a new optical disk being read as data for the old mounted file system.
http://forum.linuxvillage.org/index.php?topic=231.0
It's an easy system adjustment. Does this help?

Code: Select all

sudo bash -c 'echo 2000 > /sys/block/sr0/events_poll_msecs'
kuzja

Re: External CDROM - problem after changing the disk

Post by kuzja »

Thanks for a good tip.
But the polling is already enabled by default:

Code: Select all

/ $ cat /sys/block/sr0/events_poll_msecs
2000
I suppose that if the polling was off, there would be no update at all after the disc change. But in this case, the desktop icon and its label are updated accordingly; what does not work is the file access. Actually the icon and the label are correctly updated twice: when the first disc is ejected, and when the second disc is inserted.
Example:
Step 1: The first disc (let's say DVD DISC1) is in the drive. We have "DVD+R" icon plus "DISC1" label.
Step 2: Disc is ejected by the external drive button. We have "general disc" icon plus "CD/DVD Drive" label.
Step 3: The second disc (let's say CD DISC2) is inserted. We have "CD-R" icon plus "DISC2" label.
...but only in Step 1 the disk content is read correctly.

I also noticed that when the first disc is inserted, it is mounted as /media/user/DISC1. When you change the disc to DISC2, the mount point still remains at /media/user/DISC1, but trying to list the files in terminal window gives an error:

Code: Select all

/media/user/DISC1 $ ls
ls: reading directory .: Input/output error
Locked

Return to “Hardware Support”