Bug 2228327

Summary: Network Manager keeps renewing DHCP lease during online games
Product: [Fedora] Fedora Reporter: absynthesyne
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: bgalvani, dcbw, ferferna, gnome-sig, liangwen12year, lkundrak, mclasen, ngompa13, rstrode, vbubela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
networkmanager journalctl log none

Description absynthesyne 2023-08-02 05:55:20 UTC
Only really happens when I'm playing a game that requires online functionality to work. For example, Final Fantasy XIV through XIVLauncher, or Halo MCC through Steam. I suspect Wine might be a cause as well, but I don't know exactly. The WiFi card in question is an Intel AX200. I changed DHCP clients to dhclient and it still happens, so something within Network Manager is telling it to renew the lease, despite it not needing to be renewed. This can happen from every 5 minutes to every 5 seconds.

Reproducible: Always

Steps to Reproduce:
1. play game online

Actual Results:  
Being disconnected due to Network Manager renewing DHCP lease despite it not needing to be renewed.

Expected Results:  
Not being disconnected.

Comment 1 Beniamino Galvani 2023-08-02 07:05:34 UTC
Please set level=TRACE in the logging section of /etc/NetworkManager/NetworkManager.conf, restart the NetworkManager service, reproduce the issue and then attach the output of "journalctl -u NetworkManager -b".

Comment 2 absynthesyne 2023-08-02 23:38:22 UTC
Created attachment 1981380 [details]
networkmanager journalctl log

Here you go, happened right near the end.

Comment 3 Beniamino Galvani 2023-08-03 07:30:46 UTC
The first strange thing I see is that there is a process with pid 6998 that is requesting secrets every 10 seconds: 

  Aug 02 19:27:50 g14-linux NetworkManager[269368]: <trace> [1691018870.8935] auth: call[221]: CheckAuthorization(org.freedesktop.NetworkManager.settings.modify.system), subject=unix-process[pid=6998, uid=1000, start=16313]

  Aug 02 19:28:00 g14-linux NetworkManager[269368]: <trace> [1691018880.9220] auth: call[222]: CheckAuthorization(org.freedesktop.NetworkManager.settings.modify.system), subject=unix-process[pid=6998, uid=1000, start=16313]

  Aug 02 19:28:10 g14-linux NetworkManager[269368]: <trace> [1691018890.9488] auth: call[223]: CheckAuthorization(org.freedesktop.NetworkManager.settings.modify.system), subject=unix-process[pid=6998, uid=1000, start=16313]

  ...

The actual problem is here, where the wireless interface loses carrier:

  Aug 02 19:34:20 g14-linux NetworkManager[269368]: <debug> [1691019260.5741] platform: (wlp2s0) signal: link changed: 2: wlp2s0 <UP;broadcast,multicast,up> mtu 1500 arp 1 wifi? init addrgenmode none addr A8:7E:EA:75:45:9A permaddr A8:7E:EA:75:45:9A brd FF:FF:FF:FF:FF:FF driver iwlwifi rx:5929333,3863781104 tx:3894728,1088928061

and then wpa_supplicant reports a disconnection:

  Aug 02 19:34:20 g14-linux NetworkManager[269368]: <info>  [1691019260.6876] device (wlp2s0): supplicant interface state: completed -> disconnected

To understand the reason, you need to enable logging in wpa_supplicant and analyze logs.

Comment 4 absynthesyne 2023-08-04 02:04:33 UTC
How would I go about doing that?

Comment 5 Beniamino Galvani 2023-08-04 09:07:35 UTC
Add -ddd to OTHER_ARGS in /etc/sysconfig/wpa_supplicant and restart the service or reboot. Reproduce the issue and then check logs with "journalctl -u wpa_supplicant -b"

Comment 6 absynthesyne 2023-08-07 23:36:39 UTC
Unfortunately after doing this I cannot reproduce it. I've been trying ever since and it won't reproduce. If it happens again I'll post logs.