# [SOLVED] Ubuntu 11.04 wifi issues



## deleted6052011 (Jul 16, 2009)

Hi :wave:

My usb wifi driver had previously been installed, but needed to be reinstalled when a linux kernel update was released. About 2 months ago, the install failed with an error, and I have been unable to install it since. The driver for the wifi adapter is available here.

I have attached the output of the terminal with the error and the output of lsusb. I am currently using kernel 2.6.38-8-generic.

Carl


----------



## hal8000 (Dec 23, 2006)

*Re: Ubuntu 11.04 wifi issues*

As long as you are running a the 32bit Ubuntu 11.04 version and 32bit kernel then you should be ok.

Have a look at this thread:

[ubuntu] edimax ew-7811Un wireless usb adapter, problems with linux drivers and ndiswrapper - Ubuntu Forums

The realtek 8192c driver is available for download on the thread, if it does not install correctly and you still have errors then you may also have to manually edit the source code of the driver, but see if the thread helps first.

You also have a mutex error as reported by the kernel:

osdep_service.c:291:2: error: implicit declaration of function ‘init_MUTEX’

In your case you have to open os_dep/osdep_service.c with a text editor and look around line 291. Find init_MUTEX and change it to sema_init. If there is more than one occurrence of init_MUTEX then change each to sema_init


----------



## deleted6052011 (Jul 16, 2009)

*Re: Ubuntu 11.04 wifi issues*

Thanks hal, I managed to get it working. I edited the 'init_MUTEX', and had to uncomment a line in usb_intf.c.

However, I now have another issue. The adapter keeps disconnecting and reconnecting randomly when on battery power. With the battery removed and on a.c power, it works fine. The line I edited in usb_intf.c was *// pdvobjpriv->pusbdev->autosuspend_delay = 0 * HZ;//15 * HZ; idle-delay time*, maybe this has something to do with it?

Thanks for your help so far :smile:


----------



## hal8000 (Dec 23, 2006)

*Re: Ubuntu 11.04 wifi issues*



afccarl666 said:


> Thanks hal, I managed to get it working. I edited the 'init_MUTEX', and had to uncomment a line in usb_intf.c.
> 
> However, I now have another issue. The adapter keeps disconnecting and reconnecting randomly when on battery power. With the battery removed and on a.c power, it works fine. The line I edited in usb_intf.c was *// pdvobjpriv->pusbdev->autosuspend_delay = 0 * HZ;//15 * HZ; idle-delay time*, maybe this has something to do with it?
> 
> Thanks for your help so far :smile:


Hi, the line you edited is auto suspend for usb devices, so this is probably your error. I hope you made a backup of the file before changing it, because you need to put those settings back.
Be careful altering any configuration file, the only exception is when configuration files dont work properly as in the case of the Edimax driver.


----------



## deleted6052011 (Jul 16, 2009)

*Re: Ubuntu 11.04 wifi issues*

I do have the file backed up, so I will put it back. I read that part in the thread you linked to which is why I edited it.

With the standard file, I was getting an autosuspend_delay error. I have attached the terminal output below.


----------



## hal8000 (Dec 23, 2006)

*Re: Ubuntu 11.04 wifi issues*

Yes its annoying when hardware doesn't work properly. You will find that that particular driver will be included into the linux kernel at a later date, then it will work without editing the files, but not sure when it will be available.

One good link for future reference is the Linux HCL, I always check this before buying any
hardware.


----------



## deleted6052011 (Jul 16, 2009)

*Re: Ubuntu 11.04 wifi issues*

Well other than the odd disconnection every so often, its working fine. It actually seems to disconnect when the battery is low, and the battery capacity is only 25%. My memory sticks also do not work properly with the USBs at the same time, whereas my external HDD that has its own PSU does. This is leading me to believe the issue with the adapter when running on battery is in fact a power related issue, so for now I have left the modified version of the driver installed.

As the laptop is a dual boot with XP and I'm the only one that uses Ubuntu, I never gave it a second thought about compatibility, though I think I will in the future.

Thanks for all of your help, I'll mark this as solved. :smile:


----------

