LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 02-07-2012, 05:30 AM   #16
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234

Quote:
Originally Posted by EDDY1 View Post
When I run this command it doesn't show root it shows my user name
because you're running it as a user.

the output is the command you've entered. i.e. ps is telling you that you ran it, and piped it's result to grep which looked for "gvfsd-cdd" (whatever that is). the only result it found was you looking for "gvfsd-cdd".
 
1 members found this post helpful.
Old 02-07-2012, 10:27 AM   #17
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,249

Rep: Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579Reputation: 579
Thank you rkelson
 
Old 02-07-2012, 12:32 PM   #18
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
Quote:
Possible Fix
I have some information that may be helpful. This bug report...
https://bugzilla.gnome.org/show_bug.cgi?id=550353
... describes a problem that I also had when using Grip cd ripping software (under Fedora 11, in case it matters).

For me, every time I inserted a disc (after the first one), Grip complained that the "location is already mounted" (but the software continued to work correctly anyway as long as I inserted another disc when Grip opened the drive door.

However, if I closed the drive WITH NO DISC IN IT - an empty drive - I could not get it to eject through any combination of "eject" commands, pushing a paper clip in the manual eject hole, etc.

However, at a command prompt...
$> lsof |grep gvfsd-cdd

I bet you will see /dev/sr0 (or whatever device your cd/dvd rom is).

Apparently a library that Grip uses (and probably other software as well) doesn't properly release the drive, even if you close Grip.

At a command prompt...
$> ps aux |grep gvfsd-cdd

If you are certain that the drive is empty and that it isn't doing anything useful, kill that process.

The eject button will again work.
EDDY1 and rkelson: I think you may have missed the first command of the two
Quote:
lsof |grep gvfsd-cdd
in my original message. I think it is an attempt to find out what process if any is locking the drive.

Last edited by Chris.Bristol; 02-07-2012 at 04:45 PM.
 
Old 02-07-2012, 05:52 PM   #19
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Chris.Bristol View Post
EDDY1 and rkelson: I think you may have missed the first command of the two in my original message. I think it is an attempt to find out what process if any is locking the drive.
This command

Code:
fuser /dev/sr0
will tell you what processes are using the drive. Of course, you need to put the right device node there if it isn't /dev/sr0.

Anyhow, you didn't answer my previous question:

Quote:
Originally Posted by rkelsen
Are you unmounting the drive before trying to eject the disc?
 
Old 02-07-2012, 07:23 PM   #20
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
rkelsen No, I didn't know how to do that. I've now looked it up and I've got a few ideas for commands to try:

umount /dev/sr0 (you mentioned sr0)
umount /dev/scd0 (scd0 appears in fstab)
umount /media/cdrom0 (cdrom0 appears in fstab)

Apart from once, it has been working today, but I'll try next time it gets stuck. The software is obviously trying to eject as I can hear it, would the software try to eject a disk even though it knew it was mounted, that seems illogical?

I've given some thought to cause and effect - I think that if the disk has something wrong with it the software gets locked into a loop which it can't get out of. Even after I have rebooted and removed the disk manually it will still be a problem. It seems to resolve itself spontaneously.

I will also go through my DVD-RWs and format them and chuck out any dodgy ones, which should lessen the problem in future, but may prompt the problem to happen now.

Last edited by Chris.Bristol; 02-07-2012 at 07:59 PM.
 
Old 02-07-2012, 08:27 PM   #21
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
You can't eject a disc which is still mounted.

Modern GUI interfaces will do both steps (i.e. umount and eject) with one click (eg: KDE's device notifier widget), but the drive will ignore it's eject button while a disc is mounted.
Quote:
Originally Posted by Chris.Bristol View Post
rkelsen No, I didn't know how to do that. I've now looked it up and I've got a few ideas for commands to try:

umount /dev/sr0 (you mentioned sr0)
umount /dev/scd0 (scd0 appears in fstab)
umount /media/cdrom0 (cdrom0 appears in fstab)
Part of your problem is that you don't know what device you're using. You need to figure that out. There are a gazillion ways of doing this.

The first 3 that come to mind:
Look at the output of dmesg
Look under /dev/
Look under /sys/block

I'd ignore anything in fstab, since that file is ignored for removable media. It could contain anything really.
 
Old 02-07-2012, 08:34 PM   #22
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
It's just got stuck again trying to eject an empty tray using K3B, so I tried unmounting it using the following commands:

Quote:
root@Asus:/home/chris# umount /dev/sr0
umount: /dev/sr0: not mounted
root@Asus:/home/chris# umount /dev/scd0
umount: /dev/scd0: not mounted
root@Asus:/home/chris# umount /media/cdrom0
umount: /media/cdrom0: not mounted
root@Asus:/home/chris#
I then used a paperclip to open the tray, then loaded a DVD-RW (that I had previously formatted successfully) and tried to write a file onto it with K3B. It errorred with this debugging output:

Quote:
Devices
-----------------------
ASUS DRW-1608P2S 1.37 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump] [%7]

K3b::IsoImager
-----------------------
mkisofs print size result: 1101 (2254848 bytes)

System
-----------------------
K3b Version: 2.0.1
KDE Version: 4.4.5 (KDE 4.4.5)
QT Version: 4.6.3
Kernel: 2.6.32-5-686

Used versions
-----------------------
mkisofs: 1.1.11
cdrecord: 1.1.11

cdrecord
-----------------------
/usr/bin/wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
SCSI buffer size: 64512
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
TOC Type: 1 = CD-ROM
Driveropts: 'burnfree'
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'ASUS '
Identification : 'DRW-1608P2S '
Revision : '1.37'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Current: 0x0013 (DVD-RW restricted overwrite)
Profile: 0x002B (DVD+R/DL)
Profile: 0x001B (DVD+R)
Profile: 0x001A (DVD+RW)
Profile: 0x0016 (DVD-R/DL layer jump recording)
Profile: 0x0015 (DVD-R/DL sequential recording)
Profile: 0x0014 (DVD-RW sequential recording) (current)
Profile: 0x0013 (DVD-RW restricted overwrite) (current)
Profile: 0x0012 (DVD-RAM)
Profile: 0x0002 (Removable disk)
Profile: 0x0011 (DVD-R sequential recording)
Profile: 0x0010 (DVD-ROM) (current)
Profile: 0x000A (CD-RW)
Profile: 0x0009 (CD-R)
Profile: 0x0008 (CD-ROM)
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Drive buf size : 1605632 = 1568 KB
FIFO size : 12582912 = 12288 KB
Speed set to 5540 KB/s
Track 01: data 2 MB
Total size: 2 MB (00:14.68) = 1101 sectors
Lout start: 2 MB (00:16/51) = 1101 sectors
Current Secsize: 2048
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.
Starting to write CD/DVD at speed 4.0 in real SAO mode for single session.
Last chance to quit, starting real write in 2 seconds.
1 seconds.
0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... Errno: 5 (Input/output error), reserve track scsi sendcmd: no error
CDB: 53 00 00 00 00 00 00 04 4D 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0E 00 00 00 00 72 05 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x72 Qual 0x05 (no more track reservations allowed) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.003s timeout 200s
/usr/bin/wodim: Cannot open new session.
input buffer ready.
Writing time: 0.095s
/usr/bin/wodim: fifo had 36 puts and 0 gets.
/usr/bin/wodim: fifo was 0 times empty and 0 times full, min fill was 100%.

cdrecord command:
-----------------------
/usr/bin/wodim -v gracetime=2 dev=/dev/sr0 speed=4 -sao driveropts=burnfree -data -tsize=1101s -

mkisofs
-----------------------
1101
I: -input-charset not specified, using utf-8 (detected in locale settings)
46.41% done, estimate finish Wed Feb 8 01:28:19 2012
Total translation table size: 0
Total rockridge attributes bytes: 261
Total directory bytes: 386
Path table size(bytes): 10
Max brk space used 0
1101 extents written (2 MB)

mkisofs calculate size command:
-----------------------
/usr/bin/genisoimage -gui -graft-points -print-size -quiet -volid chest of drawers -volset -appid K3B THE CD KREATOR (C) 1998-2010 SEBASTIAN TRUEG AND MICHAL MALEK -publisher -preparer -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-chris/k3bts2079.tmp -rational-rock -hide-list /tmp/kde-chris/k3bjQ2079.tmp -joliet -joliet-long -hide-joliet-list /tmp/kde-chris/k3bcO2079.tmp -no-cache-inodes -full-iso9660-filenames -iso-level 3 -path-list /tmp/kde-chris/k3bDL2079.tmp

mkisofs command:
-----------------------
/usr/bin/genisoimage -gui -graft-points -volid chest of drawers -volset -appid K3B THE CD KREATOR (C) 1998-2010 SEBASTIAN TRUEG AND MICHAL MALEK -publisher -preparer -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-chris/k3bQh2079.tmp -rational-rock -hide-list /tmp/kde-chris/k3bGW2079.tmp -joliet -joliet-long -hide-joliet-list /tmp/kde-chris/k3bcT2079.tmp -no-cache-inodes -full-iso9660-filenames -iso-level 3 -path-list /tmp/kde-chris/k3bpQ2079.tmp
I then ejected the disk with K3B without problem!
As a further test I:
- removed the disk.
- closed the empty tray with K3B - success.
- ejected the empty tray with K3b - stuck again!

Last edited by Chris.Bristol; 02-07-2012 at 08:39 PM.
 
Old 02-07-2012, 08:44 PM   #23
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
umount won't eject the disc. You need to use umount, then eject.

That output makes me think you might have a permissions problem.

Is your user in the cdrom group? Find out by running this command:

Code:
groups
Also, please post the output of this command:

Code:
ls -la /usr/bin/wodim
And this one too:

Code:
ls -la /dev/sr0

Last edited by rkelsen; 02-07-2012 at 08:51 PM.
 
Old 02-07-2012, 08:54 PM   #24
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
I realised that (too late of course!), but it possibly still proved that the problem was not caused by the disk being mounted. I have just done the unmount and eject commands with all three objects I mentioned above - it sticks.

I then tried:
chris@Asus:~$ groups
chris cdrom floppy audio dip video plugdev netdev bluetooth scanner
chris@Asus:~$
I think this means that I have the permissions so it's not a permissions problem.

I then tried:
chris@Asus:~$ ls -la /usr/bin/wodim
-rwxr-xr-x 1 root root 359108 Oct 18 2010 /usr/bin/wodim
chris@Asus:~$
and:
root@Asus:/home/chris# ls -la /dev/sr0
brw-rw----+ 1 root cdrom 11, 0 Feb 8 01:32 /dev/sr0
root@Asus:/home/chris#

This is an earlier suggestion of yours:
root@Asus:/home/chris# fuser /dev/sr0
root@Asus:/home/chris#

Last edited by Chris.Bristol; 02-07-2012 at 09:07 PM.
 
Old 02-07-2012, 10:06 PM   #25
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
From that output, we can conclude that your user does have correct permissions over the device. BUT your burning utility (wodim) isn't properly set up to burn discs as a user.

Log in as root (or switch user) and do this:

Code:
chmod +s /usr/bin/wodim
Then it should let you burn discs properly.

As to your ejecting problem, I've done some reading and it seems that HAL polling can disrupt the normal operation of some drives. If you want to try disabling it, you need to run this command:

Code:
hal-disable-polling --device /dev/sr0
If that doesn't solve the problem, then you can re-enable polling with this:

Code:
hal-disable-polling --enable-polling --device /dev/sr0
 
Old 02-07-2012, 10:45 PM   #26
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
root@Asus:/home/chris# chmod +s /usr/bin/wodim
root@Asus:/home/chris#

I assumed you'd want me to check the results:
root@Asus:/home/chris#
ls -la /usr/bin/wodim
-rwsr-sr-x 1 root root 359108 Oct 18 2010 /usr/bin/wodim
root@Asus:/home/chris#
I understand that this is changing permissions although I'm not quite sure what.

I also did the hal command, I've reset that though because after rebooting twice it worked with a disk in but then refused to eject an empty tray. Could the empty tray be relevant?
 
Old 02-07-2012, 11:04 PM   #27
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Chris.Bristol View Post
I understand that this is changing permissions although I'm not quite sure what.
It gives the wodim command escalated privileges so that it can communicate directly with the drive without requiring you to log in as root.
Quote:
Originally Posted by Chris.Bristol View Post
I also did the hal command, I've reset that though because after rebooting twice it worked with a disk in but then refused to eject an empty tray. Could the empty tray be relevant?
I dunno. I wouldn't rule out the possibility that you may have damaged the drive with a paperclip after all that.
 
Old 02-07-2012, 11:21 PM   #28
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
Quote:
I wouldn't rule out the possibility that you may have damaged the drive with a paperclip after all that.
lol! No it's not damaged it - there's a solid lump of plastic there. I'm sure it's a software problem for several reasons:
- it works most of the time
- it works without the ribbon cable
- I've had it before with a different PC and a different drive
- it happens mostly with an empty drive

Last edited by Chris.Bristol; 02-07-2012 at 11:23 PM.
 
Old 02-07-2012, 11:27 PM   #29
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,808

Rep: Reputation: 234Reputation: 234Reputation: 234
How is the drive jumpered? Is it on "Cable Select"? That can cause these kinds of odd behaviours. If so, try putting the jumper on Master and using the end connector of the ribbon cable.

Edit: If that doesn't work, I got nuthin' else.

Last edited by rkelsen; 02-07-2012 at 11:49 PM.
 
Old 02-08-2012, 05:08 PM   #30
Chris.Bristol
Member
 
Registered: Jul 2011
Distribution: elementary OS CrunchBang
Posts: 151

Original Poster
Rep: Reputation: 3
rkelson: I've taken out the cable select cable, put in a plain one and altered the drive jumpers from cable select to master and slave. I've also realised that I missed your message 21. I'll follow your suggestions therein.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD Writer won't burn DVD's spandey Linux - Hardware 7 01-13-2011 11:25 PM
Eject CD/DVD Media using Eject Button - Hal/Udev help v00d00101 Linux - Hardware 4 03-17-2008 04:04 PM
New DVD writer won't write; old dvd reader won't read. Tomermory Linux - Hardware 15 09-24-2007 12:20 PM
Cannot find DVD writer or get CD-writer to spin audio disk dgwebb Linux - Hardware 5 03-28-2005 06:00 PM


All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration