growisofs -speed parameter has no effect

Bug #1654392 reported by Travisgevans
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dvd+rw-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

growisofs apparently ignores the -speed parameter when burning a DVD ISO regardless of the given value or the supported writing speeds.

———
$ dvd+rw-mediainfo /dev/dvd
INQUIRY: [HP ][DVD Writer 1270d][GH24]
GET [CURRENT] CONFIGURATION:
 Mounted Media: 1Bh, DVD+R
 Media ID: MBIPG101/R05
 Current Write Speed: 16.0x1385=22160KB/s
 Write Speed #0: 16.0x1385=22160KB/s
 Write Speed #1: 12.0x1385=16620KB/s
 Write Speed #2: 8.0x1385=11080KB/s
 Write Speed #3: 6.0x1385=8310KB/s
 Speed Descriptor#0: 00/2295103 R@16.0x1385=22160KB/s W@16.0x1385=22160KB/s
READ DVD STRUCTURE[#0h]:
 Media Book Type: 00h, DVD-ROM book [revision 0]
 Legacy lead-out at: 2295104*2KB=4700372992
READ DISC INFORMATION:
 Disc status: blank
 Number of Sessions: 1
 State of Last Session: empty
 "Next" Track: 1
 Number of Tracks: 1
READ TRACK INFORMATION[#1]:
 Track State: blank
 Track Start Address: 0*2KB
 Next Writable Address: 0*2KB
 Free Blocks: 2295104*2KB
 Track Size: 2295104*2KB
 ROM Compatibility LBA: 270336
READ CAPACITY: 0*2048=0

$ growisofs -speed 12 -dvd-compat -Z /dev/dvd=dvd1.iso
Executing 'builtin_dd if=dvd1.iso of=/dev/dvd obs=32k seek=0'
/dev/dvd: "Current Write Speed" is 16.4x1352KBps.
          0/4621449216 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0%
          0/4621449216 ( 0.0%) @0x, remaining ??:?? RBU 100.0% UBU 0.0%
[…]
 4328620032/4621449216 (93.7%) @15.6x, remaining 0:20 RBU 100.0% UBU 99.3%
 4393402368/4621449216 (95.1%) @14.0x, remaining 0:16 RBU 100.0% UBU 99.3%
 4466507776/4621449216 (96.6%) @15.8x, remaining 0:10 RBU 100.0% UBU 99.0%
 4527161344/4621449216 (98.0%) @13.1x, remaining 0:06 RBU 100.0% UBU 15.4%
 4601151488/4621449216 (99.6%) @16.0x, remaining 0:01 RBU 60.5% UBU 99.0%
builtin_dd: 2256576*2KB out @ average 10.4x1352KBps
/dev/dvd: flushing cache
/dev/dvd: closing track
/dev/dvd: closing disc
/dev/dvd: reloading tray
———

Same result with -speed=8 or -speed 8: Instead of using the specified speed (listed as supported by dvd+rw-mediainfo), it uses 16x instead.

With the same media and drive, setting speed *does* when using wodim (e.g., `wodim -v -dao speed=8 dvd1.iso` does write at 8x), so it isn't simply a drive/media issue.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: growisofs 7.1-11
ProcVersionSignature: Ubuntu 4.4.0-43.63-generic 4.4.21
Uname: Linux 4.4.0-43-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Thu Jan 5 14:31:16 2017
Dependencies:
 gcc-5-base 5.4.0-6ubuntu1~16.04.4
 gcc-6-base 6.0.1-0ubuntu1
 libc6 2.23-0ubuntu4
 libgcc1 1:6.0.1-0ubuntu1
 libstdc++6 5.4.0-6ubuntu1~16.04.4
InstallationDate: Installed on 2016-04-11 (268 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: dvd+rw-tools
UpgradeStatus: Upgraded to xenial on 2016-04-26 (254 days ago)

Revision history for this message
Travisgevans (travisgevans) wrote :
Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

did you already try -speed=1 in order to get the lowest possible speed ?

-------------------------------------------------------------------------

The growisofs function to set the speed
  set_speed_B6h
in
  https://sources.debian.net/src/dvd%2Brw-tools/7.1-11.1/growisofs_mmc.cpp/#L1090
is quite complicated. It inquires the drive for the list of available
write speeds and inquires the current write speed.

If a speed was selected by program option (i.e. speed_factor != 0.0) then
it looks for the smallest offered write speed and begins to divide and
multiply. Then it looks for the offered speed which is closest to the
calculated value.
This obviously goes a wrong path by yielding "16.4x1352KBps" rather than
"12.3x1352KBps". (The display computation divides the KB/s number of effective
speed by the KiB/s number of 1x DVD speed. It should rather divde by 1385.)

One would have to watch in set_speed_B6h() the life of variables
"speed_factor", "minv", "targetv", and "velocity", to find out what
exactly goes wrong.

Maybe the computations are even ok and the drive just does not obey.

-------------------------------------------------------------------------

If you look for an alternative to growisofs, then consider cdrskin or
xorriso personality xorrecord, which are better suitable for DVD and BD
than wodim and also not dead yet. (I am their upstream developer. If they
cannot set the speed either then we'd have some chance to find out why.)

Have a nice day :)

Thomas

Revision history for this message
Travisgevans (travisgevans) wrote :

Thanks for the response and sorry for the delay! I actually don't burn optical discs very often anymore and needed to wait for another opportunity to arise (my discs are DVD+R which don't work with simulated writing, and I didn't want to waste them in order to test).

With -speed=1, growisofs still writes at maximum speed (16x). However, with xorrecord, the speed control works fine. Thanks for suggesting those tools; my GNU/Linux burning knowledge has been out of date for a while and I lost track of all the forks. :-)

Revision history for this message
Thomas Schmitt (scdbackup) wrote :

Hi,

congrats to the success.

I have to stress, though, that cdrskin and xorriso are not forks of cdrecord
or growisofs, but applications of libburn, an independent implementation
of an SCSI/MMC driver in userspace.

In the end it depends on what the drive's firmware makes out of the SCSI
commands which it gets sent.

Have a nice day :)

Thomas

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.