# Can't get xfburn or k3b find DVD writer on FreeBSD 9.0



## rockHardRideFre (Apr 6, 2012)

Hi,

I can't get any GUI tool working with my LITE-ON DVDRW SHW-160P6S (IDE) on FreeBSD9.0-RELEASE (packages and ports tree are in sync from the release date). atapicam is compiled in GENERIC kernel now, so no need for this module. I recompiled cdrtools, dvd+rw-tools, and hal. cdrecord works after that (tried to blank some CDs and burn some ISOs).

But xfburn crashes:

```
(process:6957): GLib-WARNING **: goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0

(process:6957): GLib-WARNING **: goption.c:2132: ignoring no-arg, optional-arg or filename flags (8) on option of type 0
** Message: Using Thunar-VFS 1.2.0
** Message: Using HAL
xfburn: error sending CAMIOCOMMAND ioctl: Inappropriate ioctl for device
xfburn: error sending CAMIOCOMMAND ioctl: Inappropriate ioctl for device
xfburn: error sending CAMIOCOMMAND ioctl: Inappropriate ioctl for device

** ERROR **: Device address does not lead to a burner '/dev/cd0' (ret=0).
aborting...

[1]    Abort                         xfburn (core dumped)
```

Exactly the same result when run as root.

k3b starts but shows a warning message in a popup window:

```
No optical drive found.
K3b did not find any optical device in your system.
Solution: Make sure HAL daemon is running, it is used by K3b for finding devices.
```

Of course, HAL is running.

brasero starts ok and doesn't complain at all; it just doesn't show any devices.

*camcontrol devlist* output:


```
<SAMSUNG SP80A4H RT100-07>         at scbus0 target 0 lun 0 (pass0,ada0)
<SAMSUNG HD400LD WQ100-15>         at scbus0 target 1 lun 0 (pass1,ada1)
<LITE-ON DVDRW SHW-160P6S PS08>    at scbus1 target 0 lun 0 (cd0,pass2)
```
This is what I tried to set to make it work:

/etc/devfs.conf:

```
# CDROM
own cd0 root:operator
perm cd0 0660

own     pass2      root:operator
perm    pass2      0666

own     xpt0       root:operator
perm    xpt0       0666
```

/etc/devfs.rules:

```
[system=5]
#CD/DVD
add path 'cd*' mode 0666 group operator
add path 'pass*' mode 0666 group operator
add path 'xpt*' mode 0666 group operator
```

/etc/rc.conf:

```
devfs_system_ruleset="system"
```
No CD-related entries in /etc/fstab.
Added myself to the operator group.
SUID flags:

```
ll /usr/local/bin | grep cdr
-rws--x---   1 root  operator    578088 Dec  3 02:30 cdrdao
-rws--x---   1 root  operator    402768 Feb 22 15:33 cdrecord
-rws--x---   1 root  operator    136428 Dec  3 10:08 cdrskin
```

Permissions on /dev files:

```
#ll /dev |grep cd
crw-rw----  1 root    operator     0,  91 Apr  6 15:18 cd0
# ll /dev | grep pass
crw-rw----  1 root    operator     0,  83 Apr  6 15:18 pass0
crw-rw----  1 root    operator     0,  84 Apr  6 15:18 pass1
crw-rw----  1 root    operator     0,  85 Apr  6 15:18 pass2
# ll /dev | grep xpt
crw-rw----  1 root    operator     0,  68 Apr  6 15:18 xpt0
```

DMA is enabled:

```
# sysctl hw.ata.atapi_dma
hw.ata.atapi_dma: 1
```

Now I think I've tried everything I could imagine and searched forums for this topic; still no luck.  What could be wrong? Maybe the xfburn error message is a clue but I don't understand where it gets the "device address" that doesn't lead to the burner. If xfburn knows that /dev/cd0 should be the burner, why doesn't it use it?


----------



## rockHardRideFre (Apr 7, 2012)

Some news. I found out that xfburn depends on libburn, so I recompiled libburn, too. Now xfburn seems to work (could blank a disk, write an ISO image, write files to a disk).

As for k3b (which I would prefer), nothing changed. Only I found that when I insert a disk before launching k3b, it finds the drive as read-only. Now the popup window says:


> *No CD/DVD/BD writer found.*
> K3b did not find an optical writing device in your system. Thus, you will not be able to burn CDs or DVDs. However, you can still use other K3b features such as audio track extraction, audio transcoding or ISO9660 image creation.



In Settings > Devices dialog, "Writers" are shown as "none", and /dev/cd0 is under "Read-only Drives". There are blank squares against "Vendor" and "Firmware", and "Error" against "Write Capabilities".


----------



## rockHardRideFre (Apr 7, 2012)

Ok, it turns out that k3b has a whole lot of libs of its own, and even its own libk3bdevice.so.6. So I rebuilt k3b. It did take some time, but it helped! k3b is working now. Only it leaves me wondering as to against which base system version were the FreeBSD9.0-RELEASE packages compiled.
Anyway, thanks for reading and thinking with me


----------

