I hate this, when the Optical Drive is locked, if I not burning something on the disk!
I just want to remove it, by pressing the eject button on the drive, but this is not working because Linux locks it :’(
I know, I could eject it via the Device Notifier, but I want to eject it at anytime by pressing the eject button on the drive.
And don’t tell me something about safety or something. This is what I want!! A risky life lol!
You could also use the terminal eject command as in:
eject /dev/sr0
For instance. To find out more, do a man eject at the terminal prompt. You can even create a shortcut on the desktop to do this. I am thinking you will not stop the kernel action of locking a mounted drive though without a lot more effort however.
You don’t say what desktop you are using but I can normally use the eject button with KDE as long as I have not changed user; on the rare occasions when the eject button does not work, I click on the inotifier icon and then the eject icon.
You don’t say what desktop you are using but I can normally use the eject button with KDE as long as I have not changed user; on the rare occasions when the eject button does not work, I click on the inotifier icon and then the eject icon.
I use KDE and if I put in a CD and then open it with Dolphin, the disk is mounted and the physical Eject button is disabled, while the disk is mounted. The device manage allows the disk to eject with just two mouse clicks (open device manager/hit eject button next to disk) or you can use the terminal eject command (as in my example in a previous message). If the CD/DVD is not mounted, I do think the physical eject button may work, but I have not tried that combination today.
If there is an application that is pointing to the cd/dvd like a file manager or a shell with the current directory set to the cd/dvd then you most likely wont be able to eject the cd until you point it away or close the app.
my question how to avoid linux blocking the drive
eject a mounted disk just with the physical eject button on the drive
a mounted usb stick or hdd can I remove at any time without unmounting it before, but for this i use the unmount function to avoid data loss
but for disk i want just eject it without unmounting it, the drive should be only locked if i burn data to the disk, and otherwise s*** up!
eject a mounted disk just with the physical eject button on the drive
a mounted usb stick or hdd can I remove at any time without unmounting it before, but for this i use the unmount function to avoid data loss
but for disk i want just eject it without unmounting it, the drive should be only locked if i burn data to the disk, and otherwise s*** up!
do you understand me?
It is too bad no one had a fix for you, even though this (the locking of the drive) is an attempt to save you from yourself. It is also sad that you are unappreciative of that help. Such words will not help your cause here I am afraid.
This is an old thread I could find on the fedora forum. It might be your solution or might not be as well since I have no idea how sysctl.conf works in the first place.
Your problem struck a familiar note to me. You do not state whether you are running Gnome or KDE. I have never experienced any problems resembing this with Gnome. With KDE, especially right after 4.6 came out, Dolphin would not release any removable media (optical and USB) on command. The only immediate solution was to terminate Dolphin. (I did run Nautilus under KDE without this problem!).
As KDE releases caught up with maintenance, the problem seemed to clear, until recently. It seemed Nepomuk (aka virtuoso) decided to index the drive (optical or USB). Attempts to unmount/eject the device waited until indexing completed, and, of course, the manual “eject” button was disabled.
Check System Settings –> Desktop Search –> Desktop Query (tab), and ensure that “Index files on removable media” is unchecked. Further, once KDE is up to service level, this problem appears to be resolved.
I wonder is this is a Dolphin related problem; I don’t use Dolphin, preferring Konqueror as my default file manager. Perhaps Dolphin registers itself as using the optical drive and so prevents the hardware from ejecting it. In this case, this problem might be better raised at Workspace • KDE Community Forums
To see what blocks the drive I would first check something like
fuser -v /dev/sr0 #or whatever the drive name is
and maybe repeat the same with the name of the mount point. If it turns out
that it is a dolphin related process (or one of its childs) report upstream
to KDE, this is for sure not the intended behaviour then.
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.5 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.5 | nVidia
ION | 3GB Ram
So I decided to give this a try martin_helm. This is openSUSE 11.4 64 bit and KDE 4.6.0. I stuck in a data DVD from a Linux magazine. The Device Notifier ask to take some action with the disk and I elected to open it with Dolphin. A df command shows this:
/dev/sr0 3361320 3361320 0 100% /media/LUD95
Running your command does not produce any output:
fuser -v /dev/sr0
However, if I run the following command, I get this output:
fuser -v /media/LUD95
USER PID ACCESS COMMAND
/media/LUD95: root kernel mount /media/LUD95
I can not eject the DVD player with its eject button, but I can eject it from the Device Manager or with the command:
eject /dev/sr0
If the DVD is still open with Dolphin, I must either close Dolphin or run the eject command twice as after the first try, the tray opens and then closes again.
@jdmcdaniel3
I see the same behaviour that the process locks the device by continiously
accessing the mount point and even after I close the instance of dolphin
which has the cd open the eject button does not work. IMHO this is a bug and
has nothing to do with safety, I can understand that people find this
behaviour annoying. In gnome 2.32 this works as I would expect it to work.
The media is ejected with the button at the device and nautilus just notices
that the device is no longer mounted as a consequence. Also krusader does
not block the eject button.
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.5 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.5 | nVidia
ION | 3GB Ram
@jdmcdaniel3
I see the same behaviour that the process locks the device by continiously
accessing the mount point and even after I close the instance of dolphin
which has the cd open the eject button does not work. IMHO this is a bug and
has nothing to do with safety, I can understand that people find this
behaviour annoying. In gnome 2.32 this works as I would expect it to work.
The media is ejected with the button at the device and nautilus just notices
that the device is no longer mounted as a consequence. Also krusader does
not block the eject button.
So, we think this is a KDE bug in 4.6.0. Does it exist in the most recent version of KDE and has it been reported to KDE by chance? I know you may not know the answers, but just throwing them out for any comments.
> So, we think this is a KDE bug in 4.6.0. Does it exist in the most
> recent version of KDE and has it been reported to KDE by chance? I know
> you may not know the answers, but just throwing them out for any
> comments.
>
I tested with 4.6.5 from the kde46 repository. Since I use optical media so
rarely these days (except sometimes burning something) that I did not even
notice this behaviour before I saw this thread.
I do not really find exactly this problem in the KDE bug tracker but there
seems to be more funny misbehaviour with dolphin and optical media like this https://bugs.kde.org/show_bug.cgi?id=269146
I will check it again this evening (I have also a Scientific Linux 6 with
KDE 4.3.5 on amchine with a dvd drive to see if it happens there also) and
then report it to bugs.kde.org if nobody else decides to do it earlier.
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.5 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.5 | nVidia
ION | 3GB Ram
Under KDE 4.6.5 (“Release 8”), Dolphin releases the drive when 1) requested from the Dolphin panel, and 2) requests from the Device Notifier. The optical is NOT released by the eject button. Running Nautilus (under KDE) behaves exactly the same as Dolphin. If the optical device has not been used by Dolphin, the eject button request is honored.
When running Gnome (2.3.2), all functions work as expected, and the eject button is honored anytime. I will test this on Gnome 3 soon, and post back.
For reference, the above environments have been tested on 11.3 and 11.4. A 12.1 is in the “burn” stage.
jdmcdaniel3 wrote:
> So it seems to be related, but not described as the problem brought up
> with this thread.
>
Of course it was just an example that more cd related things are a bit weird
at the moment with dolphin. I reported the bug https://bugs.kde.org/show_bug.cgi?id=277434
By the way I checked KDE 4.3.5 in the meantime and dolphin does not block
the eject button of the device it just works as in other file managers.
–
PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.5 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.5 | nVidia
ION | 3GB Ram