1

I would like to enable my wifi card automatically at the startup every time. However, the command below requires sudo. I see Hardware Disabled at the wireless connection which blocks the internet access through wireless connection without the sudo command. There is no permanent solution to this problem, since those drivers are buggy so deprecate that feature from this thread. Temporary solution is here such that I run in Lenovo G50-30

sudo modprobe -r ideapad-laptop

which solves the problem until next shut down. The wireless card is disabled in the next startup. The command loads some module to Linux kernel. I do not understand the origin of the bug. The command rfkill list gives

2: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

I cannot use cronjob's @reboot command because it does not run from the cold system as described here.

Unsuccessful modprobe and /etc/init.d/rc.local

One attempt from here. Adding @reboot modprobe -r ideapad-laptop to your crontab would work, but apparently only works when the machine is rebooted not when it comes up cold. So do

sudo echo '@reboot modprobe -r ideapad-laptop' >> /etc/crontab

That will add the line to your cron jobs, but call it at login by adding it in a line to /etc/init.d/rc.local.

How can you enable the modprobe -command at login?

8
  • Have you tried creating a cronjob? Or creating a init script to do that?
    – VGe0rge
    Jul 27, 2015 at 10:55
  • 1
    For the cronjob you just need to create a cronjob with the root account and not yours. You need to login as root and edit your cronjob file with the command "crontab -e". Otherwise, If you don't want to create a cronjob you can create an init script, init scripts are always using the root account to run so you will not have any trouble.
    – VGe0rge
    Jul 27, 2015 at 11:06
  • Both solutions are descent. I would choose cronjob because its the easiest! Also I would suggest to wait some seconds after the reboot to start the job, so I would choose something like this :@reboot sleep 10 && modprobe -r ideapad-laptop
    – VGe0rge
    Jul 27, 2015 at 11:12
  • @VGe0rge Cannot you add this command to some login chain such that you do not run such a command in crontab at specific intervals, but instead only at login. Jul 27, 2015 at 11:16
  • 1
    You can't do that easily, there is a way but it is really complicated and I dont like it so I want present it here. You can't add the command you want to your login chain because you want it to run as root.
    – VGe0rge
    Jul 27, 2015 at 11:21

1 Answer 1

4

Your question is stated in a rather chaotic way, but this is what I understand:

  1. You're talking about enabling your wireless network adapter using a command that requires root privileges (hence run using sudo). The command you're executing actually removes a module (see man modprobe under the -r option).

  2. It was probably suggested that you remove the ideapad-laptop module because it is conflicting with another module. That module is disabled, because the defunct ideapad-laptop module has priority over it.

You were probably unable to find the answer you were looking for, because you were searching for the wrong terms. You'll want to disable the ideapad-laptop module in a process called blacklisting.

Simply create a new file under /etc/modprobe.d/ that starts with .conf, e.g., /etc/modprobe.d/disable_deprecated.conf and add blacklist ideapad-laptop to it. This prevents the module from ever loading. You won't have to run the modprobe command anymore.

4
  • Why does the default debian 8.1 installation have the module which is conflicting another module in Lenovo G50-30? Jul 27, 2015 at 19:05
  • 1
    Laptops are a bit a pain for developers, because many laptops contain specific hardware that are exclusive to those laptops. That means it's hard to develop and test for those devices. I'm sure the Debian didn't put the conflicting module in there on purpose, but you can ask them yourself. It's open source software, so the developers are very accessible and you can even fix the bug yourself and submit it to them! ;) I'm glad I could be of help. Jul 27, 2015 at 20:35
  • 1
    I filed a bug report about the issue and included this thread as a link to them: Bug#793848: Acknowledgement (base: Conflicting module ideapad-laptop in Lenovo G50-30). Jul 28, 2015 at 6:06
  • Brilliant! That was the correct thing to do. I whish people did that more often. Jul 28, 2015 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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