The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Unmount or deactivate cdrom drive?

    Discussion in 'Linux Compatibility and Software' started by RWUK, Mar 30, 2011.

  1. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    How would this be done in Ubutnu 10.10? All the info I can find on this (which isn't much) is for older versions. I can't do it through my bios. Surely it's possible just to unmount the drive somehow?
    Thanks.
     
  2. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    I havent tried Ubuntu 10.10 so far, but is there any reason to assume that this won't work?:
    Code:
    sudo umount /dev/cdrom

    If you get a device busy message and you don't know the reason try these commands to find it:
    Code:
    lsof | grep /dev/cdrom
    lsof | grep /MOUNT/POINT/OF/CDROM  #adapt this line
     
  3. timberwolf

    timberwolf Notebook Consultant

    Reputations:
    131
    Messages:
    288
    Likes Received:
    0
    Trophy Points:
    30
    If you mean power saving by switching off that component then probably not or it'll be very laptop specific. The hardware manufacturers are usually unwilling to disclose the technical information necessary for the linux software to be written.
     
  4. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
  5. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    Ah, I didn't know the cdrom drive is always unmounted unless there's media in it, so the sudo umount command doesn't do anything but say that in response.

    Yes, this is a powersaving thing I'm trying to do. I was hoping to be able to switch on and off if the computer powers the optical drive.

    I thought HAL was an outdated device detection method that stopped with 10.04? I don't have it on 10.10 and I'm hesitant to install it because I've seen it coupled with the term 'deprecated' on Ubuntu forums and elsewhere. Will this cause problems in kernel 2.6.35?

    Thank you for your responses.
     
  6. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You can use udisks to accomplish the same:
    Code:
    udisks --inhibit-polling /dev/scd0 &
     
  7. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    Great, thank you.

    Then to enable polling again, do i just replace 'enable' with 'inhibit'?
     
  8. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    No you'd want to kill that udisks process. You can omit the & if you want to undo it interactively, and then hit Ctrl+C. With the & you'd need to pkill -n udisks
     
  9. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    Hmm, even with the &, I get the 'press Ctrl+C to end' option. It appears this won't survive closing the terminal it was entered in. I was hoping for something that could even last through reboots but I guess this is better than nothing.

    Thanks.
     
  10. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    You need to hit enter. If you want to close the window, depending on your terminal you may need to run it with nohup. I can close the window after I hit enter on gnome-terminal and it stays running.

    If you want it to persist across reboots you can make a udev rule to prevent polling on your optical drive.
     
  11. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    Ok, I see now. The pkill command above gives me

    pkill: 3081 - Operation not permitted

    however, if put a dvd into the drive, it wakes up and works fine so seems everything is alright!
     
  12. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Maybe you aren't doing it as root (sudo)? Both commands need to be done as root.
     
  13. RWUK

    RWUK Notebook Evangelist

    Reputations:
    254
    Messages:
    591
    Likes Received:
    0
    Trophy Points:
    30
    Yes, you're right. It needs to be as root.