pktcdvd module missing

Bug #512142 reported by Matthew
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
udftools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: udftools

I would like to write a dvd+rw via packet writing on my Karmic.
I installed the udftools package, then I tried to start the udftools service.

Here is the output:
# service udftools start
/dev/pktcdvd/0=/dev/sr0 WARNING: All config files need .conf: /etc/modprobe.d/ndiswrapper, it will be ignored in a future release.
WARNING: All config files need .conf: /etc/modprobe.d/blacklist-ndiswrapper, it will be ignored in a future release.
FATAL: Module pktcdvd not found.
Can't find pktcdvd character device

There really isn't any module named pktcdvd on my system, and i can't find any related informations where it can be found.

Matthew

ProblemType: Bug
Architecture: amd64
Date: Mon Jan 25 02:00:47 2010
DistroRelease: Ubuntu 9.10
LiveMediaBuild: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: udftools 1.0.0b3-14
ProcEnviron:
 PATH=(custom, user)
 LANG=hu_HU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: udftools
Uname: Linux 2.6.31-17-generic x86_64
XsessionErrors:
 (gnome-settings-daemon:1830): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:1830): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:1925): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:1936): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (padevchooser:1938): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates_libgtk_only: assertion `private->update_and_descendants_freeze_count > 0' failed

Revision history for this message
Matthew (matthew-linux) wrote :
Revision history for this message
Nikko (nikolas-nolz) wrote :

I can confirm this, same problem on my machine (karmic,amd64). But. AFAIK, the drivers already compiled into the Standard-Kernel (see config file), still udftools searches for the module and doesnt find one.

Revision history for this message
pirx67 (pirx67) wrote :

The same problem occurs on my system 32-bit Linux on an AMD-K8 (Linux xxxx 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010 i686).

I can confirm that the pktcdvd code is compiled into the kernel and therefore not available as a module.

I have looked a little bit into the pktsetup tool's source code. The pktsetup tool needs access to the "/dev/pktdev/control" device. To get this device's minor number it parses the output of "/proc/misc" (see 'cat /proc/misc'). On older kernels the pktcdvd module shows as "pktcdvd" but on my Ubuntu Karmic kernel it shows up as "pktcdvd/control" in the list. Seems the kernel's output style for "/proc/misc" changed.

Because pktsetup doesn't find any line with a name exactly "pktcdvd" it assumes that the pktcdvd module isn't loaded and complains with "Can't find pktcdvd character device". The message "FATAL: Module pktcdvd not found." comes from the modprobe utility that pktsetup calls to load the pktsetup module if pktsetup couldn't find the control device's minor number in the first attempt.

I made a small patch that solves the issue with pktsetup. It relaxes the way the names are compared when parsing the output of "/proc/misc" in a way that it only compares the first 7 characters. Then both strings "pktcdvd" and "pktcdvd/control" match and the device's minor number can be detected.

With this patch the setup goes fine. But then start the weird things. I'll explain these more in depth in the next comment.

Revision history for this message
pirx67 (pirx67) wrote :

Downloaded the current Ubuntu linux-source package that originates from 2.6.31.6. Had a look into the pktcdvd.c. Found the following code snippet that initialize a structure to register the "pktcdvd/control" device as a "misc" driver. It seemed apparently wrong because the structure member .name is initialized twice.

static struct miscdevice pkt_misc = {
 .minor = MISC_DYNAMIC_MINOR,
 .name = DRIVER_NAME,
 .name = "pktcdvd/control",
 .fops = &pkt_ctl_fops
};

Commented the line with "pktcdvd/control" out and built a new kernel hoping that would fix the wrong name of the misc driver when reading "/proc/misc" to get the minor device number for pktsetup.

Apparently it did fix that. The output of "/proc/misc" contains now that fits to the original version of pktsetup:

 61 pktcdvd

But unfortunately /dev/pktcdvd is no directory any more and therefore there is no way to access /dev/pktcdvd/control and add the necessary /dev/pktcdvd/pktcdvd? device nodes.

At the moment the patch to pktsetup.c seems for me the way to get the pktcdvd module configured using pktsetup.

tags: added: patch
Revision history for this message
Thalion (soe) wrote :

I can confirm this, same problem on my machine (karmic,intel32)

is it possible to get a compile binary pktsetup with new patch ?

I would like to test it with my DVD RAM Drive.

Revision history for this message
pirx67 (pirx67) wrote :

Hi Thalion I'll attach to this comment a zip file with an executable for karmic on intel32.

But as I recently found out you don't need the pktcdvd devices any more to write efficiently to DVD RAM disks.

Please consult the following links (german language only):

http://www.multimedia4linux.de/howto/DE-DVD-RAM-HOWTO.html

http://de.wikibooks.org/wiki/DVD-RAM/_Linux

Revision history for this message
pirx67 (pirx67) wrote :

Forgot to mention that the description of the weird things I announced in my comment #3 will not be done here.

Instead I filed a bug against the kernel. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/526774

Revision history for this message
Andreas Kostyrka (andreas-kostyrka) wrote :

One thing that would be relevant is to verify if this is needed at all, I seem to be able to use /dev/scd0 without any additional tricks trivially.

Andreas

Revision history for this message
Massimo Dal Zotto (dz) wrote :

It is needed for udf (rw) with cd-rw or dvd-rw. Without pktcdvd you can mount these media readonly. /dev/scd0 can be mounted rw only with dvd+rw.

Revision history for this message
Nigel Babu (nigelbabu) wrote :

As you've mentioned, the patch seems to do strange things. I'm adding the patch-needswork tag for now, please feel free to change to patch tag when the patch is ready to be accepted into the ubuntu package or upstream.

tags: added: patch-needswork
removed: patch
Revision history for this message
pirx67 (pirx67) wrote :

I think the patch that I did upload should not be integrated into the ubuntu package or the upstream version.

It only works around the fact that the name for the control device printed from "/proc/misc" changed from "pktcdvd" as expected to "pktcdvd/control". That seems to be caused by a kernel internal interface change that was not completely done correct in this kernel version (2.6.31.6). But the packet writing support in this kernel is broken.

So adding the patch to the Karmic packages would enable the user to configure the packet writing as expected but it still won't work as the function itself seems to be broken. So I think it is better to keep this patch out.

Later kernels fixed the wrong name of the pktcdvd control device (the patch is not needed then) but the packet writing support is still broken as described here (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/526774).

Daniel T Chen (crimsun)
Changed in udftools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.