Bug 2212471 - k3b is not able to burn data to disks in KDE
Summary: k3b is not able to burn data to disks in KDE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: k3b
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: KDE SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-05 16:40 UTC by Christopher Klooz
Modified: 2024-01-11 02:16 UTC (History)
8 users (show)

Fixed In Version: k3b-23.08.4-2.fc39 k3b-23.08.4-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-10 16:36:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
alernatives --display cdrecord before and after setting wodim as default. Before is when things were broken, after is when things were confirmed working. (1.87 KB, text/plain)
2024-01-02 20:23 UTC, Rick
no flags Details

Description Christopher Klooz 2023-06-05 16:40:35 UTC
I tried to burn an ISO image ("Burn image" option) to a DVD through a USB-attached DVD/BD burning drive.

Everything seemed to work fine and K3b was able to see the blank disk and to identify the blank disk as such.

However, immediately after I clicked to "Start" the burning process, I got an error:
```
On-the-fly writing with cdrecord < 2.01a13 not supported.
```

The debug output is imho not valuable:
```
Devices
-----------------------
PIONEER BD-RW   BDR-UD03 1.14 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, BD-ROM, BD-R, BD-RE, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW, BD-ROM, BD-R Sequential (SRM), BD-R Random (RRM), BD-RE] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump, Random Recording, Sequential Recording, Sequential Recording + POW] [%7]

System
-----------------------
K3b Version: 23.4.1
KDE Version: 5.106.0
Qt Version:  5.15.9
Kernel:      6.3.5-200.fc38.x86_64
```

I cannot test if that is a driver/compatibility issue because I have only this one burning drive. (Can someone check if K3b works for them when burning an image?)

I thought initially that this is related to permissions since I usually work on a `sysadm_u` confined user account. However, I also tested with `unconfined_u` (which is the default of Fedora): the outcome is exactly the same.

My system was installed as F38 KDE Spin. I have only the default repositories enabled. K3b installed through `dnf` as usual. No third party software or such. cat /proc/sys/kernel/tainted = 0.

-----

I am not sure if that is related, but once I open K3b, it outputs another error about "System Configuration Problems":

```
Unable to find cdrskin executable
Cdrskin can substitute for cdrecord with data and audio CD, and for growisofs with DVD and BD.
Solution: Consider to install the libburn and cdrskin packages.
System locale charset is ANSI_X3.4-1968
Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.
Solution: To properly set the locale charset make sure the LC_* environment variables are set. Normally the distribution setup tools take care of this.
```

However, `libburn` is already installed. I additionally installed `cdrskin`, which is not installed by default with K3b. 

After installing `cdrskin`, the "System Configuration Problems" error only contains the latter issue:
```
System locale charset is ANSI_X3.4-1968
Your system's locale charset (i.e. the charset used to encode filenames) is set to ANSI_X3.4-1968. It is highly unlikely that this has been done intentionally. Most likely the locale is not set at all. An invalid setting will result in problems when creating data projects.
Solution: To properly set the locale charset make sure the LC_* environment variables are set. Normally the distribution setup tools take care of this.
```

But after that (having `cdrskin` installed), the problem when trying to burn DVDs remains the same.

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

I then tried to burn a Data DVD (Data Project), which creates a different output when clicking "Start":

```
Could not determine size of resulting image file
```

The debug output when trying to burn a Data DVD (Data Project) is a little more detailed:

```
Devices
-----------------------
PIONEER BD-RW   BDR-UD03 1.14 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, BD-ROM, BD-R, BD-RE, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW, BD-ROM, BD-R Sequential (SRM), BD-R Random (RRM), BD-RE] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump, Random Recording, Sequential Recording, Sequential Recording + POW] [%7]

K3b::IsoImager
-----------------------
mkisofs print size result: 0 (0 bytes)

System
-----------------------
K3b Version: 23.4.1
KDE Version: 5.106.0
Qt Version:  5.15.9
Kernel:      6.3.5-200.fc38.x86_64

Used versions
-----------------------
mkisofs: 2.1-Emulation

mkisofs
-----------------------
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
xorriso : FAILURE : -as genisofs: Unsupported option '-udf'

mkisofs calculate size command:
-----------------------
/usr/bin/mkisofs -gui -graft-points -print-size -quiet -volid fedora-preview-installer-2023-02 -volset  -appid K3B THE CD KREATOR (C) 1998-2018 SEBASTIAN TRUEG, MICHAL MALEK AND LESLIE ZHAI -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/k3b.RXotOS -rational-rock -hide-list /tmp/k3b.IARXYc -joliet -joliet-long -hide-joliet-list /tmp/k3b.xJtZMW -no-cache-inodes -udf -full-iso9660-filenames -iso-level 3 -path-list /tmp/k3b.eZSYVg
```

Reproducible: Always

Steps to Reproduce:
1. Attach DVD/BD burner and insert blank disc
2. Start K3b -> "More actions..." -> "Burn image..." -> Wait for Burn medium and choose an ISO image -> Click "Start"
3. You get the error: "On-the-fly writing with cdrecord < 2.01a13 not supported."
Actual Results:  
K3b cannot burn to DVDs

Expected Results:  
K3b should be able to burn to DVDs

Comment 1 Christopher Klooz 2023-06-24 12:09:40 UTC
Another user tested k3b and also experiences the issue. He deploys GNOME instead of KDE. Still, K3b cannot burn on his system with the same error. At the same time, GNOME's Brasero works for him.

See https://discussion.fedoraproject.org/t/k3b-cannot-burn-dvds-an-issue-related-to-my-hardware-my-configuration-or-a-bug/84736/2

Comment 2 Rick 2023-12-23 23:19:38 UTC
Can also confirm this affects K3B and K3B only, and it applies to audio CDs as well as data DVDs.

I receive the error "cdrdao returned an unknown error (code 1)"

The debugging output:

```
Devices
-----------------------
MATSHITA DVD-RAM UJ8C0 SB01 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW] [SAO, TAO, RAW, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump] [%7]

System
-----------------------
K3b Version: 23.8.3
KDE Version: 5.111.0
Qt Version:  5.15.11
Kernel:      6.6.7-100.fc38.x86_64

Used versions
-----------------------
cdrdao: 1.2.5

cdrdao command:
-----------------------
/usr/bin/cdrdao write --device /dev/sr0 --driver generic-mmc:0x00000010 --speed 8 --simulate -n -v 2 --force --remote 19 /home/vector/Videos/k3b_audio_0_.toc
```

When I create a shell TOC file by hand, and attempt to run the same command line above, the simulated write completes successfully.

My conclusion in this case, is K3B isn't generating a TOC File that is usable.

Comment 3 Rick 2023-12-24 19:19:04 UTC
Might be related to this, but not sure.

I tried brasero, but given I don't have a full gnome install, it can't detect my drive, so it only gives me the "image file" option for burning.  Fine, I know how to deal with that from the windows days in the mid 1990s. 

So I get the bin/cue files, and try to burn them with cdrdao, and it fails with some error I can't recall.  Figuring cdrdao is on its way out, I try again with cdrskin, which gives me a much more useful error message: "garbage ISRC" or something like that.  I remove the ISRC entries from the TOC File, and lo, it burns correctly in both simulation and with the laser on.

It pulled the "garbage" ISRC information from the legally downloaded FLACs I was using as source material, so I'm hypothesizing that's where the bug might be.  After holidays, I will strip ISRC tags from test FLACs and see if that results in K3B burning correctly again.

Comment 4 Rick 2023-12-24 23:28:15 UTC
Removing ISRC and other unusual tags from FLACs didn't fix the issue.  making cdrdao unexecutable didn't force k3b to use cdrskin.  Several bugs here.

Comment 5 Christopher Klooz 2023-12-30 21:18:37 UTC
This could be linked to the `cdrdao`-related issue of brasero: https://bugzilla.redhat.com/show_bug.cgi?id=2250192

Comment 6 Rick 2023-12-31 06:43:58 UTC
Doesn't appear to be related.  cdrdao has this irritating property of deleting a TOC file it finds unacceptable, which made debugging this more difficult than it needed to be.   

I used k3b's "burn image" mode to generate a toc and data.wav file, and then `chattr +i` said toc file so I could study changes to it as it related to cdrdao.

I found *one* tag I missed, and a comment field from the FLAC file got added into the MESSAGE field of the TOC, and once I blanked out that value, cdrdao accepted the TOC and began a simulated burn.

Most importantly, I tried a few simple strings in the MESSAGE field of the TOC.  It seems the only value cdrdao will accept as valid is an empty string.  Adding any character, even just "derp" caused cdrdao to reject the TOC instantly.

I tracked that error handling down to this file: https://github.com/cdrdao/cdrdao/blob/c2b0ff2740ecc94e976e67e8d6527cfb7107b21f/trackdb/Toc.cc#L1124, which is what's throwing the "Language 0: MESSAGE field not defined for all tracks or disk."  Given that modifying a single MESSAGE entry in a TOC file, I presume the loop further up: https://github.com/cdrdao/cdrdao/blob/c2b0ff2740ecc94e976e67e8d6527cfb7107b21f/trackdb/Toc.cc#L1054 which calls the function getCdTextItem https://github.com/cdrdao/cdrdao/blob/c2b0ff2740ecc94e976e67e8d6527cfb7107b21f/trackdb/Toc.cc#L1054 for each track and field type.

My C++ skills stop me here, I can't find the bug exactly.

Comment 7 Rick 2023-12-31 08:17:25 UTC
Note that I can't get cdrdao to actually _start_ the burn with K3B's generated TOC and WAV files now.  Even the simplest audio CD layout (single track, TAO, artist and title), cdrdao just hangs without ever engaging the laser on the drive.

Comment 8 Gerhard K. 2024-01-02 09:12:19 UTC
Same issue here...

Fedora 39 - all available updates installed

Devices
-----------------------
ATAPI iHAS124   E 4L0A (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R doppelschichtig, DVD+R, DVD+RW, DVD+R doppelschichtig) 

System
-----------------------
K3b Version: 23.8.4
KDE Version: 5.111.0
Qt Version:  5.15.11
Kernel:      6.6.8-200.fc39.x86_64 

K3b almost instantly reports the following error: "On-the-fly writing with cdrecord < 2.01a13 not supported"
Exactly the same error appears with K3b Version 23.8.1 (still available in the repos)

Using cdrecord directly via command line works fine, with no problems at all:

cdrecord -v -dev='/dev/sr0' speed=4 /media/VIDEO/dvd.iso
xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev '/dev/sr0'
Media current: DVD+RW
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 4483m free
Beginning to write data track.
xorriso : UPDATE : Formatting. Working since 0 seconds
xorriso : UPDATE : Formatting. Working since 2 seconds
xorriso : UPDATE : Formatting. Working since 3 seconds
xorriso : UPDATE : Formatting. Working since 4 seconds
libburn : NOTE : Write start address is  0 * 2048
xorriso : UPDATE :    0 of 2841 MB written (fifo 99%) [buf 100%]   0.0x.
xorriso : UPDATE :    0 of 2841 MB written (fifo 99%) [buf 100%]   0.2x.
xorriso : UPDATE :    2 of 2841 MB written (fifo 94%) [buf  99%]   1.8x.
xorriso : UPDATE :    8 of 2841 MB written (fifo 95%) [buf  99%]   4.0x.
xorriso : UPDATE :   13 of 2841 MB written (fifo 96%) [buf  99%]   4.0x.
xorriso : UPDATE :   18 of 2841 MB written (fifo 96%) [buf  99%]   4.0x.
...
.
xorriso : UPDATE : 2838 of 2841 MB written (fifo 77%) [buf  99%]   4.0x.
xorriso : UPDATE : 2840 of 2841 MB written (fifo 10%) [buf  99%]   3.7x.
xorriso : UPDATE : Closing track/session. Working since 1023 seconds
xorriso : UPDATE : Closing track/session. Working since 1024 seconds
...
xorriso : UPDATE : Closing track/session. Working since 1030 seconds
libburn : NOTE : WRITE command repetition happened 9074 times
Writing to '/dev/sr0' completed successfully.

xorriso : NOTE : Re-assessing -outdev '/dev/sr0'
Drive current: -outdev '/dev/sr0'
Media current: DVD+RW
Media status : is written , is appendable
Media summary: 1 session, 1454770 data blocks, 2841m data, 1641m free

Thank you for your time & help!

Comment 9 Christopher Klooz 2024-01-02 14:14:34 UTC
https://pagure.io/fedora-kde/SIG/issue/440

Comment 10 Alessandro Astone 2024-01-02 15:29:56 UTC
What's the output of `alternatives --display cdrecord`?

Try installing `wodim` and `sudo alternatives --set cdrecord /usr/bin/wodim`

Comment 11 Gerhard K. 2024-01-02 16:27:46 UTC
"sudo alternatives --set cdrecord /usr/bin/wodim" did the trick!
Thank you so much! Your help is greatly appreciated! 

After that wodim appeared in the K3b-settings and was selectable. First test: No more error-messages and K3b had no problem to burn a Video-DVD (4,3GB single layer) and also a data-cd (700MB). Looks like with the "wodim-setting" K3b works just fine again.

Comment 12 Fedora Update System 2024-01-02 18:54:12 UTC
FEDORA-2024-9b6430cd6a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-9b6430cd6a

Comment 13 Rick 2024-01-02 20:22:18 UTC
Can confirm modifying alternatives works.  My hazy memory is that the last time I used k3b to burn a disc, in fact, it had used wodim instead.  Not sure why a fresh F38 install installed Wodim, yet still chose xorrecord as the default alternative.

See attachment for before/after `alernatives`.

Comment 14 Rick 2024-01-02 20:23:37 UTC
Created attachment 2006889 [details]
alernatives --display cdrecord before and after setting wodim as default.  Before is when things were broken, after is when things were confirmed working.

Comment 15 Fedora Update System 2024-01-03 01:11:44 UTC
FEDORA-2024-9b6430cd6a has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-9b6430cd6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-9b6430cd6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2024-01-03 02:06:35 UTC
FEDORA-2024-121f11aea4 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-121f11aea4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-121f11aea4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Christopher Klooz 2024-01-04 22:18:37 UTC
I have first updated to k3b-23.08.4-2.fc39 (FEDORA-2024-9b6430cd6a) and then tested.

Unfortunately, I now get the error `mkisofs executable not found.` when I click the `burn` button. However, the command/bin `mkisofs` is available on my Fedora. 

Yet, is it possible that the new issue is that Fedora links the `/bin/mkisofs` file (symlink) to `/etc/alternatives/mkisofs` ? (I assume this is the Fedora default because I have not made any customizations to/in mkisofs)

I then tried to do `alternatives --set cdrecord /usr/bin/wodim` (I did it with root; my normal accounts don't have sudo) after I experienced the issue and tried again. But the outcome is the same.

I tried it also with unconfined_u user accounts (which is the Fedora default) to ensure that my confined user account is not the issue/problem.

Can someone verify if they experience the same problem after updating to k3b-23.08.4-2.fc39 (FEDORA-2024-9b6430cd6a)? (see https://bodhi.fedoraproject.org/updates/FEDORA-2024-9b6430cd6a )

Comment 18 Alessandro Astone 2024-01-04 23:28:52 UTC
Check the status of `mkisofs` in `Settings > Configure K3b... > Programs`.
It should have /usr/bin/genisoimage and be selected. If it's not selected, select it.

Comment 19 Christopher Klooz 2024-01-04 23:47:54 UTC
Indeed, `/usr/bin/genisoimage` is not selected by default. That seems to be generally the case on my user accounts. That default should be changed.

When selecting `/usr/bin/genisoimage`, it works out!

If no one comes up with some issues remaining, I close this next week (feel free to close it earlier if you want).

Thanks for your support Alessandro!

Comment 20 Fedora Update System 2024-01-11 01:15:49 UTC
FEDORA-2024-9b6430cd6a has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2024-01-11 02:16:04 UTC
FEDORA-2024-121f11aea4 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.