buggraveman - Bugs: bug #12979, Missing device parameter when...

 
 

bug #12979: Missing device parameter when calling dvdrwtools

Submitted by:  Thomas Zajic <ZlatkO>
Submitted on:  Thu 05 May 2005 10:28:21 AM UTC  
 
Severity: 3 - NormalStatus: None
Assigned to: NoneOriginator Name: ZlatkO
Open/Closed: OpenRelease: 0.3.11
Fixed Release: Nonecdrecord version: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 29 May 2005 04:26:44 PM UTC, comment #5:

Correction to 3.2. from my previous update: graveman doesn't pass /dev/sg4 to dvd+rw-format, but (null) again. Here's the corresponding debug output:

    • (graveman:9144): DEBUG: execution [/usr/local/bin/dvd+rw-format -gui (null)]
    • (graveman:9144): DEBUG: deb => [/dev/hda1 / ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda1]
    • (graveman:9144): DEBUG: deb => [proc /proc proc rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [proc]
    • (graveman:9144): DEBUG: deb => [/dev/hda3 /usr ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda3]
    • (graveman:9144): DEBUG: deb => [/dev/hda5 /var ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda5]
    • (graveman:9144): DEBUG: deb => [/dev/hda6 /opt ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda6]
    • (graveman:9144): DEBUG: deb => [/dev/hda7 /home ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda7]
    • (graveman:9144): DEBUG: deb => [/dev/hda8 /tmp ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda8]
    • (graveman:9144): DEBUG: deb => [/dev/hda9 /usr/local ext3 rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [/dev/hda9]
    • (graveman:9144): DEBUG: deb => [none /dev/pts devpts rw,gid=5,mode=620 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [none]
    • (graveman:9144): DEBUG: deb => [none /proc/bus/usb usbdevfs rw 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [none]
    • (graveman:9144): DEBUG: deb => [automount(pid3593) /mnt/auto/misc autofs rw,fd=5,pgrp=3593,minproto=2,maxproto=3 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [automount]
    • (graveman:9144): DEBUG: deb => [automount(pid3595) /mnt/auto/nfs/airframe autofs rw,fd=5,pgrp=3595,minproto=2,maxproto=3 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [automount]
    • (graveman:9144): DEBUG: deb => [airframe:/mnt/storage/mp3 /mnt/auto/nfs/airframe/mp3 nfs rw,noexec,nosuid,nodev,rsize=8192,wsize=8192,soft,intr,addr=192.168.1.3 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [airframe]
    • (graveman:9144): DEBUG: deb => [airframe:/mnt/storage/archive /mnt/auto/nfs/airframe/archive nfs rw,noexec,nosuid,nodev,rsize=8192,wsize=8192,soft,intr,addr=192.168.1.3 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [airframe]
    • (graveman:9144): DEBUG: deb => [airframe:/mnt/storage/media /mnt/auto/nfs/airframe/media nfs rw,noexec,nosuid,nodev,rsize=8192,wsize=8192,soft,intr,addr=192.168.1.3 0 0]
    • (graveman:9144): DEBUG: comp de [/dev/sr0] et [airframe]
    • (graveman:9144): DEBUG: ===>* DVD\xb1RW/-RAM format utility by <appro@fy.chalmers.se>, version 4.10.
    • (graveman:9144): DEBUG: oui une erreur [256]

This is for the device I added manually to ~/.config/graveman.conf, here's the corresponding entry ...

[lecteur]
dev=MANU|/dev/sr0
actu=0
name=_NEC DVD_RW ND-3520A Removable CD-ROM [SR]
type=55
vitesse=32
vitessedvd=0
manual=1

... and here's the entry I added for /dev/sg4, which works fine with cdrdao:

[lecteur]
dev=MANU|/dev/sg4
actu=0
name=_NEC DVD_RW ND-3520A Removable CD-ROM [SG]
type=55
vitesse=32
vitessedvd=0
manual=1

Thomas Zajic <ZlatkO>
Sun 29 May 2005 02:57:58 PM UTC, comment #4:

Short update:

1. I solved the sg device mapping problem by running 'graveman -s' ('File -> Preferences -> Devices -> Scan again for devices' works too). Now the sg devices are correct again. So far, so good. :-)

2. I manually added a "new" device for my DVD writer, specifying /dev/sg4 as a location. Now cdrdao is happy when I select this "new" device as the writer, and I can do everything that uses cdrdao as a backend (disclaimer: I only tried blanking a CD-RW so far, though). Even farther, even better. :-)

3. I tried the same trick with /dev/sr0 for dvd+rw-tools, but failed so far:

3.1. First, the GUI refused to let me add /dev/sr0. The debug output showed that it used 'cdrecord -prcap dev=/dev/sr0' to find out whether the device is valid or not - which is rather pointless, as I was not going to use this device with cdrecord anyway. Moreover, cdrecord is not the only backend used by graveman, and almost every backend seems to insist on a different device notation - so instead of relying on a single instance (cdrecord), graveman should at least try similar checks for all backends it uses, and accept the device if at least one of the backends accepts it.

3.2. To overcome this, I manually added the device to ~/.config/graveman.conf, which worked, and graveman didn't complain. But when I tried to format a DVD-RW, the debug output showed that graveman (for some reason I don't quite understand) still passes /dev/sg4 instead of /dev/sr0 to dvd+rw-format, although I had my manually added /dev/sr0 writer selected as a writer device. :-/

How about the following: graveman already has the possibility to add special parameters to its external programs - why not add the possibility to tell graveman which specific reader and/or writer devices to use for each external program? These could simply be set to whatever graveman autodetects by default (as it already does now), and changed by the user if autodetection fails (as it already does now, at least for me ;-).

Thomas Zajic <ZlatkO>
Fri 20 May 2005 08:25:37 AM UTC, comment #3:

I just found out that the --enable-linux-ide option has absolutely no effect. No matter whether I use "--disable-linux-ide" or "--enable-linux-ide=no", it is always enabled. Running ./configure always says "checking for linux-ide device support... yes (auto)", and in config.log it says:

[...]
configure:6775: checking for linux-ide device support
configure:6784: result: yes (auto)
[...]

:-(

Thomas Zajic <ZlatkO>
Fri 20 May 2005 08:02:13 AM UTC, comment #2:

It still doesn't work, unfortunately. From the debug output it seems that graveman is actually using proper device names instead of "(null)" now, but it executes external programs with the wrong devices and/or the wrong device notation.

This is from trying to erase a CD-RW. It calls cdrdao with "--device 1,0,0", which cdrdao doesn't seem to like (I'm running a 2.4 kernel if that matters, BTW), and dvd+rw-mediainfo with "/dev/sg5", which it doesn't seem to like either:

[zlatko@disclosure]:~$ graveman

    • Message: une conf [/home/zlatko/.config/graveman/graveman.conf] valide trouve !

[...]

    • (graveman:16613): DEBUG: le premier avant le dvd [0]
    • (graveman:16613): DEBUG: execution de [/usr/local/bin/dvd+rw-mediainfo /dev/sg5]
    • (graveman:16613): DEBUG: oui une erreur [256]
    • (graveman:16613): DEBUG: Lu => []
    • (graveman:16613): DEBUG: le deuxieme avant le cd [0]
    • (graveman:16613): DEBUG: execution de [/usr/local/bin/cdrdao disk-info --device 1,0,0]
    • (graveman:16613): DEBUG: oui une erreur [256]
    • (graveman:16613): DEBUG: [0] la troisieme apres tout [0]
    • (graveman:16613): DEBUG: le premier avant le dvd [0]
    • (graveman:16613): DEBUG: execution de [/usr/local/bin/dvd+rw-mediainfo /dev/sg5]
    • (graveman:16613): DEBUG: oui une erreur [256]
    • (graveman:16613): DEBUG: Lu => []
    • (graveman:16613): DEBUG: le deuxieme avant le cd [0]
    • (graveman:16613): DEBUG: execution de [/usr/local/bin/cdrdao disk-info --device 1,0,0]
    • (graveman:16613): DEBUG: oui une erreur [256]

[...]

This goes on until I hit the "Cancel" button. When running the external programs from the command line, it turns out that cdrdao prefers the /dev/sg notation, while dvd+rw-mediainfo wants a block device:

[zlatko@disclosure]:~$ cdrdao disk-info --device 1,0,0
Cdrdao version 1.2.0 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

ERROR: Cannot open SCSI device '1,0,0': Cannot open '/dev/scd1'
Supported SCSI transports for this platform:

Transport name: sg
Transport descr.: Generic transport independent SCSI
Transp. layer ind.:
Target specifier: bus,target,lun
Target example: 1,2,0
SCSI Bus scanning: supported
Open via UNIX device: not supported
[...]
ERROR: Please use option '--device [proto:]bus,id,lun', e.g. --device 0,6,0 or --device ATA:0,0,0
ERROR: Cannot setup device 1,0,0.

Although cdrdao itself says it wants the "bus,id,lun" notation, it actually doesn't work. This might be a bug in cdrdao - it does work fine when specifying the sg device directly, though:

[zlatko@disclosure]:~$ cdrdao disk-info --device /dev/sg1
Cdrdao version 1.2.0 - (C) Andreas Mueller <andreas@daneb.de>
SCSI interface library - (C) Joerg Schilling
Paranoia DAE library - (C) Monty

Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables.

Using libscg version 'schily-0.8'

/dev/sg1: _NEC DVD_RW ND-3520A Rev: 1.04
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

That data below may not reflect the real status of the inserted medium
if a simulation run was performed before. Reload the medium in this case.

CD-RW : yes
Total Capacity : n/a
CD-R medium : Mitsubishi Chemical Corporation
Long Strategy Type, e.g. Cyanine
Recording Speed : 0X - 4X
CD-R empty : no
Toc Type : CD-DA or CD-ROM
Sessions : 1
Last Track : 1
Appendable : no

And here's the same thing for dvd+rw-mediainfo:

[zlatko@disclosure]:~$ /usr/local/bin/dvd+rw-mediainfo /dev/sg5
/dev/sg5: unable to open: Block device required
[zlatko@disclosure]:~$ /usr/local/bin/dvd+rw-mediainfo /dev/sr0
INQUIRY: [_NEC ][DVD_RW ND-3520A ][1.04]
GET [CURRENT] CONFIGURATION:
Mounted Media: 14h, DVD-RW Sequential
Media ID: MCC 01RW11n9
Current Write Speed: 1.0x1385=1411KB/s
Write Speed #0: 6.1x1385=8467KB/s
Write Speed #1: 5.1x1385=7056KB/s
Write Speed #2: 4.1x1385=5645KB/s
Write Speed #3: 3.1x1385=4234KB/s
Write Speed #4: 2.0x1385=2822KB/s
Write Speed #5: 1.0x1385=1411KB/s
GET [CURRENT] PERFORMANCE:
Write Performance: 2.0x1385=2770KB/s@[0 -> 1992589]
Speed Descriptor#0: 00/1992589 R@5.0x1385=6925KB/s W@2.0x1385=2770KB/s
Speed Descriptor#1: 03/1992589 R@1.0x1385=1385KB/s W@1.0x1385=1385KB/s
READ DVD STRUCTURE[#10h]:
Media Book Type: 32h, DVD-RW book [revision 2]
Legacy lead-out at: 2298496*2KB=4707319808
READ DVD STRUCTURE[#0h]:
Media Book Type: 32h, DVD-RW book [revision 2]
Last border-out at: 1992589*2KB=4080822272
READ DISC INFORMATION:
Disc status: complete
Number of Sessions: 1
State of Last Session: complete
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: complete
Track Start Address: 0*2KB
Free Blocks: 0*2KB
Track Size: 1992589*2KB
Last Recorded Address: 1992588*2KB
FABRICATED TOC:
Track#1 : 14@0
Track#AA : 14@1992589
Multi-session Info: #1@0
READ CAPACITY: 1992589*2048=4080822272

There are two things worth of notice here. First, although both my DVD-RW and DVD-ROM drives are IDE drives, I use them as SCSI devices with the ide-scsi module - thus they are /dev/sr0 (/dev/scd0) and /dev/sr1 (/dev/scd1) instead of /dev/hdc and /dev/hdd. Second, graveman obviously gets the sg device mapping wrong. The /dev/sg5 that it is trying to feed to dvd+rw-mediainfo is actually my USB flash card reader. :-)

Here's the output of sg_map from the sg3_utils package (see http://sg.torque.net/sg/u_index.html), the contents of /proc/scsi/scsi and, as requested, the contents of /proc/sys/dev/cdrom/info:

[root@disclosure]:~# sg_map
/dev/sg0 /dev/sda
/dev/sg1 /dev/scd0
/dev/sg2 /dev/scd1
/dev/sg3 /dev/sdb
/dev/sg4 /dev/sdc
/dev/sg5 /dev/sdd
/dev/sg6 /dev/sde

[root@disclosure]:~# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: OLYMPUS Model: u-miniD,Stylus V Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: _NEC Model: DVD_RW ND-3520A Rev: 1.04
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: TOSHIBA Model: ODD-DVD SD-M1802 Rev: J031
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: SMSC Model: 223 U HS-CF Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: SMSC Model: 223 U HS-MS Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 02
Vendor: SMSC Model: 223 U HS-SM Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 03
Vendor: SMSC Model: 223 U HS-SD/MMC Rev: 1.95
Type: Direct-Access ANSI SCSI revision: 02

[root@disclosure]:~# cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.12 2000/10/18

drive name: sr1 sr0
drive speed: 48 32
drive # of slots: 1 1
Can close tray: 1 1
Can open tray: 1 1
Can lock tray: 1 1
Can change speed: 1 1
Can select disk: 0 0
Can read multisession: 1 1
Can read MCN: 1 1
Reports media changed: 1 1
Can play audio: 1 1
Can write CD-R: 0 1
Can write CD-RW: 0 1
Can read DVD: 1 1
Can write DVD-R: 0 1
Can write DVD-RAM: 0 0

I'll try to compile graveman with "--disable-linux-ide" on the weekend, and see if this fixes the IDE <-> SCSI and/or sg mapping problem.

Thomas Zajic <ZlatkO>
Wed 18 May 2005 08:04:59 AM UTC, comment #1:

Hi,

Can you test again with graveman 0.3.12 ?

If it doesn't works can you type "cat /proc/sys/dev/cdrom/info"
and send me output ?

Thanks,
Sylvain

sylvain cresto <scresto>
Project Administrator
Thu 05 May 2005 10:28:21 AM UTC, original submission:

Graveman does not pass a device parameter when calling dvd+rw-format externally. As the greater part of the code, variables and comments are in French, I can't figure out when dvd+rw-mediainfo is called, so I can't check whether the problem exists there as well.

My DVD-ROM and DVD-RW drives are detected just fine, and graveman does pass a proper device parameter when calling cdrecord and cdrdao externally - it's just the external calls to dvd+rw-format (and probably dvd+rw-mediainfo) that don't work.

Here's the output of graveman compiled with --enable-debug when trying to format a DVD-RW (it doesn't matter which of the three available blanking methods I select, the error is always the same):

[zlatko@disclosure]:~/usrlocal/src/graveman-0.3.11/src$ ./graveman

    • Message: une conf [/home/zlatko/.config/graveman/graveman.conf] valide trouve !

[...]

    • (graveman:13075): DEBUG: execution [/usr/local/bin/dvd+rw-format -gui -blank (null)]
    • (graveman:13075): DEBUG: ===>* DVD\xb1RW/-RAM format utility by <appro@fy.chalmers.se>, version 4.10.
    • (graveman:13075): DEBUG: oui une erreur [256]

[...]

Note the "(null)" parameter! Under File -> Preferences -> Devices, my DVD-RW drive is properly detected under "Location: 1,0,0", the corresponding device node should be /dev/sr0, /dev/scd0, /dev/sg4, /dev/cdrw, /dev/dvdr or /dev/dvdrw (either of which would work in my case).

Thomas Zajic <ZlatkO>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup