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

OS sometimes freezes when Network Manager is trying to connect #346

Open
mmrzax opened this issue Mar 4, 2024 · 9 comments
Open

OS sometimes freezes when Network Manager is trying to connect #346

mmrzax opened this issue Mar 4, 2024 · 9 comments

Comments

@mmrzax
Copy link

mmrzax commented Mar 4, 2024

Apologies, I don't know much about how drivers work and their problems, and I can't troubleshoot a problem I've always had with this driver on Archlinux.
Sometimes when trying to connect to wifi, it seems like it takes forever. Most shell commands don't work, and the system crashes completely. The system cannot be shutdown in any way. And the only way to turn it off is to use the physical power key.
A part of the journal logs that I think may be related to this problem:

journalctl -r

Mar 04 07:51:43 arch systemd[1]: systemd-hostnamed.service: Processes still around after SIGKILL. Ignoring.
Mar 04 07:50:13 arch systemd[1]: systemd-hostnamed.service: State 'stop-sigterm' timed out. Killing.
Mar 04 07:48:42 arch systemd[1]: systemd-hostnamed.service: start operation timed out. Terminating.
Mar 04 07:48:30 arch systemd[1]: systemd-timedated.service: Deactivated successfully.
Mar 04 07:48:00 arch systemd[1]: Started Time & Date Service.
Mar 04 07:48:00 arch systemd[1]: Starting Time & Date Service...
Mar 04 07:47:12 arch systemd[1]: Starting Hostname Service...
Mar 04 07:47:10 arch systemd[1]: systemd-timedated.service: Deactivated successfully.
Mar 04 07:46:40 arch systemd[1]: Started Time & Date Service.
Mar 04 07:46:40 arch systemd[1]: Starting Time & Date Service...
Mar 04 07:44:43 arch systemd[1]: blueman-mechanism.service: Deactivated successfully.
Mar 04 07:44:31 arch NetworkManager[611]: <info>  [1709525671.9946] manager: NetworkManager state is now DISCONNECTED
Mar 04 07:44:31 arch NetworkManager[611]: <info>  [1709525671.9942] device (wlo1): state change: config -> failed (reason 'supplicant-timeout'>
Mar 04 07:44:31 arch NetworkManager[611]: <warn>  [1709525671.9942] device (wlo1): Activation: (wifi) association took too long, failing activ>
Mar 04 07:44:26 arch systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Mar 04 07:44:24 arch kernel: note: kworker/u32:1[12] exited with irqs disabled
Mar 04 07:44:24 arch kernel: CR2: 0000000000000000 CR3: 0000000280c20000 CR4: 0000000000350ef0
Mar 04 07:44:24 arch kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 04 07:44:24 arch kernel: FS:  0000000000000000(0000) GS:ffff9935ff800000(0000) knlGS:0000000000000000
Mar 04 07:44:24 arch kernel: R13: ffff99330758d000 R14: 0000000000000000 R15: 0000000000000001
Mar 04 07:44:24 arch kernel: R10: ffff9935ff8342d0 R11: ffff9935ff834280 R12: ffff99330758d408
Mar 04 07:44:24 arch kernel: RBP: ffffb59b4015fde0 R08: 0000000000000031 R09: 0000000000000000
Mar 04 07:44:24 arch kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff99330758d6d8
Mar 04 07:44:24 arch kernel: RAX: 0000000000000000 RBX: ffff99332c6e1418 RCX: 0000000000000001
Mar 04 07:44:24 arch kernel: RSP: 0018:ffffb59b4015fd90 EFLAGS: 00010202
Mar 04 07:44:24 arch kernel: Code: 84 f6 74 1e 83 f9 0e 0f b7 d0 8d 79 01 40 0f 95 c6 48 0f a3 ca 0f 82 aa 01 00 00 89 f9 66 85 c0 75 dd 41 80>
Mar 04 07:44:24 arch kernel: RIP: 0010:__cfg80211_connect_result+0x407/0xaf0 [cfg80211]
Mar 04 07:44:24 arch kernel: ---[ end trace 0000000000000000 ]---
Mar 04 07:44:24 arch kernel: CR2: 0000000000000000
Mar 04 07:44:24 arch kernel:  snd_timer snd_rn_pci_acp3x hid_multitouch sha1_ssse3 cfg80211 aesni_intel hid_generic snd_acp_config sp5100_tco >
Mar 04 07:44:24 arch kernel: Modules linked in: rfcomm cmac algif_hash algif_skcipher af_alg bnep uvcvideo videobuf2_vmalloc uvc videobuf2_mem>
Mar 04 07:44:24 arch kernel:  </TASK>
Mar 04 07:44:24 arch kernel:  ret_from_fork_asm+0x1b/0x30
Mar 04 07:44:24 arch kernel:  ? __pfx_kthread+0x10/0x10
Mar 04 07:44:24 arch kernel:  ret_from_fork+0x34/0x50
Mar 04 07:44:24 arch kernel:  ? __pfx_kthread+0x10/0x10
Mar 04 07:44:24 arch kernel:  kthread+0xe8/0x120
Mar 04 07:44:24 arch kernel:  ? __pfx_worker_thread+0x10/0x10
Mar 04 07:44:24 arch kernel:  worker_thread+0x301/0x490
Mar 04 07:44:24 arch kernel:  process_one_work+0x17b/0x340
Mar 04 07:44:24 arch kernel:  cfg80211_event_work+0x29/0x40 [cfg80211 b748231c4eb2fa65073e480e2472411cb2ecd417]
Mar 04 07:44:24 arch kernel:  cfg80211_process_rdev_events+0x2a/0x40 [cfg80211 b748231c4eb2fa65073e480e2472411cb2ecd417]
Mar 04 07:44:24 arch kernel:  cfg80211_process_wdev_events+0x82/0x1a0 [cfg80211 b748231c4eb2fa65073e480e2472411cb2ecd417]
Mar 04 07:44:24 arch kernel:  ? srso_return_thunk+0x5/0x5f
Mar 04 07:44:24 arch kernel:  ? cfg80211_process_wdev_events+0x82/0x1a0 [cfg80211 b748231c4eb2fa65073e480e2472411cb2ecd417]
Mar 04 07:44:24 arch kernel:  ? finish_task_switch.isra.0+0x94/0x2f0
Mar 04 07:44:24 arch kernel:  ? __cfg80211_connect_result+0x407/0xaf0 [cfg80211 b748231c4eb2fa65073e480e2472411cb2ecd417]
Mar 04 07:44:24 arch kernel:  ? asm_exc_page_fault+0x26/0x30
Mar 04 07:44:24 arch kernel:  ? exc_page_fault+0x7f/0x180
Mar 04 07:44:24 arch kernel:  ? page_fault_oops+0x171/0x4e0
Mar 04 07:44:24 arch kernel:  ? __die+0x10f/0x120
Mar 04 07:44:24 arch kernel:  <TASK>
Mar 04 07:44:24 arch kernel: Call Trace:
Mar 04 07:44:24 arch kernel: CR2: 0000000000000000 CR3: 0000000280c20000 CR4: 0000000000350ef0
Mar 04 07:44:24 arch kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 04 07:44:24 arch kernel: FS:  0000000000000000(0000) GS:ffff9935ff800000(0000) knlGS:0000000000000000
Mar 04 07:44:24 arch kernel: R13: ffff99330758d000 R14: 0000000000000000 R15: 0000000000000001
Mar 04 07:44:24 arch kernel: R10: ffff9935ff8342d0 R11: ffff9935ff834280 R12: ffff99330758d408
Mar 04 07:44:24 arch kernel: RBP: ffffb59b4015fde0 R08: 0000000000000031 R09: 0000000000000000
Mar 04 07:44:24 arch kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff99330758d6d8
Mar 04 07:44:24 arch kernel: RAX: 0000000000000000 RBX: ffff99332c6e1418 RCX: 0000000000000001
Mar 04 07:44:24 arch kernel: RSP: 0018:ffffb59b4015fd90 EFLAGS: 00010202
Mar 04 07:44:24 arch kernel: Code: 84 f6 74 1e 83 f9 0e 0f b7 d0 8d 79 01 40 0f 95 c6 48 0f a3 ca 0f 82 aa 01 00 00 89 f9 66 85 c0 75 dd 41 80>
Mar 04 07:44:24 arch kernel: RIP: 0010:__cfg80211_connect_result+0x407/0xaf0 [cfg80211]
Mar 04 07:44:24 arch kernel: Workqueue: cfg80211 cfg80211_event_work [cfg80211]
Mar 04 07:44:24 arch kernel: Hardware name: HP HP Laptop 15-ef2xxx/887A, BIOS F.16 09/24/2021
Mar 04 07:44:24 arch kernel: CPU: 8 PID: 12 Comm: kworker/u32:1 Tainted: G           OE      6.7.6-zen1-2-zen #1 e48c58ba9fe36ec29ab17d4c69cf8>
Mar 04 07:44:24 arch kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Mar 04 07:44:24 arch kernel: PGD 0 P4D 0
Mar 04 07:44:24 arch kernel: #PF: error_code(0x0000) - not-present page
Mar 04 07:44:23 arch kernel: #PF: supervisor read access in kernel mode
Mar 04 07:44:23 arch kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
@mmrzax mmrzax changed the title OS sometimes freezes when Network Manager is trying to connect to Wifi OS sometimes freezes when Network Manager is trying to connect Mar 4, 2024
@dubhater
Copy link
Contributor

dubhater commented Mar 4, 2024

It sounds like a bug in the driver, one that nobody is going to fix.

Is rtw88 not working for you?

@mmrzax
Copy link
Author

mmrzax commented Mar 17, 2024

Is rtw88 not working for you?

If you mean the driver in the kernel, The last time I tried, this driver had problems, such as frequent disconnections from Wi-Fi.
I am now checking all the issues in this repository and trying some solutions that might be relevant, I am currently disabling all power saving options and now I don't know if it has any effect or not.

@dubhater
Copy link
Contributor

A possible fix for the frequent disconnections landed recently in rtw88. It will be available in kernel 6.9. You could try it again. This repository has the updated code: https://github.com/lwfinger/rtw88

@ArcticDev78
Copy link

Sometimes when trying to connect to wifi, it seems like it takes forever. Most shell commands don't work, and the system crashes completely. The system cannot be shutdown in any way. And the only way to turn it off is to use the physical power key.

I am experiencing the same issue on Fedora 39 using Linux kernel 6.8.8-200.fc39.x86_64. I have previously experienced this issue frequently for the last 2-3 months or so (ever since I installed the rtl8821ce driver).

After a certain number of disconnecting and connecting networks or changing networks (which is usually around 3-4 times), I face the following issues:

  1. I am unable to turn off my Wi-Fi through the GNOME Quick Settings panel.
  2. When I open the Settings app and navigate to Wi-Fi settings, it shows that NetworkManager is not running or something similar to that.
  3. When I open the Terminal app, the shell (zsh is set as my default shell) is unresponsive until I press Ctrl-C and I get a basic zsh shell prompt in which only a few commands seem to work. When this happens I try to run sudo service NetworkManager restart in that Terminal or in a TTY, but the command freezes there.
  4. When I switch to any TTY, a bunch of kernel (driver?) errors are printed around every 5 seconds.
  5. As @mmrzax had mentioned, I am unable to turn off the system using the “Power Off...” option in the GNOME Quick Settings panel or in any other way. The only way I am able to shut it down is by using my laptop's physical power button.

I hope this issue can get fixed soon.

@dubhater
Copy link
Contributor

@ArcticDev78 Did you try rtw88? 6.8.8 should have the fixes that landed recently.

@ArcticDev78
Copy link

ArcticDev78 commented Jun 1, 2024

@ArcticDev78 Did you try rtw88? 6.8.8 should have the fixes that landed recently.

Hi, sorry for the late response. I uninstalled the rtl8821ce driver (from this repo) and after rebooting, the default Wi-Fi driver seemed to work fine without issues. Would it be required to install the driver from the rtw88 repository, or would it be alright to stick with the default driver?

For reference, I am using kernel version 6.8.10-200.fc39.x86_64

@dubhater
Copy link
Contributor

dubhater commented Jun 1, 2024

If it's working, you don't need to do anything more.

@ArcticDev78
Copy link

If it's working, you don't need to do anything more.

Thank you for your reply. I was wondering what the difference is between the default kernel driver and the rtw88 one. Is it that the rtw88 one gets updated more often?

@dubhater
Copy link
Contributor

dubhater commented Jun 1, 2024

Usually, Larry Finger's repository has the latest rtw88 code from rtw-next, modified as needed to make it compile with older kernels. So it's newer than your kernel's version of rtw88.

Nowadays it also has something extra: experimental support for RTL8821AU, and RTL8811AU, and soon for RTL8812AU.

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

No branches or pull requests

3 participants