Why do I have to turn on wifi by commands every time Ubuntu starts?

6,813

Solution 1

Make sure the wifi is on and working then run the following command to blacklist the module.

echo "blacklist ideapad-laptop" | sudo tee -a /etc/modprobe.d/blacklist.conf    

Reboot.

Solution 2

modprobe -r is used to remove a kernel module. You can blacklist the module so that you donot have to remove it after every boot. For this open a terminal and type:

sudo nano /etc/modprobe.d/blacklist.conf 

By the above command we are asking nano, the Ubuntu GUI text editor to open /etc/modprobe.d/blacklist.conf. But normal users do not have permission to write to this file. So we use sudo to run the command with root privileges.

Add the name of the module you want to blacklist to the file opened using the following format:

blacklist driver-name

To exit, press Ctrl + X followed by y (for Yes).

Since you asked, when using Linux, you never have to type in the same commands everytime the system boots. You can automate it. If you want a particular command to be executed every time Ubuntu boots, just add this to /etc/rc.local. For this, open a Terminal and type, :

sudo gedit /etc/rc.local

Once gedit is opened, write the command you want to execute during bootup starting from the second last line, ie. before exit 0. Save and exit.

Solution 3

Pilot6 has a PPA that will fix the problem without blacklisting ideapad-laptop

First we need to add the PPA

sudo add-apt-repository ppa:hanipouspilot/ideapad-laptop 

Then we can install it with

sudo apt-get update && sudo apt-get install ideapad-laptop-dkms

Then reboot

The only possible problem is if you have a broadcom wifi card that uses bcmwl because this will update your kernel to the 3.16 series and you would need the utopic version of the bcmwl-kernel-source that is here

Share:
6,813

Related videos on Youtube

noel
Author by

noel

Updated on September 18, 2022

Comments

  • noel
    noel over 1 year

    I have Ubuntu 14.04 LTS installed on a Lenovo G50-30. When I installed Ubuntu I got some troubles with the WiFi. I couldn't turn it on/off.

    I searched on Internet and found out some commands to fix it and it worked. But, every time Ubuntu starts I have to type this command to get WiFi up:

    sudo modprobe -r ideapad-laptop
    

    What can I do to fix this?

    Also how do I run commands automatically every time the system boots?

    • daltonfury42
      daltonfury42 almost 9 years
      You must have forgot to blacklist a module, see my answer.
  • Wild Man
    Wild Man almost 9 years
    your answer is not totally correct?
  • daltonfury42
    daltonfury42 almost 9 years
    @WildMan, please tell me why, so that I can remove any mistakes.
  • Wild Man
    Wild Man almost 9 years
    You say "By the above command we are asking gedit, the Ubuntu GUI text editor to open '/etc/rc.local' but it opens this file '/etc/modprobe.d/blacklist.conf' and there is always a possibleily that sudo being run with gui could allow root to take ownership of the files.
  • daltonfury42
    daltonfury42 almost 9 years
    @WildMan Thanks! now I realize why gksudo needs to be used. usually use nano.
  • Pilot6
    Pilot6 almost 9 years
    This will not upgrade kernel. You mixed it with another ppa. But I did not tested it with 3.13, that's true.
  • noel
    noel almost 9 years
    Thanks so much, your answer were so helpful and it worked! :)
  • Jeremy31
    Jeremy31 almost 9 years
    If it worked, then you can accept the answer and hope that the answer helps others with some of the Lenovo G50-30, G40-30, and G50-70 models that are hard blocked. If other models are found, Pilot6 can update his PPA with the info. Please consider filing a bug report so that this info can be put into the kernel