Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I just got the Surface Pro and, after much hassle, managed to install Ubuntu in it - currently using 12.10. Everything works mostly fine out of the box with the exception of the wireless adapter. It is a Marvell's 88W8797.

I have heard of people using ndiswrapper but I don't how to use it and I have neither found the damn driver :/

Thanks is advance for any replies :)

share|improve this question
    
There are some good answers here and the manual fix works fine for the most part. Has anyone been able to automate this on 13.04 Desktop release? Alp's WPA GUI solution isn't working. I tried declaring the wpa_supplicant & dhclient in /etc/rc.local with no avail. –  Brandon Clark May 2 '13 at 18:40
add comment

3 Answers

up vote 4 down vote accepted

Building up on Doug's manual fix to the problem, I was actually able to automate the process pretty easily. I'm writing this for people who are new to this thread so bear with me while I repeat some things that some of you may already know.

First of all, we need to grab the wpa_gui application in order to replace the NetworkManager service.

sudo apt-get install wpagui

Then we need to edit the /etc/network/interfaces file.

sudo gedit /etc/network/interfaces

Replace everything in this file with:

    auto lo
    auto mlan0
    iface lo inet loopback
    iface mlan0 inet manual
            wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

The "auto mlan0" line is crucial here because it's what starts the wpa_supplicant daemon automatically at startup. Just like Doug's fix, we still set manual configuration to our mlan0 but instead now just point it to the wpa_supplicant.conf configuration. And the final important bit is that we want our internet to automatically acquire the dhcp from the router, so that's what the last line is doing.

We then go into /etc/wpa_supplicant/ to edit the configuration file.

sudo gedit /etc/wpa_supplicant/wpa_supplicant.conf

This configuration file is a big deal because it will contain network passwords. We want to edit this file initially, and then just relegate any future edits to strictly the GUI. To do that, add the following into the file.

    update_config=1
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Now in the terminal, run the following code to first add your user to the 'netdev' group and then lock this config file down.

sudo adduser YOUR_USER_NAME netdev
chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf

The next order of business is to prevent NetworkManager from running on startup.

sudo mv /etc/init/network-manager.conf /etc/init/network-manager.conf-disabled
sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop.disabled

Finally, we want WPA_gui to start on boot. Since this app doesn't have a service, we just do this from Ubuntu's own Startup Applications tool. Just search for it in Dash Home, click 'Add', write 'wpa_gui -t' into the command section and call it WPA GUI (or anything you want). The -t option is important because it starts wpa_gui in the tray. Save and restart.

Start the gui tool through the icon. mlan0 should be visible under the Adapter list now. Click on 'Scan', select your network of choice, enter your password and watch it connect automatically. Once you're done changing settings, go to File->Save Configuration to save everything. Your Surface Pro will connect to your WiFi automatically from now on.

Thanks go out to XRunHProf's excellent post on configuring WPA on Debian for this. http://xrunhprof.wordpress.com/2009/09/19/setup-wpa_gui-and-roaming-on-debian/

share|improve this answer
    
I wanted to add your fix to my dual boot instructions but wpa_gui just doesn't want to work on 13.04. I will mess with it some more later and hopefully find a way to get this method working. –  Brandon Clark May 2 '13 at 18:21
    
It would be great if you could provide a link to XRunHProf's post if possible. Good work. –  Brandon Clark May 2 '13 at 18:54
    
I have the Surface Pro 128GB and installed Ubuntu 12.10. I followed your description exactly but my network adapter is not in the list of wpa_gui. The "status says: "Could not get status from wpa_supplicant" and when I try to add a new network I get the message: "Failed to enable network in wpa_supplicant configuration" What have I done wrong! Any help will be appreceated. –  isphording90 Jun 29 '13 at 18:06
    
@isphording90 - You should take a look at Doug's Maxwell Wi-Fi driver fix further down on this page. Ubuntu isn't going to see the wireless card until the drivers are sorted out. The problem with Doug's solution is that even after the driver fixes, you have to restart the network drivers every time you reboot the computer for it to start working. My post builds up on his solution and automates this process by taking control away from the built-in Network Manager and hand it over to wpasupplicant process (controlled by a wpa_gui front-end). –  Alp Dener Aug 30 '13 at 18:10
add comment

I was able to get the driver working with the new firmware that chili555 provided, but had to disable NetworkManager to do it. I entered uap0 and mlan0 in the /etc/network/interfaces file to disable NetworkManager from managing them:

iface mlan0 inet manual
iface uap0 inet manual

Then I restarted, and turned off the network manager service:

service network-manager stop

Then I created an /etc/wpa_supplicant.conf file:

ctrl_interface_group=0
ctrl_interface=/var/run/wpa_supplicant
network={
    scan_ssid=1
    ssid="mySid"
    key_mgmt=WPA-PSK
    psk="passwordGoesWhere?"
}

I ran wpa_supplicant in command line with debug mode to get things working:

/sbin/wpa_supplicant -dd -imlan0 -c/etc/wpa_supplicant.conf -Dwext,nl80211

And once that connected, I ran dhcp to get my IP address:

/sbin/dhclient mlan0

It's not automated, and I'm sure there are other ways to do this better, but it confirmed that my network card works and connects.

share|improve this answer
    
I've spoken with Bing Zhao from Marvell and he told me that, just like you are saying, mlan0 and uap0 are to blame. He suggested me a diff patch. Going to link a dropbox file: dl.dropbox.com/u/14012206/diff_patch_marvl_wifi I couldn't manage to apply it because I didn't have a main.c file under mwifiex but it might help others. –  OttoRobba Mar 1 '13 at 21:05
    
This fix is unfortunately rather out of reach of many Ubuntu users as it requires them to recompile the kernel after applying the patches. I read about his suggestion online as well on message boards and couldn't follow through. Here's to hoping that they have this built into 13.10, going forward. There's a bug report for it so it's a possibility. –  Alp Dener Aug 30 '13 at 18:15
add comment

I believe this is attached to a USB bus on the motherboard. Please run:

lsusb

Do you have either 1286:2043 or 1286:2044? If so, it uses the driver mwifiex_usb already in the kernel. However, according to modinfo, it requires firmware not currently included in the linux-firmware package:

$ modinfo mwifiex_usb
filename:       /lib/modules/3.5.0-23-generic/kernel/drivers/net/wireless/mwifiex/mwifiex_usb.ko
firmware:       mrvl/usb8797_uapsta.bin
license:        GPL v2
version:        1.0
<snip>

The firmware package is included in the Raring (13.04) linux-firmware package which I've extracted. You can get it here: https://dl.dropbox.com/u/58267392/mrvl.zip

Drag and drop the package to your desktop. Right-click it and select 'Extract Here.' Now, in a terminal, do:

cd Desktop
sudo cp mrvl/* /lib/firmware/mrvl

Now we unload the driver and reload it so it sees the shiny new firmware:

sudo modprobe -r mwifiex_usb && sudo modprobe mwifiex_usb

Your wireless should now be working.

share|improve this answer
    
Tried what you suggested - it "kinda" works. The new firmware works for recognizing the wifi (and the bluetooth, as a positive collateral) but it is not able to connect. It asks for the password, attempts to connect but fails. It is the 1286:2044 device. –  OttoRobba Feb 25 '13 at 11:01
    
Is your router set to WPA and WPA2 mixed mode? You may have better luck with WPA2 only. Is your router set to 802.11 B, G and N? You might try with N turned off; that is B and G only. –  chili555 Feb 25 '13 at 14:15
    
Awesome! Glad it's working. –  chili555 Mar 13 at 1:57
    
chili555, I have installed 13.10 and all I did wat to switch my router to WPA2 only (not mixed mode) and it worked!!!! It was not working when I had it in mixed mode, you are my savior!!! thanks a lot. thanks man. –  Alex Mar 19 at 3:50
add comment

protected by Community Aug 10 '13 at 19:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.