Lenovo Yoga 2 Disabled WiFi Hack

I decided to dual boot my Lenovo Yoga 2 (PN: 59408081, non pro) with Ubuntu & Windows 8. I ran Ubuntu off a USB stick as a LiveCD and my wireless network was disabled. I didn’t think anything of it right away and booted back into Windows. Oddly enough it was disabled in Windows too. I ran the Intel wireless diagnostic tool and it told me that the WiFi hardware switch is off. I thought easy enough, I looked through my functions keys several times and all the around the machine, no WiFi switch. Then a quick Google search reveled the answer, Ubuntu is using a wireless module that believes the machine actually has a wireless hardware switch and sent the WiFi module the hardware off command with no way to issue a hardware on command. All of the fixes online pertain to the Pro addition and those “fixes” did not work for me. I’ve spent hours looking for the fix that pertained to this model.

Unfortunately this laptop does not have an Ethernet jack, so issuing the commands in the instruction below will be rather difficult. I tried to download the packages on another computer and move them over but there was just so many dependencies it didn’t work out. I ended up purchasing a Linux compatible USB to Ethernet adapter.

This is the adapter I bought: Inateck 3 Port USB 3.0 Bus-Powered Hub with RJ45 10/100/1000 Gigabit Ethernet Adapter

The procedure below worked for a Lenovo Yoga 13 (not pro) with the Intel 7260 Wireless Card and Ubuntu 14.04 x64. I would only recommend using my pre-compiled module if you have the same kernel version.

$ uname -r
3.13.0-24-generic

The credit for this hack goes to Bryon Roché over at Ask Ubuntu

I have zipped the modified kernel module, compiled module and makefile. If you choose to go this route simply extract the contents to your home directory and follow the instructions starting with step 5. Download module.zip

1. Download the kernel source

$ sudo apt-get install build-essential linux-headers-$(uname -r)
$ cd ~/module
$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-trusty.git
$ cp ~/module/ubuntu-trusty/drivers/platform/x86/ideapad-laptop.c ~/module/ideapad/
$ cd ~/module/ideapad/

2. Update the function ideapad_rfk_set(void *data, bool blocked) in ideapad-laptop.c

static int ideapad_rfk_set(void *data, bool blocked)
{
struct ideapad_rfk_priv *priv = data;

/* hack to unblock wireless by sending 1 to these bits */
write_ec_cmd(priv->priv->adev->handle, VPCCMD_W_RF, 1);
write_ec_cmd(priv->priv->adev->handle, VPCCMD_W_BT, 1);
write_ec_cmd(priv->priv->adev->handle, VPCCMD_W_WIFI, 1);
return 0;
/* */

return write_ec_cmd(priv->priv->adev->handle, priv->dev, !blocked);
}

3. Create a file named Makefile:

Its very important to tab in the lines under “all:” & “clean:,” otherwise it will error out.

obj-m += ideapad-laptop.o

all:
     make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
     make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

4. Build the new module

$ cd ~/module/ideapad/
$ make

5. Load the module

$ cp /lib/modules/3.13.0-24-generic/kernel/drivers/platform/x86/ideapad-laptop.ko ~/ideapad-laptop.ko.backup
$ sudo cp ~/module/ideapad/ideapad-laptop.ko /lib/modules/3.13.0-24-generic/kernel/drivers/platform/x86/
$ sudo modprobe -r ideapad-laptop
$ sudo modprobe ideapad-laptop
$ sudo rfkill unblock all
$ sudo modprobe -r ideapad-laptop
$ sudo mv ~/ideapad-laptop.ko.backup /lib/modules/3.13.0-24-generic/kernel/drivers/platform/x86/ideapad-laptop.ko

6. Blacklist the ideapad module

$ cd /etc/modprobe.d/
$ sudo echo 'blacklist ideapad-laptop' > blacklist-ideapad.conf

7. Reboot

Profit.