Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ubuntu] System freezes everytime during install (kernel 4.4.0-83) #68

Open
asereze opened this issue Jun 30, 2017 · 27 comments
Open

[Ubuntu] System freezes everytime during install (kernel 4.4.0-83) #68

asereze opened this issue Jun 30, 2017 · 27 comments
Labels

Comments

@asereze
Copy link

asereze commented Jun 30, 2017

System info

Entry Details
OS Ubuntu 16.04
Kernel version 4.4.0-83-generic
New install no
DKMS yes
Compiler < include version e.g: gcc-5.4.0 >

Devince info

Device ID: 0489:e069

General info:

#block starts

lspci: Unable to load libkmod resources: error -12
03:00.0 Network controller: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter
	Subsystem: Foxconn International, Inc. MT7630e 802.11bgn Wireless Network Adapter
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 3
	Region 0: Memory at f7900000 (32-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>

04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411 PCI Express Card Reader (rev 01)
	Subsystem: ASUSTeK Computer Inc. RTL8411 PCI Express Card Reader
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin B routed to IRQ 28
	Region 0: Memory at f7800000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: rtsx_pci

04:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0a)
	Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
luca@l-X550CL:~$ 
#block ends

Bluetooth stats:

#block starts
NOTHING HAPPENS. I can't see the list with that command anymore, it seems.
#block ends

What didn't work?

After the last update for Ubuntu I installed (around two days ago) as usual I had to re-install the drivers, but my system freezes everytime I try. The problem is similar to the one that #48 got, but the solution proposed by @neurobin there did not work for me. I used an old release until now (I remember it being around one-year old), but switching to the new one changed nothing.

What did you try?

See above.

Error code:

#block starts
[please include error code in this block]
#block ends

Additional info

[Put any additional information here or leave it blank]

@j1cs
Copy link

j1cs commented Jun 30, 2017

Hi, try this steps:

sudo make clean
sudo make
sudo ./install

@kv3tak
Copy link

kv3tak commented Jun 30, 2017

I have the same issue. After running ./install, the system freezes.

sudo make clean
sudo make
sudo ./install

didn't helped :(

Edit: make generates some errors, that I haven't seen before.

$ sudo make

make -C /lib/modules/`uname -r`/build M=/home/user/MT7630E/rt2x00 modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-83-generic'
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00dev.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00mac.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00config.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00queue.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00link.o
  CC [M]  /home/user/MT7630E/rt2x00/mt_linux.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00crypto.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00firmware.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00leds.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00mmio.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2800pci.o
/home/user/MT7630E/rt2x00/rt2800pci.c:1591:23: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .ampdu_action      = rt2800_ampdu_action,
                       ^
/home/user/MT7630E/rt2x00/rt2800pci.c:1591:23: note: (near initialization for 'rt2800pci_mac80211_ops.ampdu_action')
  CC [M]  /home/user/MT7630E/rt2x00/rt2800lib.o
  CC [M]  /home/user/MT7630E/rt2x00/rt2x00pci.o
  LD [M]  /home/user/MT7630E/rt2x00/mt7630e.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/user/MT7630E/rt2x00/mt7630e.mod.o
  LD [M]  /home/user/MT7630E/rt2x00/mt7630e.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-83-generic'
make -C /lib/modules/`uname -r`/build M=/home/user/MT7630E/btloader modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-83-generic'
  CC [M]  /home/user/MT7630E/btloader/mt76xx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/user/MT7630E/btloader/mt76xx.mod.o
  LD [M]  /home/user/MT7630E/btloader/mt76xx.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-83-generic'

@j1cs
Copy link

j1cs commented Jun 30, 2017

I recommend you delete the folder and clone again.

@kv3tak
Copy link

kv3tak commented Jun 30, 2017

Still the same results...

@saurabh-mhaisekar
Copy link

Try this:
sudo ./uninstall
sudo apt-get clean
sudo apt-get update
sudo ./install

If system still freezes, output of the following command would be helpful:
dpkg -l | grep ^..r

Meantime you would like to use drivers temparily.
sudo ./test

PS: I am curious if you could run module temparily.

@TrevorG
Copy link

TrevorG commented Jun 30, 2017

Hello. Some problem here. For me, ./test also freezed. However, I have created some sort of solution:

  1. I have decided to fix GCC warning about incompatible pointer types first. After investigating /usr/src/linux-headers-4.4.0-83/include/net/mac80211.h (I was looking for ampdu_action, which led me to the ieee80211_ops struct defined in that file) I have changed source code in this repository. git diff output below:
diff --git a/rt2x00/rt2800lib.c b/rt2x00/rt2800lib.c
index fe432fc..b4cfd92 100644
--- a/rt2x00/rt2800lib.c
+++ b/rt2x00/rt2800lib.c
@@ -9046,7 +9046,7 @@ u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 }
 
 int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
                         struct ieee80211_ampdu_params *params
 #else
                        enum ieee80211_ampdu_mlme_action action,
@@ -9058,7 +9058,7 @@ int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 #endif
             )
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
        enum ieee80211_ampdu_mlme_action action = params->action;
        struct ieee80211_sta *sta = params->sta;
        u16 tid = params->tid;
diff --git a/rt2x00/rt2800lib.h b/rt2x00/rt2800lib.h
index 4b20647..0f311e1 100644
--- a/rt2x00/rt2800lib.h
+++ b/rt2x00/rt2800lib.h
@@ -226,7 +226,7 @@ int rt2800_conf_tx(struct ieee80211_hw *hw,
                   const struct ieee80211_tx_queue_params *params);
 u64 rt2800_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
                         struct ieee80211_ampdu_params *params
 #else
                        enum ieee80211_ampdu_mlme_action action,
  1. After that, I have executed sudo modprobe rt2800pci. Running sudo ./test before that, resulted in failure.
  2. Finally, I have executed sudo ./test and right now I am writing this comment using my WiFi.

I am not sure if this is a correct solution - my linux-fu is not strong enough;)

@TrevorG
Copy link

TrevorG commented Jun 30, 2017

Sure, but the day after tomorrow at the earliest

@asereze
Copy link
Author

asereze commented Jul 1, 2017

@glats

Hi, try this steps:

sudo make clean
sudo make
sudo ./install

That's what @neurobin suggested in #48, but it doesn't work for me.

@SaurabhMhaisekar

Try this:
sudo ./uninstall
sudo apt-get clean
sudo apt-get update
sudo ./install

Doesn't work as well

If system still freezes, output of the following command would be helpful:
dpkg -l | grep ^..r

I get nothing. Like with "rfkill list" the command doesn't seem to work anymore.

Meantime you would like to use drivers temparily.
sudo ./test

If I try the system freezes like during an installation.

@PeaceMaker503
Copy link

PeaceMaker503 commented Jul 1, 2017

@TrevorG Your solution seems to work thank you. At least I had the same problem, I applied your diff and reinstalled as suggested in #48 and it is now functional. (Ubuntu 16.04)

@ghost
Copy link

ghost commented Jul 2, 2017

Same problem here.

@TrevorG: Did not work for me. Even with this patch, when the network manager tries to establish the connection with the AP, the system freezes because of a kernel oops. From what i see the stack trace on the screen:

rt2800_ampdu_action eventually results in a page fault at location ffffffffffffffd8

I just looked at the kernel header and it seems the kernel interface 80211blahblah_ampdu_action has changed in a way braking this driver.

@Sineth-N
Copy link

Sineth-N commented Jul 2, 2017

same issue here, I have explicitly removed the file mt7630 in /var/lib/dkms then make an sudo ./uninstall and next sudo make clean later sudo make dkms still can't get this driver up. on top of that I cannot apply the patch that @TrevorG suggested due to some error in modprobe. I'm also getting the exact same error as @kv3tak when make is executed.
Highly appreciate if anyone can help us in this matter
Thanks.
UPDATE:
Once the sudo make dkms is executed I restarted the machine without running the sudo ./install, In the login screen I can see my home wifi SSID and if I proceed without physically turning off the wifi using HW button I run into a system freeze. Later if I physically turn on wifi the machine tries to connect to the wifi but again the system freezes.

UPDATE
Appllied the diff in the way @LinuxSDA said and got it working.. Thanks all !!

@kennethmervin01
Copy link

same here after the update to 4.4.0-83-generic... please help

@kennethmervin01
Copy link

kennethmervin01 commented Jul 4, 2017

It's working just followed @TrevorG changes to rt2x00/rt2800lib.c and rt2x00/rt2800lib.h

First unsinstall the driver

sudo ./uninstall
make clean

Then change the rt2x00/rt2800lib.c and rt2x00/rt2800lib.h like @TrevorG told then

sudo ./install

@LinuxSDA
Copy link

LinuxSDA commented Jul 4, 2017

It's working. Thanks a lot @TrevorG.

Those who still have problem. Here are simpler instructions:

  • Go to MT7630E-release/rt2x00 folder.

  • Open rt2800lib.c in Gedit and search if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) replace it with if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) for the 2 matches.

  • Open rt2800lib.h and search if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) replace it with if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) for the 1 match.

Now, you can install the drivers:

  • sudo ./uninstall

  • make clean

  • make

  • sudo ./install

@asereze
Copy link
Author

asereze commented Jul 5, 2017

@LinuxSDA it worked!
Thank you very much!

@TrevorG
Copy link

TrevorG commented Jul 5, 2017

Well, it seems that someone has pulled some changes from kernel 4.6.0 to linux-headers-4.4.0-83. With change in definition of ampdu_action among the others. All as fine in linux-headers-4.4.0-81.

Patch presented by me is only a quick hack and such change should not be pulled into the repository, IMHO, as it will create problems for users building with linux headers pre-4.4.0-83. Unfortunately, I have no idea how to write correct patch. This #if should check against "ABI number" (which is something Ubuntu-specific AFAIU) and I have no idea how to check it.

Feel free to create better solution;)

@a-sync
Copy link

a-sync commented Jul 6, 2017

@TrevorG, @LinuxSDA thanks, can confirm it works!

UTS_UBUNTU_RELEASE_ABI >= 83 could be used to determine if this should be applied for 4.4.0, but only for ubuntu afaik

@jamoreno146
Copy link

Thank you so much @LinuxSDA! I experienced this problem after two clean installations, now I solved the problem.

@htcoder
Copy link

htcoder commented Jul 21, 2017

74 The solution suggested by @LinuxSDA doesn't work for me

@tran184
Copy link

tran184 commented Jul 24, 2017

same problem with kernel 4.10.0-27

@neurobin neurobin changed the title [Ubuntu] System freezes everytime during install [Ubuntu] System freezes everytime during install (kernel 4.4.0-83) Jul 24, 2017
@neurobin
Copy link
Owner

@tran184 This issue is exclusively related to kernel 4.4.0-83, please open another issue with more information.

@asereze
Copy link
Author

asereze commented Jul 25, 2017

With the last update (distributed today) the problem is back again, and this time the method suggested by @LinuxSDA didn't work.

Also is there a good reason why is this driver still not supported by Linux after all this time? Why do we need to reinstall a patch for almost every update? It's absurd.

@rjy7wb
Copy link

rjy7wb commented Sep 14, 2017

Played around with it, error only happens when trying to connect to a network.

before installing, if you delete your saved networks you will be able to complete the installation process, but if you try to join a network it will still freeze.

@hnovillo
Copy link

@TrevorG Gracias a tu post pude solucionar mi problema!

  1. Verifiqué la versión de mi kernel con uname -r. La cual resultó ser 4.4.0-97-generic.
  2. Realicé los cambios en ambos archivos, ejecuté los pasos que indicaste, y luego con sudo ./install de inmediato comenzó a funcionar mi wifi.

Sos un Genio!!!
Mil Gracias!!!

@ruifm
Copy link

ruifm commented Nov 9, 2017

Thanks @LinuxSDA, worked like a charm for me (4.4.0-97). Couldn't be happier!

@ash0904
Copy link

ash0904 commented May 5, 2018

System freezes every time when trying to connect to a access point.
(same problem as @htcoder )
Tried all the above solutions but none worked.
What should I do ?

@deeperlearner
Copy link

deeperlearner commented May 5, 2018

@ash0904
Do not expect this card will work well.
Change another wifi card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests