3

Under Elementary OS Juno, I am trying to use Mediatek M7630e WiFi, which doesn't work. I know that in Fedora 29 with the officially supported Linux 4.20 it does instead, even if not perfectly - I tried it before. The output of lshw -C network is:

*-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 10
       serial: 14:dd:a9:05:d1:dc
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168g-3_0.0.1 04/23/13 ip=192.168.1.132 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:18 ioport:e000(size=256) memory:f7204000-f7204fff memory:f7200000-f7203fff
  *-network UNCLAIMED
       description: Network controller
       product: MT7630e 802.11bgn Wireless Network Adapter
       vendor: MEDIATEK Corp.
       physical id: 0
       bus info: pci@0000:03:00.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: cap_list
       configuration: latency=0
       resources: memory:f7100000-f71fffff

and the one of lspci is:

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter

I used the standard Linux kernel 4.15.0.*-generic before and Mediatek M7630e WiFi didn't work. So I used this driver https://github.com/neurobin/MT7630E.

However, since a certain version of Linux, installed via apt-get upgrade, that driver only corrupted the kernel and thus I stopped using it.

On the driver issues page https://github.com/neurobin/MT7630E/issues/90, I've got to know the driver was to be released for Linux 4.20, officially. Thus I download it - and even Linux 5.0.2, which I am using now. I compiled Linux 5.0.2 with:

cd ~/linux-5.0.2
cp config-4.15.0-46-generic .config # doesn't support MT7630e; the rest works fine, even Ethernet does
make menuconfig # and mark Network device support -> Wireless LAN -> Mediatek MT76x0E (PCIe) support as module (the tool suggested so)

make
sudo make modules_install
sudo make install

I restarted the machine and gave lsmod | grep mt. The output is:

mt76x0e                20480  0
mt76x0_common          45056  1 mt76x0e
mt76x02_lib            61440  2 mt76x0e,mt76x0_common
mt76                   49152  3 mt76x0e,mt76x02_lib,mt76x0_common
mac80211              819200  4 mt76,mt76x0e,mt76x02_lib,mt76x0_common
cfg80211              675840  2 mt76x02_lib,mac80211

The output of dmesg | grep mt is instead:

[    0.119358] Performance Events: PEBS fmt2+, Broadwell events, 16-deep LBR, full-width counters, Intel PMU driver.
[   15.286109] mt76x0e 0000:03:00.0: ASIC revision: 76300002
[   15.286204] mt76x0e 0000:03:00.0: Direct firmware load for mediatek/mt7650e.bin failed with error -2
[   15.286816] mt76x0e: probe of 0000:03:00.0 failed with error -2

Finally, the output of ip a doesn't show the WiFi and it is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether xx:xx:xx:05:d1:dc brd ff:ff:ff:ff:ff:ff
    inet xxx.xxx.x.xxx/xx brd xxx.xxx.x.xxx scope global dynamic noprefixroute enp2s0
       valid_lft 86082sec preferred_lft 86082sec
    inet6 xxxx:xxx:xxx:1616:c68:6e4d:dfb4:1218/64 scope global temporary dynamic 
       valid_lft 604483sec preferred_lft 85495sec
    inet6 xxxx:xxx:xxx:xxxx:8559:3aae:e9:5bc0/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 xxxx::xxxx:xxxx:9b1a:99a2/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

If I click the network icon on the WingPanel, WiFi networks scanning is not triggered. Thus I think there is a problem, still.

I cannot understand how to fix it.

  • 1
    Direct firmware load for mediatek/mt7650e.bin failed with error -2 - errno 2 means No such file or directory. Do you have mt7650e.bin? – Arkadiusz Drabczyk Mar 28 '19 at 13:03
  • You're right, find /lib/ "mt7650e.bin" says find: ‘mt7650e.bin’: No such file or directory. I had another look at make menuconfig but I couldn't understand how to make it build mt7650e.bin too – user938673 Mar 30 '19 at 18:57
1

I've just solved and I hope this can avoid others to go crazy, like it has happened to me for days.

You need to compile the Linux kernel >= 4.20 with the current configuration (found in /boot/), enabling MT76x0e as described in the question.

Then, you need to do:

sudo mkdir /lib/firmware/mediatek/ sudo ln -s /lib/firmware/mt7650.bin /lib/firmware/mediatek/mt7650e.bin sudo rmmod mt76x0e sudo modprobe mt76x0e

Thanks to Luca for the support! :)

EDIT: As @jawker says, I also experience problems. WiFi works great, but if you suspend the machine, it stops working and you need to reboot (or use an Ethernet cable)

| improve this answer | |
1

You need to load the mt76x0e and mt76xx modules:

sudo modprobe mt76x0e mt76xx

To restart automatically the Wifi after a suspend mode, create the script /lib/systemd/system-sleep/wifi-wakeup containing:

#!/bin/sh

# Wake up the Wifi !

case $1/$2 in
    pre/*)
        modprobe -r mt76x0e mt76xx
        sleep 1
        ;;
    post/*)
        modprobe mt76x0e mt76xx
        ;;
esac

Make it executable:

sudo chmod a+x /lib/systemd/system-sleep/wifi-wakeup

Then, reboot your computer. After the next sleep, the Wifi will restart by itself!

| improve this answer | |
0

I am having issues as well with MT7630E, although I have managed to get it to work with Arch running Linux 5.0.5. I am not using neurobins drivers. It's still extremely unstable, it's good for using the web, but as soon as I try a speedtest the WiFi gives out and won't come back unless doing a shutdown and then power on again, a normal reboot won't work.

dmesg | grep mt76 after shutdown and boot:

[    3.626362] mt76x0e 0000:03:00.0: Firmware Version: 1.0.07
[    4.591683] mt76x0e 0000:03:00.0: EEPROM ver:01 fae:05
[    4.591689] mt76x0e 0000:03:00.0: driver does not support HW RF ctrl
[    4.610301] mt76x0e 0000:03:00.0 wlp3s0f0: renamed from wlan0

iwconfig bit rate alternates between 72.2 and 1 Mb/s

wlp3s0f0  IEEE 802.11  ESSID:"xxxxx"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: xx:xx:xx:xx:xx:xx   
          Bit Rate=72.2 Mb/s   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=57/70  Signal level=-53 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:16   Missed beacon:0

Everything seems ok at this point, I can surf the web and do other non taxing stuff, but if I try a speedtest it gives out

dmesg | grep mt76 after trying a speedtest:

[    3.623044] mt76x0e 0000:03:00.0: ASIC revision: 76300002
[    3.626362] mt76x0e 0000:03:00.0: Firmware Version: 1.0.07
[    4.591683] mt76x0e 0000:03:00.0: EEPROM ver:01 fae:05
[    4.591689] mt76x0e 0000:03:00.0: driver does not support HW RF ctrl
[    4.610301] mt76x0e 0000:03:00.0 wlp3s0f0: renamed from wlan0
[  561.724974] mt76x0e 0000:03:00.0: TX DMA did not stop
[  579.407772] mt76x0e 0000:03:00.0: TX DMA did not stop
[  610.954214] mt76x0e 0000:03:00.0: TX DMA did not stop

dmesg | grep mt76 after a normal reboot:

[    3.707099] mt76x0e 0000:03:00.0: ASIC revision: 76300002
[    3.711256] mt76x0e 0000:03:00.0: Firmware Version: 1.0.07
[    3.737071] mt76x0e: probe of 0000:03:00.0 failed with error -5

It's like this until doing a shutdown, a reboot won't work.

| improve this answer | |
  • Thank you for the reply, but I think it should work also with Linux 5.0.2. I guess it all depends on the configuration to build the kernel – user938673 Mar 30 '19 at 18:58
  • I have the save problem. Have you found a solution? Do you want to make this a question, as it is different to the above? – George Moutsopoulos Sep 16 '19 at 0:00
  • @GeorgeMoutsopoulos I haven't found a solution since then, but I have barely used that laptop with that particular wifi card. The driver is in mainline github.com/torvalds/linux/tree/master/drivers/net/wireless/… I found some bug fixes concerning 5Ghz and hanging on suspend. Have you tried the latest kernel release? Perhaps it is fixed – jawker Sep 18 '19 at 12:08
  • Thanks @jawker. There are bugfixes this month in mt76x0 that should be available in kernel 5.3. I will not try them. I decided to stay with kernel 4.15 and neurobin's module that has been working fine for me. – George Moutsopoulos Sep 21 '19 at 13:08

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.