Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wifi Interface goes down after couple hours of use
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 11:00 am    Post subject: Wifi Interface goes down after couple hours of use Reply with quote

Hello,

My wifi interface goes down after using the pc for couple hours and sometimes after suspending to ram. When it goes down I can't set it up using ip link (RTNETLINK answers: Connection timed out). I also noticed that ip link and ifconfig commands gets stuck for couple seconds before running when this happens. I am using NetworkManager if that helps, restarting nm didn't help. Everything works after a reboot for couple hours.

Wifi card: Intel AX 210 (I emerged sys-kernel/linux-firmware and confirmed that I have the driver on the intel's page under /lib/firmware/)
Kernel: 6.1.2 (genkernel)
Dmesg output: https://paste.bingner.com/paste/3qptp

lspci -v output: https://paste.bingner.com/paste/fw278

Can you help me figure out the problem and solve it?

Thanks.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Mon Mar 06, 2023 2:28 pm    Post subject: Reply with quote

Hello,

when this problem happen, instead of rebooting you can stop NetworkManager and unload the iwlwifi module and load it again using the modprobe command. Than it should work again. Many network devices do not support hivernation. I don't know exactly why your Intel wifi stop to work but be sure that the power management is of on the card. These are my parameters for iwlwifi in /etc/modprobe.d/modprobe.conf:

options iwlwifi 11n_disable=1 bt_coex_active=1 disable_11ac=0 disable_11ax=1 enable_ini=0 fw_restart=0 led_mode=3 power_level=1 power_save=0 swcrypto=0 uapsd_disable=1

Playing with the iwlwifi parameters can help. The value of the parameters depend on which band you use to connect, 2.4ghz, 5ghz, 6ghz. Me is 5ghz channel 165. Look at

modinfo -p iwlwifi

You can try dhcpcd as a replacement for NetworkManager. It work well with wifi.
_________________
Paul
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 4:06 pm    Post subject: Reply with quote

Thanks Logicien, in dmesg messages a newer version than intel's recommendation was being used and I deleted all fırmware except the recommended one. It didn't help, also I tried to unload the iwlwifi and iwlmvm and after loading them again I saw that my wifi interface was gone. It's not even showing on ip link command as "DOWN" so I had to reboot again.

I'll try to play with iwlwifi parameters as you recommended, if it won't work I'll try to downgrade my kernel.

Edit: I also noticed that the issue happens more frequently if I'm downloading stuff, noticed it when I was trying to download a game from steam
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Mon Mar 06, 2023 5:34 pm    Post subject: Reply with quote

obfusc8,

When the WiFi goes down, are there any error messages in dmesg?

What does
Code:
ifconfig -a
show?

What is the output of
Code:
route


What is the content of /etc/resolv.conf
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 6:32 pm    Post subject: Reply with quote

Hello NeddySeagoon,

I have upgraded to kernel 6.2.0 to see if issue persist and it does.

Here is the updated dmesg: https://paste.bingner.com/paste/a9tnr the error message(s) starts right after the line starting with [ 170.769942]


ifconfig -a output:
Code:
eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c8:7f:54:00:d1:f0  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xfbf00000-fbffffff 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 32  bytes 2592 (2.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32  bytes 2592 (2.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp10s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.31  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f616:6910:2129:9540  prefixlen 64  scopeid 0x20<link>
        ether bc:09:1b:f3:dd:b5  txqueuelen 1000  (Ethernet)
        RX packets 234814  bytes 335470882 (319.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 84994  bytes 8456485 (8.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



route output (when the wifi is working):
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    600    0        0 wlp10s0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp10s0


route output (when it's broken):
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

/etc/resolv.conf contents:

Code:
# Generated by NetworkManager
search home
nameserver 192.168.1.1


I also tried turning off power management using iwconfig to see if it changes anything but it did not.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Mon Mar 06, 2023 7:57 pm    Post subject: Reply with quote

obfusc8,

Something when wrong in your kernel.

Code:
[  904.273378] iwlwifi 0000:0a:00.0: Current CMD queue read_ptr 2539 write_ptr 2540
[  904.291546] ------------[ cut here ]------------
[  904.291548] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff)
[  904.291571] WARNING: CPU: 10 PID: 3547 at drivers/net/wireless/intel/iwlwifi/pcie/trans.c:2172 __iwl_trans_pcie_grab_nic_access+0x14a/0x150 [iwlwifi]
[  904.291589] Modules linked in: rfcomm ccm cmac algif_skcipher bnep snd_usb_audio snd_usbmidi_lib snd_rawmidi snd_seq_device mc btusb btrtl btbcm btintel bluetooth ecdh_generic ecc joydev vfat fat amdgpu intel_rapl_msr intel_rapl_common iommu_v2 mfd_core edac_mce_amd drm_buddy snd_hda_codec_hdmi iwlmvm gpu_sched i2c_algo_bit snd_hda_intel kvm_amd snd_intel_dspcfg drm_ttm_helper mac80211 snd_intel_sdw_acpi ttm libarc4 kvm snd_hda_codec drm_display_helper irqbypass asus_nb_wmi ucsi_ccg eeepc_wmi crct10dif_pclmul cec snd_hda_core typec_ucsi asus_wmi rc_core roles snd_hwdep ghash_clmulni_intel ledtrig_audio iwlwifi sparse_keymap sha512_ssse3 typec platform_profile wmi_bmof drm_kms_helper snd_pcm sp5100_tco rapl cfg80211 snd_timer efi_pstore pcspkr igc k10temp ccp snd drm rfkill i2c_piix4 video soundcore i2c_designware_pci i2c_ccgx_ucsi wmi backlight i2c_designware_platform i2c_designware_core i2c_core gpio_amdpt acpi_cpufreq mac_hid gpio_generic efivarfs ext4 mbcache jbd2 nvme crc32_pclmul
...


Your kernel is up to date.
Code:
[    0.000000] Linux version 6.2.0-gentoo-x86_64 (root@arion) (x86_64-pc-linux-gnu-gcc (Gentoo 12.2.1_p20230121-r1 p10)


Do you have an older kernel that works?
Can you try and older kernel?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 8:03 pm    Post subject: Reply with quote

NeddySeagoon,

I was using 6.1.2 but I had the same problem. I don't want to downgrade to 5.x since my GPU is supported on kernel 6.x+. Is there nothing else I can do?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Mon Mar 06, 2023 8:20 pm    Post subject: Reply with quote

obfusc8,

try to enable IOMMU in your kernel configuration. Do you have then still problems ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Mon Mar 06, 2023 8:25 pm    Post subject: Reply with quote

obfusc8,

How adventurous are you?
The current tip of Linus's tree is 6.3-rc1. sys-kernel/git-sources should install that.

-rc1 means that its the first cut of 6.3.0 available for testing. Don't just try it. It will be buggy, that's why its a release candidate, the first one too.
Read the change log for iwlwifi. If there are no bug fixes, its probably not worth testing.

If you are feelling more adventurous still, patches appear on that list.

You search engine may find Red Hat bug 1429135.

It says to turn off
Code:
IWLWIFI_PCIE_RTPM
in the kernel.
Note that its hidden behind
Code:
depends on IWLMVM && IWLWIFI_PCIE && PM && EXPERT

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 9:01 pm    Post subject: Reply with quote

pietinger,

It is enabled.

Code:
[seck@arion]:/etc/kernels$ cat kernel-config-6.2.0-gentoo-x86_64 | grep -i iommu
CONFIG_IRQ_MSI_IOMMU=y
CONFIG_GART_IOMMU=y
CONFIG_VFIO_IOMMU_TYPE1=m
# CONFIG_VFIO_NOIOMMU is not set
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
CONFIG_IOMMU_IO_PGTABLE=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_V2=m
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
# CONFIG_IOMMUFD is not set
CONFIG_IOMMU_HELPER=y
# CONFIG_IOMMU_DEBUG is not set


NeddySeagoon,

I don't see
Code:
IWLWIFI_PCIE_RTPM
in my config, can it be an option for older kernels? On the bugzilla page, it seems they are using kernel 4.9.12.

Thank you for for your help, I really appreciate it. I'll probably roll back to 6.1.2 for now and order a cat cable long enough to reach my PC. Hopefully it'll be fixed in an upcoming release.

Also, should I create an issue on Gentoo's bugzilla page for this?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Mon Mar 06, 2023 9:41 pm    Post subject: Reply with quote

obfusc8,

Its gone. All that is left now, in my 6.2.0 is.
Code:
  │ │             < >   Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)│ │ 
  │ │             - -     Intel Wireless WiFi DVM Firmware support                                   │ │ 
  │ │             - -     Intel Wireless WiFi MVM Firmware support                                   │ │ 
  │ │                     *** WARNING: iwlwifi is useless without IWLDVM or IWLMVM ***               │ │ 
  │ │                     Debugging Options  ----                                                    │ │


Something else to try.

Code:
modinfo iwlwifi
will give you a list of module parameters that can be set at module load time.
Sometimes they can be changed is /proc or /sys too.

If the power saving is on, try
Code:
modprobe -r iwlwifi
modprobe iwlwifi force_cam=1
to turn it off.

If that or other module parameters help, they can be applied at startup automatically.

-- edit --

If you ping your router continuously in another console window, to the wifi alive, does the problem still happen?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Mon Mar 06, 2023 10:28 pm    Post subject: Reply with quote

NeddySeagoon,

I am unable to reproduce the issue at the moment. It seems it's only happening when I'm using traffic 'heavily'. As I am not downloading anything right now it's working without a problem. I'll try turning off power saving tomorrow and download some random stuff to test.

Thanks.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Tue Mar 07, 2023 4:53 am    Post subject: Reply with quote

I forgot to says that I have this parameter too for the module iwlmvm in /etc/modprobe.d/modprobe.conf
Code:
options iwlmvm power_scheme=1

If I remember well disable the bluetooth coexistence in iwlwifi
Code:
options iwlwifi bt_coex_active=0

make the module crash or unusable. All my parameters of iwlwifi have to function to not manage the power for economy. My parameters disable too all the bands that I dont use to focus only on the 5ghz band as a client. To say the true the best wifi card I have on PCIe is a Realtek. I do not find Intel wifi cards so good on Linux. I prefer Atheros or Ralink. I don't see any problem with Linux using those cards.

I can suggest to use an other Linux distribution to check if the Intel wifi card work well and if yes configure your Linux kernel according to a precompiled one mimic it for your wifi card at least. You can check if in fact your card is supported using it's IDVendor and IDProduct on https://wireless.wiki.kernel.org/.
_________________
Paul
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Tue Mar 07, 2023 8:26 pm    Post subject: Reply with quote

NeddySeagoon, Logicien,

It seems I am unable to turn power saving off, I tried
Code:
modprobe -r iwlwifi
modprobe iwlwifi force_cam=1
but it said iwlwifi was in use so I also did
Code:
modprobe -r iwlmvm
and after doing that I did
Code:
modprobe -r iwlwifi
modprobe iwlwifi force_cam=1
again.

But when I check
Code:
modinfo iwlwifi
I still see that the power_save is enabled. I also tried adding options to /etc/modprobe.d/modprobe.conf. Afterwards I rebooted but it seems the options didn't have any effect.

EDIT:

I just read that modinfo does not reflect any changes made by module options in the config file.

I ran
Code:
 grep [[:alnum:]] /sys/module/iwlwifi/parameters/* | cut -d '/' -f6


and this is the output:

Code:
grep: 11n_disable:0
/sys/module/iwlwifi/parameters/enable_iniamsdu_size:0
bt_coex_active:Y
debug:0
disable_11ac:N
disable_11ax:N
disable_11be:N
: Operation not permitted
fw_restart:Y
led_mode:0
nvm_file:(null)
power_level:0
power_save:N
remove_when_gone:N
swcrypto:0
uapsd_disable:3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Tue Mar 07, 2023 9:17 pm    Post subject: Reply with quote

obfusc8,

Code:
power_level:0
power_save:N


That looks like power sawing off.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Wed Mar 08, 2023 8:03 am    Post subject: Reply with quote

NeddySeagoon,

Yes, but my issue still persists though.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Mar 08, 2023 9:37 am    Post subject: Reply with quote

I don't think that power saving can be the cause of the Linux errors messages about iwliwfi. Power saving mainly slow reponsiveness after idle. By default power saving is not enabled in the iwlwifi parameters unless you have enable it in your kernel configuration.

Because the kernel complain about iwlwifi you should try an other kernel version on Gentoo and compare the Intel wifi card beheavior on other Linux distributions who used a pre compiled kernel. For example Debian stable who have an older kernel than the the six version. The Arch have the most recent one.

This problem can not be specific on Gentoo but on Linux at all.
_________________
Paul
Back to top
View user's profile Send private message
obfusc8
n00b
n00b


Joined: 06 Mar 2023
Posts: 9

PostPosted: Fri Mar 10, 2023 1:06 pm    Post subject: Reply with quote

Hello,

So I bought a cable but it seems I am having the same problem with the cable too. Here is the dmesg message:

Code:
igc 0000:0b:00.0 eno1: PCIe link lost, device now detached
[  859.718222] ------------[ cut here ]------------
[  859.718223] igc: Failed to read reg 0xc030!
[  859.718253] WARNING: CPU: 15 PID: 254 at drivers/net/ethernet/intel/igc/igc_main.c:6412 igc_rd32+0x95/0xa0 [igc]
[  859.718264] Modules linked in: uinput rfcomm ccm snd_usb_audio snd_usbmidi_lib snd_rawmidi snd_seq_device mc cmac algif_skcipher bnep btusb btrtl btbcm btintel bluetooth ecdh_generic ecc joydev vfat fat amdgpu iwlmvm intel_rapl_msr intel_rapl_common mac80211 edac_mce_amd kvm_amd libarc4 iwlwifi snd_hda_codec_hdmi iommu_v2 mfd_core kvm drm_buddy snd_hda_intel gpu_sched snd_intel_dspcfg irqbypass snd_intel_sdw_acpi i2c_algo_bit crct10dif_pclmul drm_ttm_helper snd_hda_codec ttm ucsi_ccg asus_nb_wmi eeepc_wmi typec_ucsi drm_display_helper ghash_clmulni_intel snd_hda_core asus_wmi roles sha512_ssse3 cec cfg80211 ledtrig_audio snd_hwdep typec sparse_keymap rc_core platform_profile wmi_bmof snd_pcm drm_kms_helper sp5100_tco snd_timer rapl efi_pstore pcspkr ccp rfkill k10temp drm snd igc i2c_piix4 i2c_designware_pci soundcore video i2c_ccgx_ucsi wmi i2c_designware_platform backlight i2c_designware_core i2c_core gpio_amdpt acpi_cpufreq mac_hid gpio_generic efivarfs ext4 mbcache jbd2 crc32_pclmul
[  859.718299]  nvme crc32c_intel aesni_intel nvme_core xhci_pci crypto_simd xhci_pci_renesas cryptd t10_pi xhci_hcd ahci crc64_rocksoft libahci crc64
[  859.718306] CPU: 15 PID: 254 Comm: kworker/15:1 Not tainted 6.2.0-gentoo-x86_64 #1
[  859.718308] Hardware name: ASUS System Product Name/ROG STRIX X670E-E GAMING WIFI, BIOS 0611 09/22/2022
[  859.718309] Workqueue: events igc_watchdog_task [igc]
[  859.718316] RIP: 0010:igc_rd32+0x95/0xa0 [igc]
[  859.718322] Code: 48 c7 c6 88 64 7c c0 e8 4c 67 41 ca 48 8b bd 28 ff ff ff e8 5d 00 ea c9 84 c0 74 b4 89 de 48 c7 c7 b0 64 7c c0 e8 de b9 3c ca <0f> 0b eb a2 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90
[  859.718324] RSP: 0018:ffffb92240a6bdf8 EFLAGS: 00010282
[  859.718325] RAX: 0000000000000000 RBX: 000000000000c030 RCX: 0000000000000000
[  859.718326] RDX: 0000000000000002 RSI: ffffffff8b24f5c4 RDI: 00000000ffffffff
[  859.718327] RBP: ffff8f59c742cc60 R08: 0000000000000000 R09: ffffb92240a6bca8
[  859.718328] R10: 0000000000000003 R11: ffffffff8b542388 R12: ffff8f59c742c000
[  859.718328] R13: 0000000000000000 R14: ffff8f59c7363d80 R15: 000000000000c030
[  859.718329] FS:  0000000000000000(0000) GS:ffff8f68985c0000(0000) knlGS:0000000000000000
[  859.718331] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  859.718331] CR2: 00007f95fcee1240 CR3: 0000000103c70000 CR4: 0000000000750ee0
[  859.718333] PKRU: 55555554
[  859.718333] Call Trace:
[  859.718335]  <TASK>
[  859.718337]  igc_update_stats+0x8a/0x6c0 [igc]
[  859.718344]  igc_watchdog_task+0x97/0x2d0 [igc]
[  859.718351]  process_one_work+0x1c8/0x380
[  859.718355]  worker_thread+0x51/0x390
[  859.718358]  ? _raw_spin_lock_irqsave+0x27/0x60
[  859.718361]  ? __pfx_worker_thread+0x10/0x10
[  859.718363]  kthread+0xed/0x120
[  859.718366]  ? __pfx_kthread+0x10/0x10
[  859.718367]  ret_from_fork+0x2c/0x50
[  859.718371]  </TASK>
[  859.718372] ---[ end trace 0000000000000000 ]---



It looks like a kernel problem but I am thinking about removing NetworkManager and try netifrc instead.

-----------EDIT-----------

Found this reddit post: https://www.reddit.com/r/buildapc/comments/xypn1m/network_card_intel_ethernet_controller_i225v_igc/

It seems it is an ASUS issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum