LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   CD write error: (https://www.linuxquestions.org/questions/linux-hardware-18/cd-write-error-925067/)

bastl 01-22-2012 06:51 AM

CD write error:
 
Brand new dvd-writer LG-DVDRAM GH22NS50

But it does not burn:
Quote:

bash-3.2# cdrecord dev=6,0,0 speed=4 -raw96r -overburn driveropts=burnfree /home/bastl/img.iso
Cdrecord-ProDVD-ProBD-Clone 3.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Joerg Schilling
scsidev: '6,0,0'
scsibus: 6 target: 0 lun: 0
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identifikation : 'DVDRAM GH22NS50 '
Revision : 'TN03'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
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/R16 RAW/R96P RAW/R96R LAYER_JUMP
cdrecord: Warning: DMA resid 0 for 'read buffer', actual data is too short.
cdrecord: Warning: The DMA speed test has been skipped.
Starting to write CD/DVD/BD at speed 4 in real RAW/RAW96R mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
cdrecord: WARNING: Drive returns wrong startsec (0) using -11634 from ATIP
cdrecord: Eingabe-/Ausgabefehler. write_g1: scsi sendcmd: no error
CDB: 2A 00 FF FF D3 5E 00 00 1A 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 2A 30 08 80 21 02 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x21 Qual 0x02 (invalid address for write) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.002s timeout 40s
write leadin data: error after 509184 bytes
cdrecord: Could not write Lead-in.
If you let the recorder continue writing (mybe dvd) after cdrecord breakes with this error, a dvd+r gets written pretty fine, dvd-r, cd-r not ???

business_kid 01-22-2012 10:16 AM

First, check the small print. Does the drive *do* dvd-r?

dvd+r and dvd-r are 2 different formats structurally different. There could be separate drives for them but usually not. There _are_ separate dvds for them. There are also a whole host of clever options to allow you to get over nearly everything. on dvd-r -dummy is a dry run option.

bastl 01-23-2012 04:01 PM

Quote:

Originally Posted by business_kid (Post 4581330)
First, check the small print. Does the drive *do* dvd-r?

Yes, (CD/DVD+-R/+-RW/DVD-RAM), but I did get only a dvd+r to burn at a maximum speed of less than 1x.

DVD-RAM works excellent.

What are the names of the drivers/modules cdrecord wants to use? Maybe I don't compiled them in the kernel or they aren't loaded.

But it also seams that cdrecord wants to controll the writing the same way this dvd-recorder wants controll the writing , too.
Maybe this recorder has a version of cdrecord in its embedded controller ??

Can I set cdrecord to only set the recorder into write mode and sent then the/a datastream to it via DMA with no care of what the recorder does, except errors of course?

teckk 01-23-2012 06:33 PM

My 2 cents.

For a DVD you may try
Code:

growisofs -dvd-compat -speed=8  -use-the-force-luke=tty -Z /dev/sr0=/path/to/img.iso
For a CD
Code:

wodim  speed=8  -tao dev=/dev/sr0 /path/to/img.iso
Code:

cdrecord dev=6,0,0 speed=4 /path/to/img.iso


From the man page
Code:

-overburn
Allow cdrecord to write more than the official size of a medium. This feature is usually called overburning and depends on the fact that most blank media may hold more space than the official size. As the official size of the lead-out area on the disk is 90 seconds (6750 sectors) and a disk usually works if there are at least 150 sectors of lead out, all media may be overburned by at least 88 seconds (6600 sectors). Most CD recorders only do overburning in SAO or RAW mode. Known exceptions are TEAC CD-R50S, TEAC CD-R55S and the Panasonic CW-7502. Some drives do now allow to overburn as much as you might like and limit the size of a CD to e.g. 76 minutes. This problem may be circumvented by writing the CD in RAW mode because this way the drive has no chance to find the size before starting to burn. There is no guarantee that your drive supports overburning at all. Make a test to check if your drive implements the feature.

Code:

burnfree
Turn the support for Buffer Underrun Free writing on. This only works for drives that support Buffer Underrun Free technology. This may be called: Sanyo BURN-Proof, Ricoh Just-Link, Yamaha Lossless-Link or similar.
The default is to turn BURN-Free off, regardless of the defaults of the drive.


business_kid 01-24-2012 01:28 AM

So
being incorrigible - not much sympathy.

Writing dvd+r @1x: usually the medium.
control - the software actually has control but that doesn't mean the drive likes it. It's a funny relationship. They are both trying to preserve unecessary dud disks.

bastl 01-24-2012 12:21 PM

Quote:

Originally Posted by business_kid (Post 4582826)
So
being incorrigible - not much sympathy.

Writing dvd+r @1x: usually the medium.
control - the software actually has control but that doesn't mean the drive likes it.
It's a funny relationship. They are both trying to preserve unecessary dud disks.


I only want to burn a simple CD !!!
Two years ago it worked all fine with k3b.
I thought it is the drive and bought this one (with DVD+-R DL support, both from LG -Super Multi writer) - NO
The mediums are from intenso the same when it did yet work.
Now I think I have to study how the writing of CDs work to get behind whats going wrong or
do you have any other hints?

business_kid 01-25-2012 12:37 PM

Have you tried DVDRTools

It's a fork from cdrecord with a standard make system and all the extra code junked, along with hysterical warnings on running linux: "This is dvdrtools, not dvdlibc"

bastl 01-26-2012 01:27 PM

Yes, with dvdrtools v0.3.1 its the same error.
And I now used different mediums - always the same error.

business_kid 01-26-2012 03:00 PM

I am beginning to think it's the drive.

A non standard drive can get away in windows with an m$ windows driver. Seagate did this in times past - disk drivers, and you couldn't get dma on linux. Mandrake (Now mandriva) had a 'disk drake' and it had a list of dodgy drives at the time. They couldn't get dma out of seagate drives (Back in the 90s) Presume things are better now.

There are a lot of weird little options in cdrecord. If you don't want to replace the drive, read the cdrecord man page - in installments if necessary. Make sure /dev/pg0 & /dev/sg0 point to the cd drive (symlinks to /dev/whatever). Run it with -vv and see what it says. Try anything that sounds like a good idea. He does give you an accurate commentary on the drive "seems reasonable"means it's normal

bastl 01-27-2012 04:07 PM

Yes, but not the way that it is broken, but more that it is used wrong by the (system) tools.
So the write error could be no write error but maybe a DMA request or so ?

My dvd-recorder is SATA (/dev/sr0)

Content of file
/sys/block/sr0/device
is:
Quote:

DVDRAM GH22NS50
Because of DVD-RAM functionality the write LASER must be correct adjusted.
And reading works also with all media. So the drive must be O.K..

Maybe I compiled something in the kernel that does interacts with the writing process?

???

business_kid 01-28-2012 03:11 AM

dma error - I don't know.
I have slowish boxes and dma is 50-65mb/s on hard drive. If you don't have that, compile in the correct chipset driver into the kernel and get generic out - in case it nabs the chip first.

access on cd/dvd devices is usually an awful lot slower, under 10 mb/s. write is slower again. You can read, you can write, just you want it to write faster, am I correct?

BTW I can write faster, but I don't - because I have had access to a tester (Used in cdrom manufacturing). 2 clear rules came accross.
1. the faster you read a cdrom, the more mistakes are made
2. the faster you write a cdr, the more mistakes are made.

bastl 01-29-2012 08:40 AM

Quote:

Originally Posted by business_kid (Post 4586542)
You can read, you can write, just you want it to write faster, am I correct?

It seams that I can not write mediums-R with the -R at the end (CD-R, DVD-R, DL-R).
And yes, +R writing is too slow and also breaks with this error, but DMA continues writing,
so DVD+R gets written with less than 1x speed.

O.K I'll check my kernel.

bastl 01-29-2012 10:55 AM

I can not find something wrong.

business_kid 01-30-2012 02:14 AM

Have you experimented with cdrecord's -raw*, mmc_*, & forcespeed options?

It might be interesting to do an cdrecord <drive> -inq >file and post that.

bastl 01-30-2012 03:03 PM

Yes, all the same.

Quote:

cdrecord dev=6,0,0 -inq
Cdrecord-ProDVD-ProBD-Clone 3.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Joerg Schilling
scsidev: '6,0,0'
scsibus: 6 target: 0 lun: 0
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identifikation : 'DVDRAM GH22NS50 '
Revision : 'TN03'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
If I compile SCSI generic support into the kernel i get this error:
Quote:

cdrecord -scanbus
Cdrecord-ProDVD-ProBD-Clone 3.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Joerg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open or use SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
So I think it is right to have it as module sg.
And if cdrecord can talk with my CD drive, like it can obviously (s.a.), it should work ???

Could there be a PAM problem? Maybe I shouldn't use PAM with cdrecord?

bastl 01-30-2012 03:14 PM

May be this can help:

cdrecord dev=6,0,0 -prcap >
Quote:

Cdrecord-ProDVD-ProBD-Clone 3.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Joerg Schilling
scsidev: '6,0,0'
scsibus: 6 target: 0 lun: 0
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'HL-DT-ST'
Identifikation : 'DVDRAM GH22NS50 '
Revision : 'TN03'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.

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
Does read digital audio blocks
Does restart non-streamed digital audio reads accurately
Does support Buffer-Underrun-Free recording
Does read multi-session CDs
Does read fixed-packet CD media using Method 2
Does not read CD bar code
Does not read R-W subcode information
Does read raw P-W subcode data from lead in
Does return CD media catalog number
Does return CD ISRC information
Does support C2 error pointers
Does not deliver composite A/V data

Does play audio CDs
Number of volume control levels: 256
Does support individual volume control setting for each channel
Does support independent mute setting for each channel
Does not support digital output on port 1
Does not support digital output on port 2

Loading mechanism type: tray
Does support ejection of CD via START/STOP command
Does not lock media on power up via prevent jumper
Does allow media to be locked in the drive via PREVENT/ALLOW command
Is not currently in a media-locked state
Does not support changing side of disk
Does not have load-empty-slot-in-changer feature
Does not support Individual Disk Present feature

Maximum read speed: 8467 kB/s (CD 48x, DVD 6x, BD 1x)
Current read speed: 8467 kB/s (CD 48x, DVD 6x, BD 1x)
Maximum write speed: 8468 kB/s (CD 48x, DVD 6x, BD 1x)
Current write speed: 8468 kB/s (CD 48x, DVD 6x, BD 1x)
Rotational control selected: CLV/PCAV
Buffer size in KB: 2048
Copy management revision supported: 1
Number of supported write speeds: 7
Write speed # 0: 8468 kB/s CLV/PCAV (CD 48x, DVD 6x, BD 1x)
Write speed # 1: 7057 kB/s CLV/PCAV (CD 40x, DVD 5x, BD 1x)
Write speed # 2: 5646 kB/s CLV/PCAV (CD 32x, DVD 4x, BD 1x)
Write speed # 3: 4235 kB/s CLV/PCAV (CD 24x, DVD 3x, BD 0x)
Write speed # 4: 2822 kB/s CLV/PCAV (CD 16x, DVD 2x, BD 0x)
Write speed # 5: 1411 kB/s CLV/PCAV (CD 8x, DVD 1x, BD 0x)
Write speed # 6: 706 kB/s CLV/PCAV (CD 4x, DVD 0x, BD 0x)

Current performance according to MMC get performance:
Write Performance:
START LBA: 0
End LBA: 359845
Start Perf: 3725 == 21x CD
END Perf: 8468 == 48x CD

Read Performance:
START LBA: 0
End LBA: 0
Start Perf: 0 == 0x CD
END Perf: 0 == 0x CD


Maximum performance according to MMC get performance:
End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 8468 == 48x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 7057 == 40x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 5646 == 32x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 4235 == 24x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 2822 == 16x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 1411 == 8x CD

End LBA: 359845
Read Speed: 8467 == 48x CD
Write Speed: 706 == 4x CD


Supported CD-RW media types according to MMC-4 feature 0x37:
Does write multi speed CD-RW media
Does write high speed CD-RW media
Does write ultra high speed CD-RW media
Does write ultra high speed+ CD-RW media

Supported profiles according to MMC-4 feature list:
Current: CD-R
Profile: DVD-RAM
Profile: DVD-R sequential recording
Profile: DVD-R/DL sequential recording
Profile: DVD-R/DL layer jump recording
Profile: DVD-RW sequential recording
Profile: DVD-RW restricted overwrite
Profile: DVD+RW
Profile: DVD+R
Profile: DVD+R/DL
Profile: DVD-ROM
Profile: CD-R (current)
Profile: CD-RW
Profile: CD-ROM
Profile: Removable Disk

Supported features according to MMC-4 feature list:
Feature: 'Profile List' (current) (persistent)
Feature: 'Core' (current) (persistent)
Feature: 'Morphing' (current) (persistent)
Feature: 'Removable Medium' (current) (persistent)
Feature: 'Write Protect'
Feature: 'Random Readable'
Feature: 'Multi Read'
Feature: 'CD Read'
Feature: 'DVD Read'
Feature: 'Random Writable'
Feature: 'Incremental Streaming Writable' (current)
Feature: 'Formattable'
Feature: 'Defect Management'
Feature: 'Restricted Overwrite'
Feature: 'DVD+RW'
Feature: 'DVD+R'
Feature: 'Rigid Restricted Overwrite'
Feature: 'CD Track at Once' (current)
Feature: 'CD Mastering' (current)
Feature: 'DVD-R/-RW Write'
Feature: 'Layer Jump Recording'
Feature: 'CD-RW Write' (current) (persistent)
Feature: 'DVD+R/DL Read'
Feature: 'Power Management' (current) (persistent)
Feature: 'S.M.A.R.T.'
Feature: 'CD Audio analog play'
Feature: 'Microcode Upgrade'
Feature: 'Time-out' (current) (persistent)
Feature: 'DVD-CSS'
Feature: 'Real Time Streaming' (current)
Feature: 'Logical Unit Serial Number' (current) (persistent) Serial: 'K2ZA7SM4127 '
Feature: 'Disk Control Blocks'
Feature: 'DVD CPRM'
Feature: 'Microcode Information' (current) (persistent)
Feature: 0x0113 (persistent)
Feature: 0xFFCE (current)

business_kid 01-31-2012 12:41 PM

Quote:

Current performance according to MMC get performance:
Write Performance:
START LBA: 0
End LBA: 359845
Start Perf: 3725 == 21x CD
END Perf: 8468 == 48x CD

Read Performance:
START LBA: 0
End LBA: 0
Start Perf: 0 == 0x CD
END Perf: 0 == 0x CD
I don't like that last set of figures :-(.
dev=6,0,0 is also weird. How many drives have you got? I'm normally 1,0,0

Translating from Schilling-speak, that's bus 6. Is there six scsi buses and does your cd only show on the 6th?

Have you /dev/pg0 & pg1) and /dev/sg0 & sg1? If not, make symlinks every time you reboot

bastl 01-31-2012 01:32 PM

dev=6,0,0 is /dev/sr0

Have a look on my cdrecord -scanbus:
Quote:

Cdrecord-ProDVD-ProBD-Clone 3.01a03 (i686-pc-linux-gnu) Copyright (C) 1995-2010 Joerg Schilling
Linux sg driver version: 3.5.34
Using libscg version 'schily-0.9'.
scsibus0:
0,0,0 0) 'ATA ' 'ST3500320AS ' 'SD15' Disk
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *
scsibus1:
1,0,0 100) 'ATA ' 'ST3500418AS ' 'CC34' Disk
1,1,0 101) *
1,2,0 102) *
1,3,0 103) *
1,4,0 104) *
1,5,0 105) *
1,6,0 106) *
1,7,0 107) *
scsibus6:
6,0,0 600) 'HL-DT-ST' 'DVDRAM GH22NS50 ' 'TN03' Removable CD-ROM
6,1,0 601) *
6,2,0 602) *
6,3,0 603) *
6,4,0 604) *
6,5,0 605) *
6,6,0 606) *
6,7,0 607) *
scsibus12:
12,0,0 1200) 'Generic ' 'USB SD Reader ' '1.00' Removable Disk
12,1,0 1201) *
12,2,0 1202) *
12,3,0 1203) *
12,4,0 1204) *
12,5,0 1205) *
12,6,0 1206) *
12,7,0 1207) *
Quote:

Have you /dev/pg0 & pg1
NO I don't have this nodes.
If you can give me major minor I could crate them

Quote:

/dev/sg0 & sg1
Is present

Make symlinks from sg to pg ?

bastl 01-31-2012 01:36 PM

Quote:

Read Performance:
START LBA: 0
End LBA: 0
Start Perf: 0 == 0x CD
END Perf: 0 == 0x CD
It could be the wrong written CD in the drive I forgot to take out ?

cascade9 02-01-2012 03:04 AM

Its a SATA burner, right?

I've never got any problems quite like what you are getting bastl, but I have had odd issues with SATA CD/DVD drives being used in 'IDE mode' (or 'legacy mode').

You could try changing to SATA mode, and see if that helps.

Warning! If you have win2k/winXP installed an havent gone though the whole 'adding SATA drivers during the install process' changing the HDD/CD/DVD drives from 'IDE' to 'SATA' will make windows fail to boot. As long as you dont try to boot windows, and change the mode back before you do boot windows, everything should be fine. Linux should have no problems booting from IDE mode, SATA mode, or changing modes between boots.

business_kid 02-01-2012 03:05 AM

As for sg0 & pg0, symlinks are fine, in fact unnecessary. I don't have pg* but do have sg0 & sg1 and never had a problem. It does make the cd more visible to cdrecord, as you will see if you add symlinks. It's more Schilling-speak, and my comments on that should be moderated on any decent mailing list :-).

bastl 02-01-2012 11:41 AM

Quote:

Originally Posted by cascade9 (Post 4590189)
Its a SATA burner, right?
You could try changing to SATA mode, and see if that helps.

Yes, SATA.
What do you mean with changing to SATA mode ?

Quote:

Originally Posted by business_kid
I don't have pg* but do have sg0 & sg1

Maybe the driver module sg wants sg* named nodes and dosen't uses others ?
Just one moment I'll dry it ...
- sg0 is a char device and sr0 (my burner) is a block device ?? ...
- mknod --mode=660 sg0 c 11 0

Damn, No:
Quote:

Sending CUE sheet...
cdrecord: WARNING: Drive returns wrong startsec (0) using -150
Writing pregap for track 1 at -150
Starting new track at sector: 0
Track 01: 0 of 687 MB written.cdrecord: Eingabe-/Ausgabefehler. write_g1: scsi sendcmd: no error
CDB: 2A 00 00 00 01 17 00 00 1F 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 2A 00 00 80 30 05 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x30 Qual 0x05 (cannot write medium - incompatible format) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.004s timeout 200s

write track data: error after 571392 bytes
cdrecord: A write error occured.
cdrecord: Please properly read the error message above.
Writing time: 25.354s
Average write speed 185,6x.
Fixating...
WARNING: Some drives don't like fixation in dummy mode.
Fixating time: 8.917s
cdrecord: fifo had 73 puts and 10 gets.
cdrecord: fifo was 0 times empty and 2 times full, min fill was 92%.

cascade9 02-02-2012 01:33 AM

Quote:

Originally Posted by bastl (Post 4590689)
Yes, SATA.
What do you mean with changing to SATA mode ?

In your BIOS you can set SATA devices to be used as SATA (normally 'ACHI mode' or 'native SATA') or you can set them to use an IDE compatibility mode ('IDE mode' or 'legacy mode').

You might already be using native SATA mode, its just something that is worth checking, and trying SATA mode if you arent using it now.

bastl 02-02-2012 10:20 AM

I can set it to 'SATA -> AHCI', 'RAID', 'native IDE' or 'legacy IDE' mode.
But the error stays the same.
It is the same error with my old P-ATA burner, the cause I bought this new one.
It suddenly did break with this error.

business_kid 02-02-2012 11:37 AM

At this stage you should get one of your mates to try it and see how it goes. Just divide & conquer. Too many posts here, and you're getting nowhere.

cascade9 02-03-2012 02:46 AM

Quote:

Originally Posted by bastl (Post 4591801)
I can set it to 'SATA -> AHCI', 'RAID', 'native IDE' or 'legacy IDE' mode.
But the error stays the same.
It is the same error with my old P-ATA burner, the cause I bought this new one.
It suddenly did break with this error.

If you got the problem with the old PATA burner, have changed to a new SATA burner and are still getting the problem, IMO it is software.

business_kid is right, testing the burner(s) in a different machine is easier than trying to work though all the possible software problems.

You could also try loading a liveCD and burning a CD/DVD from the live CD (given 2 CD/DVD drives). Or making a USB flash drive linux distro install and doing a test burn from there.

bastl 02-03-2012 05:50 AM

O.K. I'll try.
I also think it is a software problem. I must have changed something and don't know what.


All times are GMT -5. The time now is 11:33 AM.