<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shlrm.org Blag &#187; ubuntu</title>
	<atom:link href="http://shlrm.org/wordpress/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://shlrm.org/wordpress</link>
	<description>Linux, Java, Ruby, and Politics.</description>
	<lastBuildDate>Mon, 10 Oct 2011 18:50:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to fix wireless after suspend in Kubuntu 8.10</title>
		<link>http://shlrm.org/wordpress/2009/01/14/how-to-fix-wireless-after-suspend-in-kubuntu-810/</link>
		<comments>http://shlrm.org/wordpress/2009/01/14/how-to-fix-wireless-after-suspend-in-kubuntu-810/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 02:29:49 +0000</pubDate>
		<dc:creator>David Kowis</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[atheros]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://shlrm.org/wordpress/?p=180</guid>
		<description><![CDATA[After much searching on the internet, I figured out how to deal with the suspend and resume software, pm-utils, that&#8217;s on Kubuntu 8.10. Suspend, hibernating, and resuming all worked great. I was quite thrilled with that, however, the Atheros AR242x wifi was not working after suspend. I forget, I had to install madwifi to make <a href='http://shlrm.org/wordpress/2009/01/14/how-to-fix-wireless-after-suspend-in-kubuntu-810/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>After much searching on the internet, I figured out how to deal with the suspend and resume software, <a href="http://pm-utils.freedesktop.org/wiki/">pm-utils</a>, that&#8217;s on <a href="http://www.kubuntu.org/">Kubuntu 8.10</a>. Suspend, hibernating, and resuming all worked great. I was quite thrilled with that, however, the Atheros AR242x wifi was not working after suspend. I forget, I had to <a href="http://madberry.org/2008/08/how-to-get-atheros-ar242x-wireless-to-work/">install madwifi to make that work</a> from the beginning just to make the wifi work at all, but that&#8217;s a different story. This howto assumes that you&#8217;ve already got a working wifi, probably through the madwifi module. (But it&#8217;s very likely that it&#8217;ll work for any wifi module that&#8217;s misbehaving after resume, or any module of any sort, for that fact.)</p>
<p><span id="more-180"></span>Anyways, there&#8217;s two things you have to do as root (<em>sudo su -</em>), the first is create a file in <em>/etc/pm/config.d</em> called <em>modules</em>:</p>
<p>In <em>/etc/pm/config.d/modules</em> put the following text:</p>
<pre class="brush: text; gutter: true; first-line: 1">SUSPEND_MODULES="ath_pci"</pre>
<p>This is a space separated list of modules to unload during suspend. In this case, I have told it to remove ath_pci, the atheros pci wifi module. Additionally, I could add any other modules that don&#8217;t behave well during suspend/resume.</p>
<p>Unfortunately, this does <strong>NOT</strong> reload the module when the system is resumed. This is the second thing you&#8217;ll have to do to get the wifi working. Create a file in <em>/etc/pm/sleep.d</em> called <em>01ath.sh</em> (The name is really arbitrary, that&#8217;s just what I named it. And, technically, it&#8217;s not arbitrary, the scripts in this directory are executed in alphabetical order, so 01Something.sh would get called before 02Something.sh)</p>
<p>In <em>/etc/pm/sleep.d/01ath.sh</em> write the following script:</p>
<pre class="brush: bash; gutter: true; first-line: 1">#!/bin/bash
case $1 in
resume)
/sbin/modprobe ath_pci
;;
thaw)
/sbin/modprobe ath_pci
;;
esac</pre>
<p>Then run <em>chmod +x /etc/pm/sleep.d/o1ath.sh</em> to ensure that the script is executable. Once you&#8217;ve done this, you&#8217;ll have your Atheros wifi card coming back up from suspend/hibernate with no problems :)</p>
<p>The above script is called every time the system enters one of the four sleep states: suspend, resume, hibernate, thaw. In this case, the module is already unloaded by our parameter we specified in config.d/modules. We could have very easily set up the script to do it all, and just use one script as follows:</p>
<pre class="brush: bash; gutter: true; first-line: 1">#!/bin/bash
case $1 in
hibernate)
/sbin/modprobe -r ath_pci
;;
suspend)
/sbin/modprobe -r ath_pci
;;
resume)
/sbin/modprobe ath_pci
;;
thaw)
/sbin/modprobe ath_pci
;;
esac</pre>
<p>Should you chose to do it this way, you don&#8217;t need the <em>/etc/pm/config.d/modules</em> file, as this script will remove the module (and any that it pulled in that aren&#8217;t needed anymore, see the <a href="http://linux.die.net/man/8/modprobe">manpage for modprobe</a>.) That may actually be a better solution, because modprobing ath_pci pulls in a few other wifi related modules.</p>
<p>If you want to know more technical details, there&#8217;s the <a href="http://en.opensuse.org/Pm-utils">pm-utils wiki page from openSUSE</a> which is how I figured this out. Also there&#8217;s the <a href="http://pm-utils.freedesktop.org/wiki/">main pm-utils page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://shlrm.org/wordpress/2009/01/14/how-to-fix-wireless-after-suspend-in-kubuntu-810/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

