ndiswrapper does not work with >= 2.6.36 kernels

Bug #660664 reported by Eric Appleman on 2010-10-14
166
This bug affects 19 people
Affects Status Importance Assigned to Milestone
ndiswrapper (Ubuntu)
Undecided
Julian Andres Klode

Bug Description

ndiswrapper-dkms will fail to build the module

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ndiswrapper-dkms 1.56-3
ProcVersionSignature: Ubuntu 2.6.35-22.34-genusername 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Thu Oct 14 13:14:51 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100918)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: ndiswrapper

Eric Appleman (erappleman) wrote :
Eric Appleman (erappleman) wrote :
Download full text (3.3 KiB)

eric@kingfisher:~$ sudo aptitude reinstall ndiswrapper-dkms
The following packages will be REINSTALLED:
  ndiswrapper-dkms
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 191kB of archives. After unpacking 0B will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/universe ndiswrapper-dkms all 1.56-3 [191kB]
Fetched 191kB in 0s (207kB/s)
(Reading database ... 179403 files and directories currently installed.)
Preparing to replace ndiswrapper-dkms 1.56-3 (using .../ndiswrapper-dkms_1.56-3_all.deb) ...

------------------------------
Deleting module version: 1.56
completely from the DKMS tree.
------------------------------
Done.
Unpacking replacement ndiswrapper-dkms ...
Setting up ndiswrapper-dkms (1.56-3) ...
Loading new ndiswrapper-1.56 DKMS files...
Building for 2.6.35-22-generic and 2.6.36-0-generic
Building initial module for 2.6.35-22-generic
Done.

ndiswrapper.ko:
Running module version sanity check.

Error! Module version 1.56 for ndiswrapper.ko
is not newer than what is already found in kernel 2.6.35-22-generic (1.56).
You may override by specifying --force.

depmod........

DKMS: install Completed.
Building initial module for 2.6.36-0-generic

Error! Bad return status for module build on kernel: 2.6.36-0-generic (i686)
Consult the make.log in the build directory
/var/lib/dkms/ndiswrapper/1.56/build/ for more information.
dpkg: error processing ndiswrapper-dkms (--configure):
 subprocess installed post-installation script returned error exit status 10
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 ndiswrapper-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up ndiswrapper-dkms (1.56-3) ...
Removing old ndiswrapper-1.56 DKMS files...

-------- Uninstall Beginning --------
Module: ndiswrapper
Version: 1.56
Kernel: 2.6.35-22-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

ndiswrapper.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.35-22-generic/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall Completed.

------------------------------
Deleting module version: 1.56
completely from the DKMS tree.
------------------------------
Done.
Loading new ndiswrapper-1.56 DKMS files...
Building for 2.6.35-22-generic and 2.6.36-0-generic
Building initial module for 2.6.35-22-generic
Done.

ndiswrapper.ko:
Running module version sanity check.

Error! Module version 1.56 for ndiswrapper.ko
is not newer than what is already found in kernel 2.6.35-22-generic (1.56).
You may override by specifying --force.

depmod....

DKMS: install Completed.
Building initial module for 2.6.36-0-generic

Error! Bad return status for module build on kernel: 2.6.36-0-generic (i686)
Consult the make.log in the build directory
/var/lib/dkms/ndiswrapper/1.56/build/ for more information.
dp...

Read more...

Eric Appleman (erappleman) wrote :

DKMS make.log for ndiswrapper-1.56 for kernel 2.6.36-0-generic (i686)
Thu Oct 14 13:28:22 EDT 2010
make: Entering directory `/usr/src/linux-headers-2.6.36-0-generic'
  LD /var/lib/dkms/ndiswrapper/1.56/build/built-in.o
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/crt_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/hal_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/ndis_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/ntoskernel_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/ntoskernel_io_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/rtl_exports.h
  MKEXPORT /var/lib/dkms/ndiswrapper/1.56/build/usb_exports.h
  CC [M] /var/lib/dkms/ndiswrapper/1.56/build/crt.o
  CC [M] /var/lib/dkms/ndiswrapper/1.56/build/hal.o
  CC [M] /var/lib/dkms/ndiswrapper/1.56/build/iw_ndis.o
  CC [M] /var/lib/dkms/ndiswrapper/1.56/build/loader.o
/var/lib/dkms/ndiswrapper/1.56/build/loader.c:834:2: error: unknown field ‘ioctl’ specified in initializer
/var/lib/dkms/ndiswrapper/1.56/build/loader.c:834:2: warning: initialization from incompatible pointer type
make[1]: *** [/var/lib/dkms/ndiswrapper/1.56/build/loader.o] Error 1
make: *** [_module_/var/lib/dkms/ndiswrapper/1.56/build] Error 2
make: Leaving directory `/usr/src/linux-headers-2.6.36-0-generic'

uninstall ndiswrapper and then build from source and post the output please.

Eric Appleman (erappleman) wrote :

Building from source and using module-assistant doesn't work.

Eric Appleman (erappleman) wrote :

Having ndiswrapper-dkms installed also causes the modules to rebuild (and fail) whenever dpkg is called.

Eric, I have ndiswrapper installed on that kernel at home and I can't remember how I got it installed off the top of my head. When I get home tonight I'll look at my notes and let you know.

On 10/14/2010 02:38 PM, Kristopher Clark wrote:
> Eric, I have ndiswrapper installed on that kernel at home and I can't
> remember how I got it installed off the top of my head. When I get home
> tonight I'll look at my notes and let you know.
>
Much appreciated.

I'll take a look on it next week when I'm back from holidays.

Changed in ndiswrapper (Ubuntu):
assignee: nobody → Julian Andres Klode (juliank)
Julian Andres Klode (juliank) wrote :

While I'm forced to take vacation from writing and testing patches due to not having a working computer, could you please do the following:

 * Check for bugs/patches upstream or report one there
 * Check what is done in the kernel.ubuntu.com

This will help me once I have a working computer again (very soon)

Julian Andres Klode (juliank) wrote :

In any case, removing ndiswrapper-dkms should give you a working ndiswrapper as long as you use the Ubuntu kernels.

Eric Appleman (erappleman) wrote :

I am using an Ubuntu kernel and that is not the case.

Linux kingfisher 2.6.36-0-generic #4-Ubuntu SMP Thu Oct 14 13:24:36 UTC 2010 i686 GNU/Linux

FATAL: Module ndiswrapper not found.

are you using the xp drivers? are you putting the sys and inf files in the same directory?

Are you doing this all from command line? You could always apt-get ndiswrapper-gtk to make sure everything is where it needs to be

you can also try installing the next version

these are rpm, but you can convert them using alien

http://packages.sw.be/dkms-ndiswrapper/

"Installing the driver using ndiswrapper -i also results in an invalid driver. The problem is that only the inf file is copied, but not the sys and bin files"

On 10/21/2010 04:59 PM, Kristopher Clark wrote:
> are you using the xp drivers? are you putting the sys and inf files in
> the same directory?
>
> Are you doing this all from command line? You could always apt-get
> ndiswrapper-gtk to make sure everything is where it needs to be
>
> you can also try installing the next version
>
> these are rpm, but you can convert them using alien
>
> http://packages.sw.be/dkms-ndiswrapper/
>
Yes, I have the proper drivers and they work with 2.6.35.

Kristopher: We know the source of the problem. Please stop spamming this bug report with useless questions.

Eric Appleman (erappleman) wrote :

Found this in a Suse rpm.

Allows for a clean compile on 2.6.36 when paired with the 2.6.35 patch.

On 10/22/2010 12:11 PM, Eric Appleman wrote:
> Found this in a Suse rpm.
>
> Allows for a clean compile on 2.6.36 when paired with the 2.6.35 patch.
>
> ** Patch added: "ndiswrapper-suse.patch"
> https://bugs.launchpad.net/ubuntu/+source/ndiswrapper/+bug/660664/+attachment/1706775/+files/ndiswrapper-suse.patch
>
Forgot to mention that insmod'ing the resulting ndiswrapper.ko allows
for a working ndiswrapper on 2.6.36.

Credit goes to <email address hidden> and some guy on the lkml that I can't be
bothered to track down.

While it may work, it might break older kernels and I also do not know whether the lock calls are needed. And the BKL wants to go away anyway in 2.6.37 (disabling BKL as an experimental option), in which case it might not work anymore.

Changed in ndiswrapper (Ubuntu):
status: New → In Progress
tags: added: patch
Jaroslav (jaroslavj) wrote :

I want to confirm that it also does not work on 2.6.37rc3.

John Bryant (johnmbryant) wrote :

An additional patch is now need to fix module compilation on 2.6.38 kernels.

See: bug #739901

John Bryant (johnmbryant) wrote :

Compilation on 2.6.38-7 kernel is working after application of those patches.

Julian Andres Klode (juliank) wrote :

Whether an additional patch is needed or not is irrelevant. As long as the bug has not been closed, it is used for tracking all incompatibilities with kernels 2.6.36, 2.6.37, 2.6.38.

The fixed package is in Debian, and sync is requested.

 ndiswrapper (1.56+r2729-1) unstable; urgency=low
 .
   * Imported Upstream version 1.56+r2729
     - Support for Kernels 2.6.36 - 2.6.38 (LP: #660664, Closes: #604880)
   * Drop patch for Linux 2.6.35, included in snapshot

Changed in ndiswrapper (Ubuntu):
status: In Progress → Fix Committed
summary: - ndiswrapper does not work with 2.6.36 kernels
+ ndiswrapper does not work with >= 2.6.36 kernels
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ndiswrapper - 1.56+r2729-1

---------------
ndiswrapper (1.56+r2729-1) unstable; urgency=low

  * Imported Upstream version 1.56+r2729
    - Support for Kernels 2.6.36 - 2.6.38 (LP: #660664, Closes: #604880)
  * Drop patch for Linux 2.6.35, included in snapshot
 -- Julian Andres Klode <email address hidden> Mon, 04 Apr 2011 13:28:42 +0000

Changed in ndiswrapper (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers