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

iwlwifi sometimes needs reload on suspend with kernel 4.9 #3008

Closed
dmoerner opened this issue Aug 10, 2017 · 23 comments · Fixed by QubesOS/qubes-mgmt-salt-dom0-virtual-machines#67
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: networking C: power management diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. r4.2-host-stable r4.3-host-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@dmoerner
Copy link

Qubes OS version (e.g., R3.2):

R3.2, with kernel-4.9.35-19.pvops.qubes

Affected TemplateVMs (e.g., fedora-23, if applicable):

fedora-25

After today's upgrade to kernel-4.9 from kernel-4.4, I sometimes lose wireless on suspend. I have an Intel AC 7265 chip. I need to unload and reload the module in sys-net to get wireless back. I see the following in dmesg after suspend:

[ 4434.400132] iwlwifi 0000:00:01.0: Failed to load firmware chunk!
[ 4434.400169] iwlwifi 0000:00:01.0: Could not load the [0] uCode section
[ 4434.400211] iwlwifi 0000:00:01.0: Failed to start INIT ucode: -110
[ 4434.400234] iwlwifi 0000:00:01.0: Failed to run INIT ucode: -110

This does not always seem to occur, but I can't isolate why it fails.

@marmarek
Copy link
Member

I can reproduce it on Qubes 4.0, with 4.9.35 in sys-net.
For now the workaround is to add the driver (iwlmvm in my case) to /rw/config/suspend-module-blacklist

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: kernel P: minor Priority: minor. The lowest priority, below "default." labels Aug 10, 2017
@marmarek marmarek added this to the Release 3.2 updates milestone Aug 10, 2017
@micahflee
Copy link

I think I'm having this same problem. I haven't tried blacklisting iwlmvm yet though. Here's what happens after waking up from suspend:

[user@sys-net ~]$ iwconfig wlp0s1 
wlp0s1    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          
[user@sys-net ~]$ iwlist wlp0s1 scan
wlp0s1    Failed to read scan data : Network is down

[user@sys-net ~]$ ifconfig wlp0s1
wlp0s1: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether 0a:16:47:09:50:23  txqueuelen 1000  (Ethernet)
        RX packets 473208  bytes 520017957 (495.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 290478  bytes 55321101 (52.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[user@sys-net ~]$ sudo ifconfig wlp0s1 up
SIOCSIFFLAGS: Connection timed out
[user@sys-net ~]$ sudo service network restart
Restarting network (via systemctl):                        [  OK  ]
[user@sys-net ~]$ sudo ifconfig wlp0s1 up
SIOCSIFFLAGS: Connection timed out

@dmoerner
Copy link
Author

dmoerner commented Aug 17, 2017 via email

@ghost
Copy link

ghost commented Aug 19, 2017

I'm also having the same problem but using a debian-9 template for sys-net.

@andrewdavidwong
Copy link
Member

Blacklisting iwlmvm also fixes it for me.

@DrWhax
Copy link

DrWhax commented Sep 29, 2017

I still have the same problem even though I blacklisted iwlwifi.

@ghost
Copy link

ghost commented Oct 18, 2017

@DrWhax I would double-check this page: https://www.qubes-os.org/doc/wireless-troubleshooting/

My system needed iwldvm blacklisted instead of iwlmvm. It appears to be working well so far.

@radicaldrew
Copy link

Thanks adding the driver iwlmvm to /rw/config/suspend-module-blacklist
as marmarek has said worked for me!

@tasket
Copy link

tasket commented Nov 6, 2017

@DrWhax Also added iwldvm in addition to iwlwifi and that worked for me, but not consistently.

@DrWhax
Copy link

DrWhax commented Nov 6, 2017

@tasket this works for me 1 out of 10 times. It probably is easier if I just buy an Atheros card since it's getting really unworkable.

@tasket
Copy link

tasket commented Nov 6, 2017

@DrWhax I had better luck with both modules listed, iwldvm first.

@andrewdavidwong
Copy link
Member

This issue is being closed because:

If anyone believes that this issue should be reopened, please let us know in a comment here.

@linse
Copy link

linse commented Apr 19, 2019

Hello, I have this issue in Qubes 4.0 on a Thinkpad X1 Carbon with iwlwifi.

@qtpies
Copy link

qtpies commented Jun 8, 2022

For me this was fixed by adding both iwlwifi and iwlmvm to /rw/config/suspend-module-blacklist in sys-net. Find drivers with lsmod.

For me this issue can be closed as there is a workaround and it is not a Qubes problem.

@andrewdavidwong
Copy link
Member

@marmarek, do you agree with closing this?

@DemiMarie
Copy link

@andrewdavidwong I don’t think this should be closed. If the drivers need to be blocklisted then that should be part of the default configuration.

@marmarek
Copy link
Member

marmarek commented Jun 9, 2022

For me this was fixed by adding both iwlwifi and iwlmvm to /rw/config/suspend-module-blacklist in sys-net. Find drivers with lsmod.

iwlmvm is already on the default blacklist. And it's unloaded via modprobe -r, which should unload iwlwifi automatically too.
@qtpies can you confirm you really needed to add those modules to /rw/config/suspend-module-blacklist, even though they are in /etc/qubes-suspend-module-blacklist already?

@qtpies
Copy link

qtpies commented Jun 9, 2022

@marmarek good that you asked. Yesterday after adding both iwlwifi and iwlmvm to /rw/config/suspend-module-blacklist in sys-net, the wifi device really stayed available over multiple suspends. I was quite happy because before, I always needed to do a user@sys-net:~$ systemctl restart iwd after suspend.

Today somehow the wifi device again disappears over suspend. I tested over multiple suspends with and without iwlwifi and iwlmvm in /rw/config/suspend-module-blacklist, so it actually makes no difference.

Then out of interest I tried removing iwlwifi and iwlmvm in /etc/qubes-suspend-module-blacklist as well, to see if it that is making a difference. Now the wifi device is staying available after suspend (tested 3 times) without being mentioned in either of the blacklist files. Putting iwlwifi and iwlmvm back in /etc/qubes-suspend-module-blacklist makes the device disappear over suspend again.

So actually in my case the device being in a blacklists is causing the problem? And the device being being mentioned in two blacklists, maybe undos the blacklisting (like negative+negative=positive? Or something totally different that I am not aware of.

@marmarek
Copy link
Member

marmarek commented Jun 9, 2022

user@sys-net:~$ systemctl restart iwd

iwd? does it conflict with NetworkManager? the default suspend script does try to stop/start it, unless you disable it via qvm-service

@DemiMarie
Copy link

user@sys-net:~$ systemctl restart iwd

iwd? does it conflict with NetworkManager? the default suspend script does try to stop/start it, unless you disable it via qvm-service

iwd is a replacement for wpa_supplicant, and NetworkManager can call into it.

@qtpies
Copy link

qtpies commented Jun 10, 2022

user@sys-net:~$ systemctl restart iwd

iwd? does it conflict with NetworkManager? the default suspend script does try to stop/start it, unless you disable it via qvm-service

iwd is a replacement for wpa_supplicant, and NetworkManager can call into it.

systemctl restart iwd works, wifi re-appears in the NetworkManager applet and in $ iwctl device list. Sometimes the applet is also crashed on resume, then I do pkill nm-applet; nm-applet.

@andrewdavidwong
Copy link
Member

Is this still a problem in 4.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: networking C: power management diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. r4.2-host-stable r4.3-host-cur-test T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.