wodim doesn't find my DVD writer

Bug #1203559 reported by Nigel Horne
98
This bug affects 20 people
Affects Status Importance Assigned to Milestone
cdrkit (Ubuntu)
Confirmed
High
Unassigned

Bug Description

wodim --devices gives:

wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: wodim 9:1.1.11-2ubuntu3
ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
Uname: Linux 3.8.0-26-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Sun Jul 21 14:48:41 2013
InstallationDate: Installed on 2013-05-25 (57 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: cdrkit
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nigel Horne (njh-bandsman) wrote :
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

wodim does that for me too. Try this (substitute your drive name for sr0)

wodim dev=/dev/sr0 -checkdrive

If it works, you can set cdrom= /dev/sr0 in /etc/wodim.conf

Revision history for this message
Nigel Horne (njh-bandsman) wrote : Re: [Bug 1203559] Re: wodim doesn't find my DVD writer

On 22/07/2013 00:55, Daniel Letzeisen wrote:
> wodim does that for me too. Try this (substitute your drive name for
> sr0)
>
> wodim dev=/dev/sr0 -checkdrive

I get this:

Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identification : 'DVD-RAM GH40L '
Revision : '1.04'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R96R
Why does it clam to be a CD-ROM not DVD writer in the Device type?

If it works, you can set cdrom= /dev/sr0 in /etc/wodim.conf

Thanks.

-Nigel

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Put a writable dvd in the drive and try again...

mmc_dvd
                     The generic SCSI-3/mmc-2 DVD-R/DVD-RW driver is auto-selected whenever wodim finds a MMC-2 or MMC-3
                     compliant drive that supports to write DVDs and an appropriate medium is loaded.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cdrkit (Ubuntu):
status: New → Confirmed
Revision history for this message
Schily (schilling-fokus) wrote :

You are not using recent original software but something that is unmaintained since
May 2007. Do not expect to get any help for this dead code as the people behind it
stopped even answering to bug reports many yearsa ago.

I recommend you to upgrade to recent original software from:

ftp://ftp.berlios.de/pub/cdrecord/alpha/

Revision history for this message
Nigel Horne (njh-bandsman) wrote :

On 30/11/13 06:54, Schily wrote:
> You are not using recent original software but something that is unmaintained since
> May 2007. Do not expect to get any help for this dead code as the people behind it
> stopped even answering to bug reports many yearsa ago.
>
> I recommend you to upgrade to recent original software from:
>
> ftp://ftp.berlios.de/pub/cdrecord/alpha/
>

I am using the latest version, apt-get upgrade doesn't give me any new
version to pick.

-Nigel

Revision history for this message
Saikat Banerjee (banskt-saikat) wrote :

More info about the bug:

running wodim with strace shows that it tries to open all the drives /dev/hda through /dev/hdz, then everything from /dev/scd0 through /dev/scd255, and then it quits.

$ strace wodim --devices
http://pastebin.com/7AXsRa4s

If, however, I specify the path, then it is recognised.
$ wodim dev=/dev/sr0 --devices

wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
 0 dev='/dev/sr0' rwrw-- : 'HL-DT-ST' 'DVDRAM GH22NS50'
-------------------------------------------------------------------------

^^^ But this appears silly. :)

- banskt

Revision history for this message
Sam Mingolelli (k-launchpad-jake8us-org) wrote :

Ran into the same problem on Fedora 19. The posted workaround worked there too:

$ wodim dev=/dev/sr0 --devices

As an alternative that always worked was to use `-prcap` instead though.

$ wodim -prcap
wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/sr0
Using /dev/cdrom of unknown capabilities
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-7930H '
Revision : '1.D1'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.

Drive capabilities, per MMC-3 page 2A:

  Does read CD-R media
  Does write CD-R media
  Does read CD-RW media
  Does write CD-RW media
  Does read DVD-ROM media
  Does read DVD-R media
  Does write DVD-R media
  Does read DVD-RAM media
  Does write DVD-RAM media
  Does support test writing

  Does read Mode 2 Form 1 blocks
  Does read Mode 2 Form 2 blocks
 ...

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Still the same in trusty

tags: added: trusty
Changed in cdrkit (Ubuntu):
importance: Undecided → High
Revision history for this message
Vincent Gerris (vgerris) wrote :

Same issue here. What is even more disturbing is that I am pretty sure that I could just burn to external USB dvd writers before.
Somehow I can't anymore with either Brasero or disc burner.
As a workaround I did the following:
add :
wodim dev=/dev/sr0 --devices
to /etc/wodim.conf
Use this command to burn:
wodim -v -sao dev=/dev/sr0 Downloads/ubuntu-14.04.1-desktop-amd64.iso

Both brasero and disk burner (right click on iso from nautilus file browser) seem to think the writer is read only.
It would be great if that can be fixed.

Revision history for this message
Marco Kern (enkl4ve) wrote :

Hey everybody,

Research took me to 2 promising end - 1 of which was you guys over here and the other one the probably well known README.ATAPI stuff. after shortly reading into README.ATAPI i was quite shure that it could not handle my actual problem simply due to its release date and the fact, that in newer articles about cdrkit and wodim it didnt get mentioned anymore (also my brasero was never out of order by any means - i was always able to use that prog to its full functionality, just when i started to get inetrested in burning via terminal i even realized sth is probably not 100% in place). I still read through most of it, just for the sake of knowledge.(without learning that much sadly i am pretty new to the world of linux). Since i was anyway about to format and resetup my notebook, i wanted to give 1 thing a shot.

i created a softlink /etc/cdrw -> /etc/sr0 (my actual disk drive) after realizing that /etc/cdrom exactly such a link.
in /etc/wodim.conf i changed the value of CDR_DEVICE from cdrom to cdrw and i set cdrw=/dev/sr0.
That worked out perfectly wodim finally did his duties.

i am very sorry in case i am not telling anybody anything usefull, i was not sure whether to post at all, since my brasero and file manager never occured to have a problem, also the topic is not the latest. My wodim situation however was 100% identical to what you explained.

Revision history for this message
Marco Kern (enkl4ve) wrote :

excuse my bad english, and my poor spelling and such. It has been quite a long night for me.

Revision history for this message
Artúr (ikartur) wrote :

Hi,

I have made a patch to make wodim detect devices correctly.

Wodim was searching for devices under /dev/scd*, but that path is considered deprecated and are no longer present on modern installations.
The correct path for the CDROM devices is /dev/sr*. By changing wodim to search devices at that place resolved the problem.

I have sent this patch upstream too:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=495184

How to test:
Create a directory and download the provided patch in it, then run the following commands:

$ sudo apt-get build-dep wodim
$ apt-get source wodim
$ cd cdrkit-*
$ patch -p1 <../scsi-linux-sg.c.diff
$ dpkg-buildpackage
$ sudo dpkg -i ../wodim*.deb

Regards,
Artúr

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "scsi-linux-sg.c.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Ray Maslinski (ray-maslinski) wrote :

The change of device name should probably also be accompanied by an update to the check_linux_26 function defined in the same scsi-linux-sg.c file, which doesn't appear to deal with kernel major versions > 2:

BOOL check_linux_26() {
        int gen, tmp;
        struct utsname buf;
        return ( 0==uname( &buf ) && sscanf(buf.release, "%d.%d", &gen, &tmp)>1
&& tmp>=6);
}

Note that the check is only looking for the minor version > 6, so the behavior will revert to pre-2.6 device selection for kernel versions 3.0-3.5, 4.0-4.5, etc.

The pre-2.6 behavior uses /dev/sg* devices instead of /dev/scd* (or /dev/sr* with the previously attached patch), probably due to lack of support required in earlier driver versions. While this will probably work most of the time, I think there may be a potential for contention with other applications using the device, as there doesn't appear to be a locking mechanism across the /dev/sg* and /dev/sr* devices. This could allow (for example) an audio player using a /dev/sr* device to interfere with wodim if it's using /dev/sg* for access. Using the same device driver for all access to the cd device should allow for appropriate locking to prevent concurrent access. There's a warning in the code to this effect, though it seems to be disabled:

                                case(SG):
                                        {
                                                if(check_linux_26())
                                                        continue;
#if 0
                                                /*
                                                 * Don't touch it on 2.6 until w
e have a proper locking scheme
                                                 */
                                                        if(nopen<=0)
                                                                fprintf(stderr,
"Warning, using /dev/sg* for SG_IO operation. This method is considered harmful.
\n");
                                                        else if(found_scd)
                                                                continue;
#endif
                                                pattern="/dev/sg%d";
                                                first=0;
                                                last=255;
                                                break;
                                        }

There are a few other places referencing check_linux_26 beyond device selection, presumably these would also behave more correctly with newer kernels with a revised version check.

Revision history for this message
Ion_nsk_region (ion-nsk-region) wrote :

Patch by Artúr (ikartur) works for me well. OS: Linux Mint 17 Qiana (based on Ubuntu 14.04.1 LTS) x86_64
It is also required to enable repository with sources before "apt-get source wodim" command.
The additional dependencies I have had to install:
  dpkg-dev
  build-essential:native
  debhelper
  libbz2-dev
  cmake
  libcap2-dev
  libmagic-dev

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.