Cannot burn a cd via k3b (Kinoite + KDE Spin)

First of all - I’m starting with Linux, I’ve had it for like a week at this point. I am also still learning the troubleshooting and etc. so don’t expect me to know everything. I might ask stupid questions as I am still a big big learner

I am on Fedora Kinoite KDE plasma and i downloaded k3b through terminal, installed libburn and cdrskin. In the settings of k3b I had an error saying (i dont remember correctly) that to access the optical drive I must be part of the nobody group? So I tried to add myself to the said group and to the cdrom group - but despite this even after restart I couldnt see the mentioned groups when i typed “groups” in terminal. Though surprisingly, the error about the nobody group disappeared at this point?

So I tried to burn the CD again - oh wow, it was done, but not really. The cd ended up being “recorded succesfully” but empty.
So I tried again, the same thing. And again - then I got an error “a different application was using this cd - kioworker” alongside this:

/usr/bin/wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.scsidev: ‘/dev/sr0’devname: ‘/dev/sr0’scsibus: -2 target: -2 lun: -2/usr/bin/wodim: Cannot allocate memory.Cannot open SCSI driver!For possible targets try ‘wodim --devices’ or ‘wodim -scanbus’.For possible transport specifiers try ‘wodim dev=help’.For IDE/ATAPI devices configuration, see the file README.ATAPI.setup fromthe wodim documentation.Text len: 1134TOC Type: 0 = CD-DAcdrecord command:

/usr/bin/wodim -v gracetime=2 dev=/dev/sr0 speed=10 -sao driveropts=burnfree textfile=/tmp/k3b.saEFMP -overburn -useinfo -audio

man i just wanna burn a cd lmao

“cdrecord doesn’t have the permissions to open the device,
modify the settings of the device in K3B, to solve this issue”

The cdrom is actually shown in /dev as /dev/sr0 and is owned by root:cdrom

$ ls -l /dev/cdrom
lrwxrwxrwx. 1 root root 3 Aug 27 10:41 /dev/cdrom -> sr0

$ ls -l /dev/sr0
brw-rw----+ 1 root cdrom 11, 0 Aug 27 10:41 /dev/sr0

Thus to be able to use it the user must be part of the cdrom group.
To make yourself part of that group the command sudo usermod -aG cdrom $USER should add you to that group. Then the user must log out and back in before the group membership can take effect.

I’ve used this command and it didn’t put me in the cdrom group after restart

The command groups will usually show the groups your user belongs to.

However, it seems you are running kinoite so I am not certain how a users groups are managed there. The file of concern is /etc/group and you might try grep $USER /etc/group to see which groups you are actually included in.

$ groups
USER wheel cdrom dialout video render boinc libvirt

$ grep $USER /etc/group
wheel:x:10:USER
cdrom:x:11:USER
dialout:x:18:USER
video:x:39:USER,boinc,plex
render:x:105:USER,boinc
libvirt:x:983:USER
USER:x:1000:
boinc:x:972:USER

Hmm It actually just shows me my user name and wheel group, despite tryint o add myself to the cdrom multiple times. Is it possible that I cannot add myself to the cdrom group cuz I am on kinoite?

grep -E ‘^cdrom:’ /usr/lib/group | sudo tee -a /etc/group

sudo usermod -aG cdrom yourusername

logout and log back in.

1 Like

In kinoite you have two group files: /etc/group and /usr/lib/group. The full set of group names is located in the read-only file /usr/lib/group, and therefore you can only add yourself the few groups found in /etc/group.

What you need to do is

  • exctact the line containing “cdrom” from /usr/lib/group
  • append that line to /etc/group

As root, run this command

grep cdrom /usr/lib/group >> /etc/group

And before you execute the command, make sure you have typed >> (append), not just a single > (overwrite). Otherwise you will probably have a pretty bad time.

This actually added me to the group, thank You!
But somehow my issue still persists, but I get a different error in k3b, so we’re closer to something:

cdrecord

/usr/bin/wodim: Permission denied. Cannot open ‘/tmp/k3b.CSlQOU’.
/usr/bin/wodim: Cannot use ‘/tmp/k3b.CSlQOU’ as CD-Text file.*

Seems like there are issues with permisions of wodim.

also before that message I still get the error about the kioworker using the optical drive for some reason?

When you say:

i downloaded k3b through terminal

do you mean you installed it via rpm-ostree ?

k3b expects to be able to modify the permissions on the wodim and cdrdao binaries, but since kinoite has a read-only root filesystem, it’s unable to do so.

I’ve had luck in the past running k3b in a toolbox container, and although it’s far from ideal, the easiest set-up I’ve had was running it through toolbox as root.

To expand on my last comment, once you’re in the cdrom group, you could try something like: (as a normal user)

$ toolbox create k3b
$ toolbox enter k3b
⬢ [ash@toolbx ash]$ sudo dnf install k3b cdrskin libburn
⬢ [ash@toolbx ash]$ k3b

then go to: settings → configure k3b → programs (left hand side) → permissions tab
make a note of the permissions there, k3b seems unable to fix them itself due to some dbus error.

exit k3b, and update the binary permissions that it wants. for me it was: (this only works inside the toolbox container)

⬢ [ash@toolbx bin]$ sudo chmod 4710 /usr/bin/cdrdao 
⬢ [ash@toolbx bin]$ sudo chmod 4710 /usr/bin/wodim 
⬢ [ash@toolbx bin]$ sudo chmod 0750 /usr/bin/growisofs 
⬢ [ash@toolbx bin]$ sudo chown root:cdrom /usr/bin/cdrdao 
⬢ [ash@toolbx bin]$ sudo chown root:cdrom /usr/bin/wodim 
⬢ [ash@toolbx bin]$ sudo chown root:cdrom /usr/bin/growisofs 

you’ll need to add yourself to the cdrom group inside the container as well.

⬢ [ash@toolbx bin]$ sudo usermod -aG cdrom ash

re-start your toolbox shell by exiting it, then re-enter with toolbox enter k3b

launching k3b no longer complains, but unfortunately I’ve run out of burnable CDs to test this with, so it may not actually work, but I remember doing something along these lines in the past to get it working.

I guess at the core here though, those binaries should probably have the cdrom group ownership at install time, and I might suggest filing a bug for the package?

I downloaded it trough toolbox, like You did.
I tried to run k3b as root as You said, but then it says it fails to load my optical drive:/

I also tried to update the binary permissions in terminal, and it actually did the work for the growisofs ones, but for some reason it doesn’t do it for wodim and cdrdao. When i click on the change permissions it pops up the error saying:

"Action could not be performed
DBus engine error: failed to start service org.kde.k3b: The name is not activatable”

Does running k3b as root from the rpm-ostree installed version work for now?

outside of this my only other thought would be to use virt-manager to create a VM and passthrough your CD writer so you didn’t have to deal with how clunky k3b seems to be on kinoite.

I gave a try what You said (installing through rpm-ostree and then running with sudo) and for some reason it doesnt detect that I have growisofs already installed (with rpm-ostree).
Though when I open k3b outside from toolbox (with and without sudo), I don’t have the error "Action could not be performed
DBus engine error: failed to start service org.kde.k3b: The name is not activatable” when changing the permissions… And instead I get the error that “the following programs could not be updated [list of the programs from the permissions list]”

I guess my only choice could be using a vm as You said or using a different device that doesnt have kinoite

To run brasero to preform cd burn i run sudo chmod u+s /usr/bin/wodim

The /dev/sr0 has some extra permission which is mostly onknown. The hint is the “+” sign in

brw-rw----+ 1 root cdrom 11, 0 Sep  5 06:01 /dev/sr0

You can then run the command getfacl /dev/sr0 and get

getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: cdrom
user::rw-
user:vek:rw-
group::rw-
mask::rw-
other::---

showing that the current logged-in user also gets read-write access. It should therefore not be necessary to make the user a member of the cdrom group or setting the setuserid bit on any program.

What the exact problem is, is hard to determine due to badly formatted message quoted in the first message.

What more info could I provide?

Try different applications. Brasero is okay, I remember having troubles with K3b years ago…

How did you install k3b? You likely have to layer it via rpm-ostree install.

You should not need to have to add your user to any special group. Access to the disk should happen via polkit.

Just for the record: I can reproduce this issue on F43 KDE Spin. I use the k3b from our default repos (no external repos or so; no tainted kernel etc.).

I exclude this has to do with groups because my groups have not changed since I was using k3b the last time.

I have currently no time to work on this, so I can just check out search results at first glance and say that this error seems to occur on k3b every few years and on different distributions.

Due to lack of time, I will just switch to an alternative to k3b and cannot write a bug report dedicated to this. But for the record, here the debugging output:

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: 25.12.1
KDE Version: 6.22.0
Qt Version:  6.10.1
Kernel:      6.18.5-200.fc43.x86_64

Used versions
-----------------------
cdrecord: 1.1.11

cdrecord
-----------------------
/usr/bin/wodim: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits.
scsidev: '/dev/sr0'
devname: '/dev/sr0'
scsibus: -2 target: -2 lun: -2
/usr/bin/wodim: Cannot allocate memory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
TOC Type: 1 = CD-ROM

cdrecord command:
-----------------------
/usr/bin/wodim -v gracetime=2 dev=/dev/sr0 speed=24 -sao driveropts=burnfree -data -tsize=82642s -

Note: I repeated the test with unconfined_u, so the SELinux default of Fedora (the debugging info is from unconfined_u, too). So this is not a confinement issue.

Supplement: I adjusted tags and title, as this is not a kinoite-specific problem.