Lenovo E540 and Ubuntu Wireless and rtl8723be problem – Updated

By the end of 2013 my laptop was old and slow I had few problems with it, so I decided to made myself a present for my birthday and for the Christmas. I did some research and I find the laptop which covers my requirements – Lenovo E540. Because I’m a Linux user for several years, I know that sometimes you have some small issues with drivers for touchpad, function buttons or something else, so I asked Google: “Lenovo E540 Ubuntu” (because I’m mostly a Ubuntu user).

The very first result was this: Ubuntu on Lenovo ThinkPad E540, where I saw this: “The Lenovo ThinkPad E540 notebook with the components described below has been awarded the status of Certified Pre-Install for Ubuntu.“. Sounds great, right?

Well… yes, but no!

The problem

I’ll explain what is the main reason to say no. In my previous experience with Linux installation if I’m wired with cable during the installation process the OS downloads the necessary drivers and after the install is complete I have properly WiFi on my laptop. Which I haven’t when I install Ubuntu 13.04 in my new laptop.

My Lenovo E450 has RTL8723BE Wireless card and apparently RTL8723BE card doesn’t have drivers for Linux. Cool, right? After some search on askubuntu.com I found the solution which works for me.

In this question somebody asked for the same problem as mine and hopefully there was a solution. Thanks to chili555’s answer which fixed our issue.

Install the wireless driver

Here are the several steps for installing working RTL8723BE driver from GitHub:
Open your terminal and paste several lines:

sudo apt-get install linux-headers-generic build-essential git
git clone http://github.com/lwfinger/rtl8723be
cd rtl8723be
sudo make install
sudo modprobe rtl8723be

*The first line is in case you don’t have a Git installed.

I was very happy when this do the magic and I was able to remove the cable and to start to using my laptop with working Wireless.

But then I had another problem. From time to time I lost the Internet connection and after that I couldn’t connect again. The only solution which helps at that time was to reboot my machine and then the wireless connection works again. Until the next connection drop. You could imagine how inconvenient is this, so I started to search solution for my second problem.

Modprobe reload

I can’t remember from where I found it, but it was really simple. Just reload the modprobe:

sudo modprobe -r rtl8723be
sudo modprobe rtl8723be

Now if the connection is lost, I just enter those two lines and the wireless. The wireless is restarted and I can continue with browsing in the deep water of Internet. I’m hoping that in the near feature we will have official Linux driver and we can forget about this problem.

Updates – 20.05.2014

Couple of months later I decided to switch to Fedora for some time, but in the end of the day I installed Ubuntu 14.04 and I faced the same problem with the Wireless. Yeah, bigger version number, but with the same problem. The driver from GitHub didn’t worked for me anymore, so I had to search for other solution. Pretty annoying, I know!

Anyway, after few tickets in Launchpad (here and here) and waiting for the patches I’m happy to share with you that in the next kernel updates we will have properly working drivers. Finally!

Huge “Thank you!” to Adam Lee who build custom kernel for me(and not only!) with properly working driver until we are waiting for the official one!

That’s why I love and I’m using Open Source!

21 responses to “Lenovo E540 and Ubuntu Wireless and rtl8723be problem – Updated”

  1. Milos Avatar

    Hi, thanks for leaving this information. I have a problem on “make” step, it seems it does not finish without errors and I’m unable to continue. You can see the message [here](http://tny.cz/2b2ecd2c).

    I hope you could give me some advice on how to go through this step…

    1. Stanko Metodiev Avatar

      I’m not sure if this is related, but I’m with older kernel version. You could take a look here or if this doesn’t help, you could add new Issue here and to ask the driver developers

  2. braykov Avatar

    Успя ли да си оправиш драйвера в крайна сметка?
    Аз съм с S540 и от ноември се боря с него. И мисля, че постигнах стабилност вече.
    Няма нужда от modprobe манипулации.
    Пиши ако ти трябва повече инфо.

    1. Stanko Metodiev Avatar

      Да, точно днес подкарах новите driver-и за Ubuntu 14.04 и обнових поста 🙂
      Иначе с описаното по-горе няколко месеца нямах никакви проблеми.

  3. ibabukova Avatar

    Hi all,
    I have exactly the same issue with Ubuntu 14.04 and I tried this solution, but there is problem with the “make”. When I am in the rtl8723be directory and I type make on terminal, I have the following output:

    make -C /lib/modules/3.13.0-27-generic/build M=/home/iva/rtl8723be modules
    make[1]: Entering directory `/usr/src/linux-headers-3.13.0-27-generic’
    CC [M] /home/iva/rtl8723be/regd.o
    In file included from /home/iva/rtl8723be/regd.c:31:0:
    /home/iva/rtl8723be/regd.c: In function ‘_rtl_reg_apply_beaconing_flags’:
    /home/iva/rtl8723be/regd.h:37:32: error: ‘IEEE80211_CHAN_NO_IR’ undeclared (first use in this function)
    #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
    /home/iva/rtl8723be/regd.c:200:20: note: in expansion of macro ‘IEEE80211_CHAN_NO_IBSS’
    ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
    /home/iva/rtl8723be/regd.h:37:32: note: each undeclared identifier is reported only once for each function it appears in
    #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
    /home/iva/rtl8723be/regd.c:200:20: note: in expansion of macro ‘IEEE80211_CHAN_NO_IBSS’
    ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
    /home/iva/rtl8723be/regd.c: In function ‘_rtl_reg_apply_active_scan_flags’:
    /home/iva/rtl8723be/regd.h:34:37: error: ‘IEEE80211_CHAN_NO_IR’ undeclared (first use in this function)
    /home/iva/rtl8723be/regd.c:237:19: note: in expansion of macro ‘IEEE80211_CHAN_PASSIVE_SCAN’
    if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
    /home/iva/rtl8723be/regd.c: In function ‘_rtl_reg_apply_radar_flags’:
    /home/iva/rtl8723be/regd.h:37:32: error: ‘IEEE80211_CHAN_NO_IR’ undeclared (first use in this function)
    #define IEEE80211_CHAN_NO_IBSS IEEE80211_CHAN_NO_IR
    /home/iva/rtl8723be/regd.c:312:8: note: in expansion of macro ‘IEEE80211_CHAN_NO_IBSS’
    IEEE80211_CHAN_NO_IBSS |
    /home/iva/rtl8723be/regd.c: In function ‘_rtl_regd_init_wiphy’:
    /home/iva/rtl8723be/regd.h:40:38: error: ‘REGULATORY_CUSTOM_REG’ undeclared (first use in this function)
    /home/iva/rtl8723be/regd.c:410:18: note: in expansion of macro ‘WIPHY_FLAG_CUSTOM_REGULATORY’
    /home/iva/rtl8723be/regd.h:43:38: error: ‘REGULATORY_STRICT_REG’ undeclared (first use in this function)
    /home/iva/rtl8723be/regd.c:411:19: note: in expansion of macro ‘WIPHY_FLAG_STRICT_REGULATORY’
    wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY;
    /home/iva/rtl8723be/regd.h:46:41: error: ‘REGULATORY_DISABLE_BEACON_HINTS’ undeclared (first use in this function)
    /home/iva/rtl8723be/regd.c:412:19: note: in expansion of macro ‘WIPHY_FLAG_DISABLE_BEACON_HINTS’
    make[2]: *** [/home/iva/rtl8723be/regd.o] Error 1
    make[1]: *** [_module_/home/iva/rtl8723be] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-27-generic’
    make: *** [all] Error 2

    I have tried everything I have read and I know to fix the issue, but it still doesn’t work. I have no idea ow to fix it. Some help will be really appreciated, thank you.

    1. Stanko Metodiev Avatar

      Did you check updated version of the post? I’m using custom 3.13 kernel, which is available for download from one of the two links in update section of this blog. I couldn’t help you with more information, but if there is no answer to your question, you could create a new bug and to describe the problem. Good luck!

  4. Roberto Crisanti Avatar

    Define “properly working drivers” because I’m on ArchLinux with kernel 3.15.something and the drivers are THE WORSE I’VE EVER SEEN.
    Yes, it connects but the connection is terribly slow (yeah 115ms to ping the local gateway) and disconnets every other minute.

    1. Stanko Metodiev Avatar

      Hi, Roberto and thanks for stopping by.
      As you can see the post title has “Ubuntu Wireless” on it, so you could guess all of the comments/updates are Ubuntu’s related. Sorry to hear that you have problems with ArchLinux drivers, but I can’t help you with that 🙁

  5. borsanta Avatar

    somebody has an idea to make bluetooth on this machine? I mean, shared hardware must share firmware solution… but i still cannot make bluetooth work…

  6. Rohit Avatar

    @Stanko Hi I have a lenovo e440 laptop with the same realtek driver. I am also facing the same issues as you. I did the following commands
    git clone http://github.com/lwfinger/rtl8723be
    cd rtl8723be
    git checkout 604aa9058fb9e5bb1cf571c99989d081f8fc8b9
    sudo make install
    sudo modprobe rtl8723be

    But still internet disconnects in between. I didnt understand how you made Adam’s patch work. Could you please guide me ?

    1. Stanko Metodiev Avatar

      At this time I used kernel version suggest on comment #22 from https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1320070

      1. Rohit Avatar

        Hi Stanko..Could you please tell me how to use it ?

        1. Stanko Metodiev Avatar

          It was few months ago, so I’m not sure for the exact steps, but I think I downloaded and installed custom kernels(ask google, there are plenty of tutorials) and after that the WiFi was working okay.
          btw, did you try to update with the latest kernel versions from the official repository? Most of the people have confirmed the fix. Also you could take a look at this too: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1240940

  7. Pascal Avatar

    I became an error by use the command make.

    Output: make: *** /lib/modules/3.16.6-203.fc20.x86_64/build: File or directory not found. End

    Any Idea how resolve this problem?

    1. Stanko Metodiev Avatar

      Did you try with the newest kernel version? It works for me – 3.17.0-031700rc4-generic

  8. Bas Avatar

    Thanks this worked for me, but used the updated link on github:

    1. Stanko Metodiev Avatar

      I’m using the drivers from the kernel, I guess. Currently I’m with “Linux metodiew 3.17.0-031700rc4-generic” kernel version and it works great for me

  9. markotikvic Avatar

    I found a fix on Ubuntu forum that goes like this (this is on Lenovo B50-70 with RTL8723BE wifi adapter and Ubuntu 14.04 64b – 3.16.0-31-generic kernel version):

    1. Open terminal (Ctrl + Alt + T)
    2. c/p “cd /etc/modprobe.d/” and press enter (do not include quotation marks)
    3. c/p “sudo gedit rtl8723be.conf” and press enter
    4. you will be prompted for your password – enter it
    5. after text editor opens just c/p this into it “options rtl8723be fwlps=0″ (again without the ” “)
    6. save the document and reboot

    The fwlps flag, when set to “1” is supposedly allowing wifi adapter to go to sleep, which than halts your connection. By setting this flag to “0” we are making the adapter “stay awake” the entire time laptop is running.

    Hope this helps.

    1. Stanko Metodiev Avatar

      Thanks for the update! 🙂
      btw, I’m with 3.17.4-031704-generic kernel version for the past few months and I don’t have any issues with the network.

  10. Elad Richardson Avatar

    What would you say the situation is now with running Ubuntu on the E450 out of the box?
    I’m considering buying it with the intent of installing ubuntu, but had a lot of problems with the U310 wifi drivers and not willing to go through that again 😛

  11. Geoid Avatar

    Markotikvic solution above works for me on Thinkpad Edge E450.
    I’m on Linux Mint 17.2 (Rafaela), an Ubuntu 14.04 derivative.

    Thanks, Marko.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.