<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=4789&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=4789</link>
		<description><![CDATA[The most recent posts in [SOLVED] Reloading wifi interface and kernel module without reboot.]]></description>
		<lastBuildDate>Mon, 10 Jan 2022 08:15:14 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33846#p33846</link>
			<description><![CDATA[<div class="quotebox"><cite>Marjorie wrote:</cite><blockquote><div><p>The instruction I had to use to specify which modules to load/unload were in the file <strong>/etc/pm/config.d/defaults</strong>, the relevant lines being:</p><div class="codebox"><pre><code># If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES=&quot;ath9k ath9k_common ath9k_hw ath&quot;</code></pre></div></div></blockquote></div><p>Perfect, thank you very much.<br />I also use pm-utils, so I now have it unload the module. I verified it did that in the log. Coming back up, wifi works.<br />So I think this should effectively circumvent the crashing.</p>]]></description>
			<author><![CDATA[dummy@example.com (yolobro)]]></author>
			<pubDate>Mon, 10 Jan 2022 08:15:14 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33846#p33846</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33840#p33840</link>
			<description><![CDATA[<p>You report that your problem is intermittent, which if true makes it hard to solve.</p><p>For myself I use the <strong>pm-utils</strong> package to suspend or hibernate and resume.</p><p>My wifi card uses the <strong>ath9k</strong> kernel module, however I found that it wasn&#039;t powering down when I suspended so I configured pm-utils to unload and reload the relevant module(s). This solved my problem.</p><p>One issues was that for my wifi card there are actually several interdependent modules, not just the primary one, and I needed to load/unload all of them. In my case these were <strong>ath9k ath9k_common ath9k_hw ath</strong>.</p><p>The instruction I had to use to specify which modules to load/unload were in the file <strong>/etc/pm/config.d/defaults</strong>, the relevant lines being:</p><div class="codebox"><pre><code># If you need to unload any modules to suspend/resume, add them here.
SUSPEND_MODULES=&quot;ath9k ath9k_common ath9k_hw ath&quot;</code></pre></div><p>you can check what is actually happening by viewing the log file<strong> /var/log/pm-suspend.log</strong>, where, on my system I find:</p><p>[on suspend]</p><div class="codebox"><pre><code>Running hook /usr/lib/pm-utils/sleep.d/75modules suspend suspend:
Unloading kernel module ath9k...Done.
Unloading kernel module ath9k_common...Done.
Unloading kernel module ath9k_hw...Done.
Unloading kernel module ath...Done.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: success.</code></pre></div><p>[on resume]</p><div class="codebox"><pre><code>Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
Reloaded unloaded modules.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory
/usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: success.</code></pre></div><p>The log also captures module interdependencies, and this is where you can find if you&#039;ve loaded/unload all the relevant modules. in my case it shows (in additions to all the other modules/dependencies:</p><div class="codebox"><pre><code>Linux grendel 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
Module                  Size  Used by
ath9k                 139264  0
ath9k_common           20480  1 ath9k
ath9k_hw              483328  2 ath9k_common,ath9k
ath                    36864  3 ath9k_common,ath9k,ath9k_hw</code></pre></div><p>Which is where I got my list of related wifi card modules from.</p><p>For me suspend/hibernate and resume works and the networking restarts.</p>]]></description>
			<author><![CDATA[dummy@example.com (Marjorie)]]></author>
			<pubDate>Sun, 09 Jan 2022 21:19:39 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33840#p33840</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33836#p33836</link>
			<description><![CDATA[<div class="quotebox"><cite>yolobro wrote:</cite><blockquote><div><p>after a suspend, the driver crashes as evident in dmesg</p></div></blockquote></div><p>Could be relevant to see the message you get?</p>]]></description>
			<author><![CDATA[dummy@example.com (PedroReina)]]></author>
			<pubDate>Sun, 09 Jan 2022 17:29:57 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33836#p33836</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33823#p33823</link>
			<description><![CDATA[<p>Report the driver crash to whoever wrote the module. Maybe they will be able to fix the problem.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 09 Jan 2022 14:19:59 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33823#p33823</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33818#p33818</link>
			<description><![CDATA[<p>Thanks. I do not use any network manager. Just wpa_supplicant.<br />My init 1 just has these:</p><div class="codebox"><pre><code>K01acpi-support  K01alsa-utils  K01hddtemp  K03rsyslog  S01killprocs  S02single  S05bootlogs</code></pre></div><p>I dont think they can help.</p>]]></description>
			<author><![CDATA[dummy@example.com (yolobro)]]></author>
			<pubDate>Sun, 09 Jan 2022 11:55:25 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33818#p33818</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33817#p33817</link>
			<description><![CDATA[<p>Try restarting any network manager that you&#039;re running. (wicd, network-manager, connman or other.)</p><p>Or log out of desktop and log in again.</p><p>Or cycle through runlevel 1. As root:</p><div class="codebox"><pre><code>init 1</code></pre></div><p> and then ctrl-d to get back to runlevel 2.</p>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Sun, 09 Jan 2022 11:39:23 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33817#p33817</guid>
		</item>
		<item>
			<title><![CDATA[[SOLVED] Reloading wifi interface and kernel module without reboot]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=33811#p33811</link>
			<description><![CDATA[<p>For my wifi I need a special kernel driver which is installed via dkms. It&#039; working fine, however sometimes after a suspend, the driver crashes as evident in dmesg. lsmod still shows it though and the wifi interface is still up, but not working anymore.</p><p>I want to get wifi back without a reboot.</p><p>I have tried to simply rmmod and modprobe the module. It does that but that does not bring the wifi interface back. I have restarted networking (/etc/init.d/networking restart) which also would not help getting the interface back up.</p><p>I have also tried this without success:</p><div class="codebox"><pre><code>echo &#039;1&#039; | tee /sys/bus/pci/devices/0000:$PCI/remove &gt; /dev/null
sleep 2
echo &#039;3&#039; | tee /sys/bus/pci/rescan &gt; /dev/null</code></pre></div><p>What did work, but seems like an overkill, is to dkms remove and dkms install the module again.<br />Any idea what dkms could be doing here that I&#039;m missing?</p><p>Thanks a lot for any hints!</p>]]></description>
			<author><![CDATA[dummy@example.com (yolobro)]]></author>
			<pubDate>Sun, 09 Jan 2022 09:01:04 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=33811#p33811</guid>
		</item>
	</channel>
</rss>
