Summary: | k3b-1.0.2 usb dvd offlined | ||
---|---|---|---|
Product: | [Applications] k3b | Reporter: | carlo cancellieri <ccancellieri> |
Component: | general | Assignee: | Sebastian Trueg <trueg> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 5rh4k6a9jjasu4001, chris, PVince81 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
k3b console output from startup to reset loop
patch for bug 147611 |
Description
carlo cancellieri
2007-07-06 16:51:13 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? 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 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 smae things with newer 1.0.3... 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. 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? 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. 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. I just installed k3b 1.0.4-2.1, and the problem doesn't appear any more. Thanks! 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) >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.
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. > 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])
;)
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? Created attachment 30150 [details]
k3b console output from startup to reset loop
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 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? 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. 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. Created attachment 31598 [details] patch for bug 147611 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, 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 |