Bug 143176 - k3b turning off DMA
Summary: k3b turning off DMA
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-18 19:19 UTC by Arno Hemken
Modified: 2007-07-28 14:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Debug output of a crashed burning session. (230.98 KB, text/plain)
2007-06-16 19:37 UTC, Claudio Freire
Details
Patch which gives growisofs a little time to settle down (426 bytes, patch)
2007-06-18 13:28 UTC, Sebastian Trueg
Details
Better reload (427 bytes, patch)
2007-07-28 14:01 UTC, Sebastian Trueg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arno Hemken 2007-03-18 19:19:46 UTC
Version:           1.0 (using KDE 3.5.5 "release 45.2" , openSUSE 10.2)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.8-0.1-default

I found this problem when burning ISO-Images to DVDs using K3b (it uses growisofs to do the work) with drive NEC DVD_RW ND-3540A:
Burn process completes without any problems and DMA=ON, then K3b ejects and reloads the tray.  

I get an Error Message "Laufwerksklappe kann nicht geschlossen werden". Translation is something like this : "Tray cannot be closed"

After this k3b continues, but from now on DMA is turned to OFF until next reboot.
Comment 1 Sebastian Trueg 2007-04-18 14:58:59 UTC
Thank you for your bug report.
The bug that you reported has been identified and has been fixed in the
latest development (SVN) version of KDE. The bug report will be closed.
Comment 2 Claudio Freire 2007-06-14 04:57:23 UTC
I'd like to reopen this bug.
I'm experiencing a very similar one on 1.0.1 (KDE 3.5.1 level "a" SUSE 10.1)
The only differences are the eject/reload: that doesn't happen. Upon completion of the recording, the DVD remains inside the recorder (Plextor PX716A), k3b keeps waiting... for something (since it reports a successful write) and (if verification is enabled), verification won't start. If verification is disabled, the dialog won't change the button from "cancel" to "close", though it will close when canceled.
After that, k3b is partially locked up. It seems unable to perform any but the most simple GUI actions, even closing it fails (in any way... killall -9 k3b makes the process defunct, but not disappear from ps -A).
The DVD works perfectly, both the disc and the drive, except... guess... DMA is off. 'hdparm -d1 /dev/hdc' fixes it though.
I imagine there's a deadlock somewhere.
Most recordings I do use cdrecord and growisofs, though both processes (cdrecord, growisofs, mkiso and so on) terminate correctly (they don't appear on a ps -A after the "lockup").
When I have the chance I'll try to post debug messages.
Comment 3 Claudio Freire 2007-06-16 19:36:16 UTC
Ok... found interesting things: the bug doesn't happen if I:
 a) don't burn on-the-fly (check "create image")
 b) don't verify data
 c) don't eject the media after burning (checking the corresponding option)

All a, b & c must be true for k3b to work alright. Which is good for me... now I can work. And it's good for you: you know where the problem is. I'd put my money on tray ejection. In fact, perhaps (I didn't try) k3b will work with only b & c. I'll try that next.

BTW: In the conditions I mentioned, it works fine, even leaving DMA on.

BTW2: I'm attaching the debug output, but I don't see anything of use.
Comment 4 Claudio Freire 2007-06-16 19:37:47 UTC
Created attachment 20872 [details]
Debug output of a crashed burning session.
Comment 5 Sebastian Trueg 2007-06-18 13:28:13 UTC
Created attachment 20883 [details]
Patch which gives growisofs a little time to settle down

Please apply the attached patch and then try to force the dma off situation
again. This is just a wild uneducated guess since I am a little lost here.
Comment 6 Claudio Freire 2007-06-23 23:38:28 UTC
Well, no, it doesn't seem to have worked.
I had to change the patch for it to build, BTW: QThread::Sleep() is protected, so I changed it by Sleep().

It took some time, because A) I got busy, B) I tried different ways of building (with/without stuff) and things like that, but nothing changed anything.

Console output follows, in case it helps:

kdecore (KAction): WARNING: KActionCollection::KActionCollection( QObject *parent, const char *name, KInstance *instance )
claudiofreire@felix:~> (K3bDevice::HalConnection) initializing HAL >= 0.5
Mapping udi /org/freedesktop/Hal/devices/storage_serial_578846 to device /dev/hdc
/dev/hdc resolved to /dev/hdc
/dev/hdc is block device (0)
/dev/hdc seems to be cdrom
(K3bDevice::Device) /dev/hdc: init()
(K3bDevice::Device) /dev/hdc feature: CD Mastering
(K3bDevice::Device) /dev/hdc feature: CD Track At Once
(K3bDevice::Device) /dev/hdc feature: CD-RW Media Write Support
(K3bDevice::Device) /dev/hdc feature: DVD+R
(K3bDevice::Device) /dev/hdc feature: DVD+RW
(K3bDevice::Device) /dev/hdc feature: DVD+R Double Layer
(K3bDevice::Device) /dev/hdc feature: DVD-R/-RW Write
(K3bDevice::Device) /dev/hdc feature: Rigid Restricted Overwrite
(K3bDevice::Device) /dev/hdc: dataLen: 60
(K3bDevice::Device) /dev/hdc: checking for TAO
(K3bDevice::Device) /dev/hdc: checking for SAO
(K3bDevice::Device) /dev/hdc: checking for SAO_R96P
(K3bDevice::Device) /dev/hdc: checking for SAO_R96R
(K3bDevice::Device) /dev/hdc: checking for RAW_R16
(K3bDevice::Device) /dev/hdc: checking for RAW_R96P
(K3bDevice::Device) /dev/hdc: checking for RAW_R96R
(K3bDevice::Device) /dev/hdc:  Number of supported write speeds via GET PERFORMANCE: 5
(K3bDevice::Device) /dev/hdc : 8467 KB/s
(K3bDevice::Device) /dev/hdc : 5645 KB/s
(K3bDevice::Device) /dev/hdc : 2822 KB/s
(K3bDevice::Device) /dev/hdc : 1411 KB/s
(K3bDevice::Device) /dev/hdc Invalid DVD speed: 706 KB/s
(K3bDevice::DeviceManager) setting current write speed of device /dev/hdc to 3324
/dev/hdc resolved to /dev/hdc
(K3bDevice::DeviceManager) dev /dev/hdc already found
(K3bDevice::DeviceManager) found config entry for devicetype: PLEXTOR DVDR   PX-716A
Devices:
------------------------------
Blockdevice:    /dev/hdc
Generic device:
Vendor:         PLEXTOR
Description:    DVDR   PX-716A
Version:        1.10
Write speed:    8400
Profiles:       DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW
Read Cap:       DVD-ROM, DVD-R, DVD-R Sequential, DVD-R Dual Layer, DVD-R Dual Layer Sequential, DVD-RW, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW
Write Cap:      DVD-R, DVD-R Sequential, DVD-R Dual Layer, DVD-R Dual Layer Sequential, DVD-RW, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-R, CD-RW
Writing modes:  SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite
Reader aliases: /dev/hdc
------------------------------
kdecore (KAction): WARNING: KActionCollection::operator+=(): function is severely deprecated.
QThread object destroyed while thread is still running.
First sec data area: 43:41:33 (LBA 196608) (402653184
Last sec data area: 553:42:61 (LBA 2491711) (5103024128 Bytes)
Last sec layer 1: 00:00:00 (LBA 0) (0 Bytes)
Layer 1 length: 00:00:01 (LBA 1) (2048 Bytes)
Layer 2 length: 553:42:61 (LBA 2491711) (5103024128 Bytes)
DiskInfo:
Mediatype:       DVD+R
Current Profile: DVD+R
Disk state:      empty
Empty:           1
Rewritable:      0
Appendable:      0
Sessions:        0
Tracks:          0
Layers:          1
Capacity:        510:01:29 (LBA 2295104) (4700372992 Bytes)
Remaining size:  510:01:29 (LBA 2295104) (4700372992 Bytes)
Used Size:       00:00:00 (LBA 0) (0 Bytes)
(K3bDevice::Device) /dev/hdc:  Number of supported write speeds via GET PERFORMANCE: 4
(K3bDevice::Device) /dev/hdc : 16620 KB/s
(K3bDevice::Device) /dev/hdc : 11080 KB/s
(K3bDevice::Device) /dev/hdc : 8310 KB/s
(K3bDevice::Device) /dev/hdc : 5540 KB/s
adding udi   /org/freedesktop/Hal/devices/volume_empty_dvd_plus_r
(K3bDevice::HalConnection) lock queued for /org/freedesktop/Hal/devices/storage_serial_578846
(K3bDevice::HalConnection) unlock queued for /org/freedesktop/Hal/devices/storage_serial_578846
                
Comment 7 Sebastian Trueg 2007-07-28 14:01:42 UTC
Created attachment 21276 [details]
Better reload

Please try this patch with K3b 1.0.3.
It does only load instead of eject and load for a reload action. 
As always with this bug I am just trying stuff.