Strange Wifi issues (Linux Mint 17)

hopkins

Active member
Hi everyone,

To give some context, I've been a Windows user in transition to Linux for quite some time now. I'd already noticed some slightly strange behaviour when experimenting with live USBs, for example, that unless I did a live boot directly after a Windows restart, the wifi wouldn't work in the Linux live session. Sometimes after live boots, I'd have to re-enable wireless in the Windows mobility centre.

I finally took the plunge by installing Linux over Windows on my 15.6" Ultranote, and now the wireless won't work at all. I've tried numerous fixes, none of which have yielded anything.

These include:

running "sudo rfkill unblock all" - this does not work, as it it believe the wifi is disabled by a hardware switch, though to my knowledge the Ultranote has no such switch.

Resetting the BIOS by draining the CMOS battery. All this did was make it think it was midnight on a Tuesday.

Installing firmware for the N-2230. I've not noticed any difference.

Right now I'm using an ethernet cable for the internet and it's good and quick, but I really need this machine to be portable.

Sidenote: I tried entering setup by pressing F2 during the boot, but it doesn't seem to be working which is worrying! It's like the BIOS has vanished.
 

hopkins

Active member
Update: I've found a way into the BIOS. Instead of pressing F2 to enter setup (as the screen says) I need to press F7 and then "enter setup" from there. This is strange as I'm sure F2 used to work, but it now gives me the GRUB bootloader.

I've not yet found a setting that enables wifi. If anyone knows how to configure the W550EU BIOS so it might work, please chime in!
 

WortonTech

Bronze Level Poster
The wifi should be enabled by default in the bios really. If you think it should be enabled then read on.

Anyway, if you are presented with a grub menu then it will be looking for grub2.cfg (assuming you are using grub2). On the menu you can type configfile /grub/name.of.config.file and then it will load it. That is assuming that you have followed the grub install guide which is documented on the gentoo forums here http://wiki.gentoo.org/wiki/GRUB2

when in the linux console you need to ensure you can see your wifi card.

If you have not installed already, install pcitools and then do "lspci | grep WiFi" which will give you your PCI cards and filter for wifi cards. If you can see your card then thats a good sign. If not then your bios is blocking it.

Assuming you can see your card, then you need to ensure you have the right driver loaded. This could be 1 of 2 paths:

1. installing the driver from your application installer for example apt-get (depending on your linux distro)
2. compiling your kernel to include your driver (involves running make menuconfig and selecting the kernel options)

usually this will be option 2 as the default linux kernel sometimes does not support the latest and greatest drivers for all the new wifi cards coming out, so it would be a case of downloading a new kernel and configuring for your system. There are lots of guides on how to do this on the net.

Once your driver is up and running you can run iwconfig to get your wifi settings. You also may need to configure wpa_supplicant or networkmanager (if you intend to run gnome) once you have got your drivers up and running.

If your ethernet works then thats half of the battle. At least your stack is up and running. I would go down the path of ensuring your PCI stack is working and your pc can see the network card.
 

hopkins

Active member
Thank you for your advice, this is very helpful! I've run lspci and it did detect my card. It returns:

02:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)

iwconfig returns:

tun0 no wireless extensions.

eth0 no wireless extensions.

lo no wireless extensions.

wlan0 IEEE 802.11bgn ESSID: off/any
Mode:Managed Access Point: Not-Associated Tx-Power=off
Retry long limit: 7 RTS thr: off Fragment thr: off
Power Management: off

I'm not sure how to interpret this information though - does this mean I should download a new kernel and configure my system as you say?

Thanks again
 

WortonTech

Bronze Level Poster
Thank you for your advice, this is very helpful! I've run lspci and it did detect my card. It returns:

02:00.0 Network controller: Intel Corporation Centrino Wireless-N 2230 (rev c4)

iwconfig returns:

tun0 no wireless extensions. This is your VPN tunnel adapter

eth0 no wireless extensions.your ethernet card

lo no wireless extensions.local loopback

wlan0 IEEE 802.11bgn ESSID: off/any wireless card is enabled
Mode:Managed Access Point: Not-Associated Tx-Power=off no essid association - ie no settings in there to connect
Retry long limit: 7 RTS thr: off Fragment thr: offretry settings in there but no settings picked up because of no association
Power Management: off powersave options - can configure in kernel to turn on/off

I'm not sure how to interpret this information though - does this mean I should download a new kernel and configure my system as you say?

Thanks again


I have detailed the things above in bold which will explain.

It looks like you have the wifi card, and drivers installed. Thats looking ok.

Try:
iwlist wlan0 scan

this should give you a result of your local wifi access points. In here you will be able to see your network. If you do great news!

Next have a look if you have wpa_supplicant installed. You should have /etc/wpa_supplicant.conf or /etc/wpa_supplicant/wpa_supplicant.conf.

Because you are using wlan0 as your interface, it appears to me you are not using the latest kernel (which isnt a problem) so wlan0 is the card you need to reference. So in wpa_supplicant.conf you need to configure your settings for your card:

ctrl_interface=/etc/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
ssid="your SSID name"
psk="Your pre shared key password"
proto=RSN
key_mgmt=WPA-PSK #all of proto, pairwise and key_mgmt need to be set if you are using WPA2 with PSK
pairwise=CCMP
# auth_alg=OPEN #you can leave this line out
}


save this fie as your wpa_supplicant.conf and then try to start wpa_supplicant:


wpa_supplicant -Diwlwifi -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf (or the location of your conf file)

(you can replace -Diwlwifi instead if the first command doesnt work for another driver like -Dwext instead)

for reference the -D is for driver name and -i is the interface name. There are no spaces between these letters and the parameter.

also check your network settings file. not sure on mint if this is in /etc/net or /etc/conf.d/net or /etc/networking/net or somewhere. There might be some settings in there you need to configure too.

See where this gets you.
 

hopkins

Active member
Unfortunately iwlist wlan0 scan returned this:

wlan0 Failed to read scan data : Network is down

I checked for wpa_supplicant.conf but it doesn't seem to be there. I have the folder /etc/wpa_supplicant and it contains (with hidden files visible) action_wpa.sh, functions.sh, ifupdown.sh. wpa_supplicant.conf isn't present in /etc/ either. Should I create wpa_supplicant.conf?
 

WortonTech

Bronze Level Poster
Unfortunately iwlist wlan0 scan returned this:

wlan0 Failed to read scan data : Network is down

I checked for wpa_supplicant.conf but it doesn't seem to be there. I have the folder /etc/wpa_supplicant and it contains (with hidden files visible) action_wpa.sh, functions.sh, ifupdown.sh. wpa_supplicant.conf isn't present in /etc/ either. Should I create wpa_supplicant.conf?

try ifconfig wlan0 up

looks like something is not bringing the interface up.

if you edit action_spa.sh, then see what that has in there. That file might invoke the wpa_supplicant line and might be looking at a specific location. If it doesnt then yes you need to create one, and try the one with the settings I included at the top.

There is also something which you need to be aware of with linux in the past 12 months:

There has been a switch to systemd in the last 12 months with most of the distros. What is systemd you may ask? Well historically many of the linux distros used rc to load up. You might recall this by people mentioning /etc/rc.d/. Anyway, rc has been thrown away by a lot of linux distros now because its been around since the year dot, and generally applications move on.

So in a nutshell, both rc and systemd are startup and runlevel daemons. Now in the past, what you have been able to do is create an rc script to start services, like wpa_supplicant which manages your network based on the config file. However, since most distros are now switching to systemd these old rc scripts do not apply anymore.

Systemd uses its on runlevel daemon which is invoked by using the program control systemctl. systemctl is used to add/remove scripts for systemd for the system to boot and operate. There is a high chance that you are going to be using systemd.

Now, systemd has its own network manager program that runs. In fact it is called NetworkManager. Networkmanager is usually what is installed with systemd as the standard service which manages all of your network interfaces, including your wifi. A big but here is that both wpa_supplicant and networkmanager cannot be running at the same time to manage your connections. It is either one or the other. Now networkmanager is good because it provides better GUI, and integrates into Gnome but in my experience its sometimes difficult to configure and get working correctly.

Moreso, this is an issue if you have both rc scripts and systemd installed. The two are not designed to run side by side. It is either rc managing your system or it is systemd, not both. So there might be an underlying cause here of why it is not working.


So if you have no joy with wpa_supplicant then it might be networkmanager which is managing the connections for you. Some things to try:

ps -e | grep wpa_supplicant - will see if wpa_supplicant is running
ps -e | grep network - will tell you if network manager is running
ifconfig wlan up - brings your interface up
systemctl - if you have systemd installed then this will bring up your runlevel targets

If you have systemctl, then we may need to create a .target file to link your wifi into your network.

Oh did I mention I am a complete linux newbie ? :)
 

WortonTech

Bronze Level Poster
Thanks :)

I am full of tech randomness. Its going to help my company over the next few months I believe when I go out rolling out infrastructure for VMware, cisco, microsoft and a load of other stuff.

Anyway, @hopkins i did a quick search for linux mint and found it uses the classic /etc/init.d/networking script so it might be worth doing ifconfig wlan0 down then ifconfig wlan0 up and then trying sudo /etc/init.d/networking restart.

Oh and try creating that wpa_supplicant.conf too
 

hopkins

Active member
You're certainly the most knowledgeable Linux newbie I've come across! I tried ifconfig wlan0 up but it says that rkill is blocking it. You are correct that it uses /etc/init.d/networking - I did restart that after trying rfkill unblock all earlier but forgot to mention it.

I looked through the .sh files in wpa_supplicant and did see some references to a file called wpa.config I tried creating it but at the moment I'm not fully sure how to fill in this information:

proto=RSN
key_mgmt=WPA-PSK #all of proto, pairwise and key_mgmt need to be set if you are using WPA2 with PSK

I do have systemctl I think except it is called sysctl and it returns quite a long list of information when I run it so I wasn't sure what to make of it.

The commands
ps -e | grep wpa_supplicant - will see if wpa_supplicant is running
ps -e | grep network - will tell you if network manager is running
seem to be valid except for some reason nothing at all is returned - it accepts the commands but nothing happens.

Thanks again for the very informative and helpful posts!
 

WortonTech

Bronze Level Poster
Hi.

Well if you put this in the wpa.conf file:

proto=RSN
key_mgmt=WPA-PSK


then you should be ok.

if rfkill is blocking it then this is something that is started on the system with systemd then.

try that in the file and save the file with all the settings in there and then restart networking. If that doesnt give you any joy, then you may have to look at your systemd scripts to work out whats trying to manage your wifi.

Lets see where you get with wpa_supplicant first
 

mishra

Rising Star
You seem to have a lot of problems with this. It usually is a matter of few changes and off you should go. Not sure if this will help but it's worth having a look. This is what I did for my little Pi project, but similar worked for my ubuntu laptop. I am not familiar with your version of Linux, but if it's DEB based .. it should be the same stuff.

1. Check if your wireless card is detected in OS
$ sudo lsusb

2. Check if it shows under ifconfig
$ sudo ifconfig

3. Once you can see all correct entries you should be good to go to change WiFi setings:
$ sudo vim /etc/network/interfaces

My interfaces file looks like this:

Code:
auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet dhcp
wpa-ssid <YOUR SSID>
wpa-psk <YOUR PASSPHRASE/KEY>

4. Save the file and reboot your linux computer using:
$ sudo init 6

5. Hope this helps...

PS. On step 3. you may want to use Nano, Pico ($ sudo nano /etc/network/interfaces) or any other editor rather than vim if you are not familiar with it .. I think it's great, but my work colleagues think I'm just crazy!
 
Last edited:

hopkins

Active member
Thanks for the help everyone!

I have bad news, however. As a test, I reinstalled Windows 7 and the wifi seems to be irrevocably switched off there too. So this can't be some Linux compatibility/configuration issue; I think my wireless card has been bricked somehow. I ran the Intel Wireless diagnostics and it passes the first two tests - device and drivers - and fails the 3rd, which checks if the radio capability is on. It says it's hardware disabled.

Anyone know what to do? I'm at a loss.

PS I reckon I'll install Fedora Linux very soon, so I'm not going to be keeping Windows on it for very long.
 

hopkins

Active member
PROBLEM SOLVED

I phoned PCS again and it turned out all I had to do was press fn+F11.

I can't believe it. All that trouble for such a simple fix.

Sorry for being a silly billy guys.
 

alexdw

Member
Glad to hear you got it fixed. :) And it wasn't that silly - personally I wouldn't expect the airplane mode button to work out of the box with Linux, did you do Fn+F11 in Windows?
 

hopkins

Active member
Yes I did, although I can confirm the wireless also works in Fedora Linux without the need of manually installing extra drivers or other extra hassle.
 
Aw boogur :) Fat lot of use now, but I should've thought of that! I had a Clevo netbook, badged Mesh Computers, once that came preinstalled with Ubuntu. I had the same issue but fortunately the manual noted that Fn F11 toggled the wireless on/off. Strangely it had arrived toggled off. It's an easy fix once you know about it! That also means that that control also works in Ubuntu.

Glad it all works now. You had me worried for a while there as I'm just waiting on delivery of an Ultranote which is going to run Ubuntu 14.04 Unity or Gnome3 (or both :).

Better luck with the rest of the experience :)
 
Top