Bug 147611 - k3b-1.0.2 usb dvd offlined
Summary: k3b-1.0.2 usb dvd offlined
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 16:51 UTC by carlo cancellieri
Modified: 2009-02-26 09:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
k3b console output from startup to reset loop (13.39 KB, text/plain)
2009-01-11 23:58 UTC, Henryk Hecht
Details
patch for bug 147611 (898 bytes, patch)
2009-02-24 12:47 UTC, Christophe Bothamy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description carlo cancellieri 2007-07-06 16:51:13 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages

I put any dvd in my usb-dvd ... udev recognize and mount it (hal dbus). 
It's all ok... 
If I start k3b-1.0.2 device is offlined... 

DMESG: 
usb 3-2: new high speed USB device using ehci_hcd and address 5 
usb 3-2: configuration #1 chosen from 1 choice 
scsi 1 : SCSI emulation for USB Mass Storage devices 
scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 0 
sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray 
usb 3-2: USB disconnect, address 5 scsi 1:0:0:0: 
scsi: Device offlined - not ready after error recovery 

I've solved installing k3b-1.0.1... 

Other info: kde-3.5.7 

#emerge --info

Portage 2.1.2.9 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r2 i686)
=================================================================
System uname: 2.6.20-gentoo-r2 i686 Intel(R) Pentium(R) M processor 1.60GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Fri, 06 Jul 2007 11:30:01 +0000
distcc[22819] (dcc_trace_version) distcc 2.18.3 i686-pc-linux-gnu; built Jul 15 2006 14:51:11 [disabled]
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1-r3, 2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -mtune=pentium-m -msse2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium-m -pipe -mtune=pentium-m -msse2  -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="cvs distlocks fixpackages metadata-transfer nostrip parallel-fetch sandbox sfperms strict userfetch userpriv"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch ftp://ftp.solnet.ch/mirror/Gentoo ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/"
LC_ALL="it_IT@euro"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common"
LINGUAS="it_IT it"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/zugaina /usr/portage/local/layman/xeffects /usr/portage/local/layman/zugaina /usr/portage/local/layman/xeffects /usr/local/portage /usr/local/portage/xeffects"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi aiglx alsa amd aotuv apache2 artswrappersuid asf asm async atm audiofile authdaemond avi bcmath berkdb bidi bl blas bootsplash bzip2 bzlib c++ cairo caps cardbus cdda cddb cdio cdparanoia cdrom cg cgi clearcase cracklib crypt css ctype cups dbase dbi dbm dbus dbx devfs26 devmap dga dhcp dict dio directfb disk-cache distcache divx4linux djbfft dlloader dlopen doc dpms dts dv dvd dvdr dvdread ecc elf encode enscript erandom exif extraengine extraicons extramodules f2c fame fastcgi fb fbcon fbdev ffmpeg fftw flac fltk font-server foomaticdb fortran fping fpx freetype ftp gcj gd geometry gif gimp gimpprint glade glibc glitz glut gsm gtk gtk2 hal howl html http iconv id3 ieee1394 image imagemagick imlib2 immqt-bc innkeywords innodb inode irc irda irmc j2ee jack java javacomm javadoc javascript jce jikes jp2 jpeg jpeg2k justify kde kdepim kig-scripting koffice-plugin kqemu ladcca lame lcd lcms ldap lesstif libcaca libclamav libsamplerate lids lingerd lirc lm_sensors logitech-mouse lzo lzw-tiff mad math md5sum mem-cache messages mgetty mhash mime ming mixer mjpeg mls mmx mmxext mng mozp3p mp3 mp4live mpeg mpeg2 mpeg4 mpi mplayer mpm-prefork msn multicall multipleip multislot mysqli network nfs nptl nptlonly ntlm nvidia oav objc octave ode ofx ogdi ogg oggvorbis openal opengl openssl osc pam pcmcia pcntl pcre pda pdf pdfkit php player png pnp posix postgres povray ppds prelude priority python qemu-fast qt quicktime rar rdesktop readline real recode reiserfs roundrobin rrdtool rsh samba sasl savedconfig session sftp sharedext sharedmem shorten simplexml slp smartcard sms sndfile snmp sockets source sox speex spell spl sql sqlite3 sse sse2 ssl subtitles svg svga svgz sysfs sysvipc szip tcpmd5 tga theora threads threadsonly thumbnail tiff timidity tokenizer tools tos transcode truetype truetype-fonts type1-fonts unicode usb userland utf8 v4l v4l2 vcd vcdimager vidix visualization vlm vnc voice vorbis wifi win32codecs winbind wma123 wmf wsconvert wxwindows x264 x86 xcomposite xine xinerama xml xmlrpc xorg xpm xprint xsl xvid xvmc yv12 zeroconf zlib" ALSA_CARDS="intel8x0" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="it_IT it" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


thank you, bye
Comment 1 Sebastian Trueg 2007-07-18 17:23:58 UTC
this is weird. I could not find any changes made between 1.0.1 and 1.0.2 that affect the device detection.
Does this also happen if the drive is empty, i.e. no dvd inserted?
Does it also happen if a CD is inserted?
Comment 2 carlo cancellieri 2007-07-22 21:36:57 UTC
I plug dvd (with no dvd/cd in):

#dmesg
...
[ 1951.840000] usb 3-2: new high speed USB device using ehci_hcd and address 5
[ 1951.972000] usb 3-2: configuration #1 chosen from 1 choice
[ 1951.996000] scsi1 : SCSI emulation for USB Mass Storage devices
[ 1951.996000] usb-storage: device found at 5
[ 1951.996000] usb-storage: waiting for device to settle before scanning
[ 1956.996000] scsi 1:0:0:0: CD-ROM            HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 0
[ 1957.024000] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
[ 1957.024000] sr 1:0:0:0: Attached scsi CD-ROM sr0
[ 1957.024000] usb-storage: device scan complete

I run k3b-1.0.2 than run dmesg again:
#dmesg
[ 1975.480000] usb 3-2: USB disconnect, address 5
[ 1975.480000] scsi 1:0:0:0: scsi: Device offlined - not ready after error recovery
[ 1975.488000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.488000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.488000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.496000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.496000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.496000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.496000] scsi 1:0:0:0: rejecting I/O to dead device
[ 1975.496000] scsi 1:0:0:0: rejecting I/O to dead device

I unplug and plug the usb device and insert an audio-CD:
#dmesg
...
[ 2186.380000] usb 3-2: new high speed USB device using ehci_hcd and address 7
[ 2186.512000] usb 3-2: configuration #1 chosen from 1 choice
[ 2186.512000] scsi2 : SCSI emulation for USB Mass Storage devices
[ 2186.512000] usb-storage: device found at 7
[ 2186.512000] usb-storage: waiting for device to settle before scanning
[ 2191.512000] scsi 2:0:0:0: CD-ROM            HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 0
[ 2191.540000] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
[ 2191.540000] sr 2:0:0:0: Attached scsi CD-ROM sr0
[ 2191.540000] usb-storage: device scan complete

I run k3b-1.0.2:
All seems ok! it recognize correctly my usb unit!
than...
Eject the cd
close the tray
(all ok for now)
insert an empty cd...
(all ok for now)
eject and insert an ampty DVD...
all ok on a first check (disk information correctly load)
after few seconds...
again device offlined!!!
(with 6 time repeated 'rejecting I/O...')

thank you,
bye
Comment 3 carlo cancellieri 2007-07-22 23:18:37 UTC
and this is dmesg for a data-dvd:

[ 8799.664000] usb 3-2: new high speed USB device using ehci_hcd and address 9
[ 8799.796000] usb 3-2: configuration #1 chosen from 1 choice
[ 8799.888000] scsi3 : SCSI emulation for USB Mass Storage devices
[ 8799.968000] usb-storage: device found at 9
[ 8799.968000] usb-storage: waiting for device to settle before scanning
[ 8804.968000] scsi 3:0:0:0: CD-ROM            HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 0
[ 8804.988000] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
[ 8804.988000] sr 3:0:0:0: Attached scsi CD-ROM sr0
[ 8804.988000] usb-storage: device scan complete
[ 8835.436000] ISO 9660 Extensions: Microsoft Joliet Level 3
[ 8835.436000] ISOFS: changing to secondary root
[ 8942.744000] usb 3-2: USB disconnect, address 9
[ 8942.780000] sr 3:0:0:0: scsi: Device offlined - not ready after error recovery
[ 8942.884000] VFS: busy inodes on changed media.
[ 8943.012000] scsi 3:0:0:0: rejecting I/O to dead device
[ 8943.012000] scsi 3:0:0:0: rejecting I/O to dead device
[ 8943.168000] scsi 3:0:0:0: rejecting I/O to dead device
[ 8943.168000] scsi 3:0:0:0: rejecting I/O to dead device
[ 8943.168000] scsi 3:0:0:0: rejecting I/O to dead device
Comment 4 carlo cancellieri 2007-07-24 16:01:56 UTC
smae things with newer 1.0.3...
Comment 5 Christoph Trassl 2007-08-26 21:23:12 UTC
Same problems here, too. This is pretty nasty.

As with Carlo, mounting does work normally, even gnomebaker does recognize my external dvd writer. But as soon as I start k3b the device gets offline (while trying to get drive capabilities). 

Burning with growisofs from commandline does work.

I have prepared some output from k3b which shows where the error occurs. After the last line k3b says it does not find a cd/dvd writer and the device is unusable until I unplug/unpower it.

--- snip

/dev/scd0 resolved to /dev/scd0
/dev/scd0 is block device (0)
/dev/scd0 seems to be cdrom
bus: 9, id: 0, lun: 0
(K3bDevice::Device) /dev/scd0: init(
(K3bDevice::Device) /dev/scd0 feature: CD Mastering
(K3bDevice::Device) /dev/scd0 feature: CD Track At Once
(K3bDevice::Device) /dev/scd0 feature: DVD Read (MMC5)
(K3bDevice::Device) /dev/scd0 feature: DVD+R
(K3bDevice::Device) /dev/scd0 feature: DVD+RW
(K3bDevice::Device) /dev/scd0 feature: DVD+R Double Layer
(K3bDevice::Device) /dev/scd0 feature: DVD-R/-RW Write
(K3bDevice::Device) /dev/scd0 feature: Rigid Restricted Overwrite
(K3bDevice::Device) /dev/scd0 feature: Layer Jump Recording
(K3bDevice::Device) /dev/scd0: dataLen: 60
(K3bDevice::Device) /dev/scd0: checking for TAO
(K3bDevice::Device) /dev/scd0: checking for SAO
(K3bDevice::Device) /dev/scd0: checking for SAO_R96P
(K3bDevice::Device) /dev/scd0: checking for SAO_R96R
(K3bDevice::Device) /dev/scd0: checking for RAW_R16
(K3bDevice::Device) /dev/scd0: checking for RAW_R96P
(K3bDevice::Device) /dev/scd0: checking for RAW_R96R
(K3bDevice::ScsiCommand) failed:
                            command:    GET PERFORMANCE (ac)
                            errorcode:  0
                            sense key:  NO SENSE (2)
                                asc:        0
                                ascq:       0
(K3bDevice::Device) /dev/scd0: GET PERFORMANCE length det failed.
(K3bDevice::ScsiCommand) failed:
                            command:    MODE SENSE (5a)
                                errorcode:  0
                            sense key:  NO SENSE (2)
                                asc:        0
                                ascq:       0
(K3bDevice::Device) /dev/scd0: MODE SENSE length det failed.
(K3bDevice::ScsiCommand) failed:
                            command:    MODE SENSE (5a)
                                errorcode:  0
                            sense key:  NO SENSE (2)
                                asc:        0
                                ascq:       0
(K3bDevice::Device) /dev/scd0: MODE SENSE with real length 65535 failed.
(K3bDevice::Device) could not open device /dev/scd0 for reading
(No such device or address)
    Error while retrieving capabilities.
    Could not initialize device /dev/scd0

--- snip


Perhaps this is an issue with recent kernels, mine is: 2.6.22.4-65.fc7

If I could help you with some further diagnostics output, I would be glad to help.

Thanks in advance.

Christoph.
Comment 6 Vincent Petry 2007-11-03 17:40:49 UTC
Same issue for me. I just bought an external IBM (NEC) DVD+-RW writer. The writer hangs/is offlined at the time where k3b is "checking for RAW_R96R". After this, k3b stays hung, and further lsusb command as well. I need to unplug the device to unfreeze them.

DISTRIBUTION: OpenSuse 10.3.
K3B version: k3b-1.0.3-32
UNAME: 2.6.22.5-31-default #1 SMP 2007/09/21 22:29:00 UTC i686 i686 i386 GNU/Linux
LSUSB after plug in:
Bus 001 Device 006: ID 05e3:0701 Genesys Logic, Inc. USB 2.0 IDE Adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0701 USB 2.0 IDE Adapter
  bcdDevice            0.33
  iManufacturer           0
  iProduct                1 USB TO IDE
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower               96mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

DMESG after plugging the device in:
usb 1-2: new full speed USB device using uhci_hcd and address 6
usb 1-2: not running at top speed; connect to a high speed hub
usb 1-2: new device found, idVendor=05e3, idProduct=0701
usb 1-2: new device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-2: Product: USB TO IDE
usb 1-2: configuration #1 chosen from 1 choice
scsi9 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
scsi 9:0:0:0: CD-ROM            _NEC     DVD+-RW ND-6650A 2.62 PQ: 0 ANSI: 0
sr1: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
sr 9:0:0:0: Attached scsi CD-ROM sr1
sr 9:0:0:0: Attached scsi generic sg2 type 5
usb-storage: device scan complete

DMESG after bug, before unplugging the device:
usb 1-2: reset full speed USB device using uhci_hcd and address 6
usb 1-2: device descriptor read/64, error -110

DMESG after unplugging the device:
usb 1-2: device descriptor read/64, error -110
usb 1-2: reset full speed USB device using uhci_hcd and address 6
usb 1-2: device descriptor read/64, error -110
usb 1-2: USB disconnect, address 6
scsi 9:0:0:0: scsi: Device offlined - not ready after error recovery
scsi 9:0:0:0: rejecting I/O to dead device

K3B output:
/dev/sr1 resolved to /dev/sr1
/dev/sr1 is block device (1)
/dev/sr1 seems to be cdrom
bus: 9, id: 0, lun: 0
(K3bDevice::Device) /dev/sr1: init()
(K3bDevice::Device) /dev/sr1 feature: CD Mastering
(K3bDevice::Device) /dev/sr1 feature: CD Track At Once
(K3bDevice::Device) /dev/sr1 feature: CD-RW Media Write Support
(K3bDevice::Device) /dev/sr1 feature: DVD Read (MMC5)
(K3bDevice::Device) /dev/sr1 feature: DVD+R
(K3bDevice::Device) /dev/sr1 feature: DVD+RW
(K3bDevice::Device) /dev/sr1 feature: DVD+R Double Layer
(K3bDevice::Device) /dev/sr1 feature: DVD-R/-RW Write
(K3bDevice::Device) /dev/sr1 feature: Rigid Restricted Overwrite
(K3bDevice::Device) /dev/sr1: dataLen: 60
(K3bDevice::Device) /dev/sr1: checking for TAO
(K3bDevice::Device) /dev/sr1: checking for SAO
(K3bDevice::Device) /dev/sr1: checking for SAO_R96P
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SELECT (55)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        26
                           ascq:       0
(K3bDevice::Device) /dev/sr1: checking for SAO_R96R
(K3bDevice::Device) /dev/sr1: checking for RAW_R16
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SELECT (55)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        26
                           ascq:       0
(K3bDevice::Device) /dev/sr1: checking for RAW_R96P
(K3bDevice::ScsiCommand) failed:
                           command:    MODE SELECT (55)
                           errorcode:  70
                           sense key:  ILLEGAL REQUEST (5)
                           asc:        26
                           ascq:       0
(K3bDevice::Device) /dev/sr1: checking for RAW_R96R


Note that I have another CD writer on /dev/sr0, but I don't think it is the reason of the issue. I tested my DVD writer on another computer (which has OpenSuse 10.2 and an earlier kernel version), which produces the same issue.


Is there a way to disable the checking for RAW_R96R?
Comment 7 Vincent Petry 2007-11-04 10:29:52 UTC
Ok I tried to remove that RAW_R96R detection, but now the last debug message I see is "checking for RAW_R96P". The problem must be in the code that is executed 
later.

BTW: if a CD/DVD is in the tray it doesn't affect the issue.

I will try to turn to older versions of k3b.
Comment 8 Vincent Petry 2007-11-04 13:25:35 UTC
The k3b-1.0.3-32 version seem to hang on the speed detection (K3bDevice::Device::determineSupportedWriteSpeed). When I comment out the method, it runs a little further past the call to close() in K3bDevice::Device::init. But it still offlines my writer, seemingly trying to detect other things. This is where I gave up.

I tried k3b version 1.0.1-6.1, and it also works for me. So there must be some difference in the device detection between 1.0.1 and 1.0.3. Or it could be some kind of side-effect produced by other changes.
Comment 9 Vincent Petry 2007-11-11 01:36:49 UTC
I just installed k3b 1.0.4-2.1, and the problem doesn't appear any more.
Thanks!
Comment 10 carlo cancellieri 2007-11-11 20:54:07 UTC
I've installed 1.0.4 but still same problem with cdrtools-2.01.01_alpha34

Upgrade to cdrtools-2.01.01_alpha36 solved (for me)
Comment 11 carlo cancellieri 2007-11-12 00:43:18 UTC
>I've installed 1.0.4 "but still same problem" with cdrtools-2.01.01_alpha34
>Upgrade to cdrtools-2.01.01_alpha36 solved (for me)

EDIT: I'm not sure of this!
Actually my [DVD/CD]-RW is off lined at the and of each burn.
I think it may be for some incompatibility between my Magnex external USB/EIDE adapter and the LG GSA-4163B.
Comment 12 Vincent Petry 2007-11-12 02:58:24 UTC
Did you check if it is a power supply issue?

After it worked for me, I still had issues when burning at high speed. This also offlined my writer. I had to buy an external self-powered USB hub, and plug both of its cables (USB and power) into it, and now it doesn't offline any more.

On my old Dell laptop burning didn't work at all (offlined writer), since the usb ports were too weak. The USB hub also solved it.
Comment 13 carlo cancellieri 2007-11-15 16:03:25 UTC
> Did you check if it is a power supply issue? 

No, I don't think so because I use a 350W ATX power switch to power all of my external peripherals (router[250mW], DVD-RW[10W], NAS[30W] and Laptop[75W])
;)
Comment 14 Henryk Hecht 2009-01-11 23:57:27 UTC
I'm also seeing this, or something like it, with k3b 1.0.5 on opensuse 11.1 (kernel 2.6.27.7).  The device (a lacie external dvd writer, identifies as "TSSTcorp CD/DVDW TS-L632L") works fine in windows, reads dvds fine in suse, works with growisofs (and nero linux, whatever that uses!).  But as soon as I start k3b, I get:
VFS: busy inodes on changed media or resized disk sr1
last message repeated 37 times
usb 1-6: reset high speed USB device using ehc
i_hcd and address 3

Which just cycles endlessly until I either close k3b or unplug the drive.

I will attach the k3b output separately, as it's a little verbose.  The
(K3bDevice::Device) /dev/sr1: READ 10 failed!
(K3bDevice::ScsiCommand) failed:
                           command:    READ (10) (28)
                           errorcode:  70
                           sense key:  NOT READY (2)
                           asc:        4
                           ascq:       1
just repeats endlessly.

I also found this unhelpful debian bug on the same issue with a different drive:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500986

Things I've tried:
different cables
different power supply
shutting down kded
shutting down hal/dbus
four different computers

No luck.  The problem may be a kernel bug or something, but only k3b seems to be affected.  Has anyone been able to solve this?
Comment 15 Henryk Hecht 2009-01-11 23:58:27 UTC
Created attachment 30150 [details]
k3b console output from startup to reset loop
Comment 16 Vincent Petry 2009-01-12 02:42:21 UTC
I had a similar issue, but it occurred only when I put a DVD into the drive (CDs were fine). 
My problem was that speed detection would reset the drive. There are two speed detection techniques, so I disabled the one that makes it reset.

Please have a look at https://bugs.kde.org/show_bug.cgi?id=171381
Comment 17 Henryk Hecht 2009-01-13 11:39:41 UTC
Thanks you Vincent, your idea in bug #171381 seems to avoid the problem, but I don't think it's actually getSupportedWriteSpeedsViaGP() that is the problem.  Ultimately, all it does is a SCSI GET PERFORMANCE, which fails in the debug output I attached.  I don't know if the failed GET PERFORMANCE is what causes the reset, but something else is causing the command to fail.

dvd+rw-mediainfo also does a GET PERFORMANCE in quite the same way, and it works just fine.  So something k3b does prior puts either the drive or something in the driver stack in a problematic state.  So far, I have had little luck in tracking it down.  Most of this stuff in k3b is similar to dvd+rw-mediainfo, though it happens in a different order. It is also harder to tell exactly what is executed in k3b just because there's more code and more code paths.  I'm pretty sure it isn't GET CONFIGURATION, READ DISC INFORMATION or READ TRACK INFORMATION, but they happen in a few different places.  I will keep looking, but anyone who understands k3b or SCSI better than I will have more luck.

Vincent, if it is not too much trouble, could you try dvd+rw-mediainfo and see if it works with your drive?
Comment 18 Vincent Petry 2009-01-13 12:58:32 UTC
Henryk, I have tried dvd+rw-mediainfo and it causes no problem to my external drive.

My guess is that GET_PERFORMANCE followed by a certain sequence of commands causes the drive to reset. And maybe the mediainfo tool doesn't use the same sequence. It looks like k3b does more extended detections.

In fact the GET_PERFORMANCE command doesn't seem to fail at all, since the method returns true. So maybe it just succeeded but causes some other side-effect for the following detections.

You might try to comment out the following detections and see if it works. I didn't bother researching further at that time.
Comment 19 Henryk Hecht 2009-01-15 09:11:08 UTC
In my case, GET PERFORMANCE is what fails, perhaps it is different for others.  For example:
(K3bDevice::ScsiCommand) failed: 
                           command:    GET PERFORMANCE (ac)
                           errorcode:  70
                           sense key:  NOT READY (2)
                           asc:        4
                           ascq:       1
(K3bDevice::Device) /dev/sr1: GET PERFORMANCE length det failed.
other things fail too, but this seems to be where the drive resets.

GET PERFORMANCE is actually sent twice, once to determine the number of descriptors, and again once that has been determined.  I never get to the latter in 1.0.5 because the former fails.  Interestingly, in 1.0.1 the first part has:
cmd[9] = 0;      // first we read only the header
in 1.0.5 this becomes:
cmd[9] = 1;      // first we read one descriptor
I'm not sure what the difference is, but changing it back to the 1.0.1 way makes things work for me (without commenting out getSupportedWriteSpeedsViaGP in k3bdevice.cpp).

Somewhat stranger, dvd+rw-mediainfo uses 1 in the tenth byte as k3b 1.0.5 does, but evidently without problem.  So I go back to the idea that k3b does something to upset the drive which "1" then knocks over, but "0" doesn't.  It is probably too much work for me to figure out what that is, so in the absence of a SCSI person telling me why the tenth byte must really be 1, I will patch my k3b to make it 0 as in 1.0.1 and wait for someone else to find the real difference.  Anyone else having this problem should probably try first this patch (as it is a smaller change) and then Vincent's idea to see if either helps.
Comment 20 Christophe Bothamy 2009-02-24 12:47:17 UTC
Created attachment 31598 [details]
patch for bug 147611
Comment 21 Christophe Bothamy 2009-02-24 12:48:58 UTC
Hi,

Same problem here. I've got a Vantec NexStar DX NST-530S2 external USB to SATA enclosure with a samsung SH-S223Q drive. When I launch k3b, the drive crashes and gets disabled with a : "(K3bDevice::ScsiCommand) failed: command: GET PERFORMANCE (ac)" error.
 
On the other hand dvd+rw-mediainfo works fine, so I tried to compare the atapi commands sent to the drive. I tracked down the problem in the K3bDevice::Device::getPerformance() method. This method send a GET_PERFORMANCE command and only reads in the 8 bytes header response. I am not sure, but I believe from the ATAPI specs that the nominal performance descriptor is also sent back from the drive, making a 24 bytes response (that's what is implemented in dvd+rw-mediainfo).

The attached patch fixes the problem. 
Thanks,
Comment 22 Sebastian Trueg 2009-02-26 09:52:44 UTC
SVN commit 932014 by trueg:

If we request one performance descriptor the buffer should provide the space to store it.
Thanks to Christophe Bothamy for the patch.

BUG: 147611


 M  +7 -7      k3bdevice_mmc.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=932014