<?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>~chuck/blog &#187; heron</title>
	<atom:link href="http://www.ozymo.com/explosions/tag/heron/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ozymo.com</link>
	<description>What more could you want?</description>
	<lastBuildDate>Tue, 17 Oct 2023 03:57:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fglrx and Suspend in Ubuntu Hardy Alpha: Workaround</title>
		<link>http://www.ozymo.com/explosions/31</link>
		<comments>http://www.ozymo.com/explosions/31#comments</comments>
		<pubDate>Tue, 18 Mar 2008 04:41:42 +0000</pubDate>
		<dc:creator>chuck</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[fglrx]]></category>
		<category><![CDATA[Hardy]]></category>
		<category><![CDATA[heron]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[suspend]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.ozymo.com/~chuck/blog/2008/03/17/fglrx-and-suspend-in-ubuntu-hardy-alpha/</guid>
		<description><![CDATA[Oh, my.  What a weird couple weeks it&#8217;s been for my laptop&#8230; I started with Alpha5, in which suspend worked.  Alpha 6 also supported suspend.  Both with the open-source ati driver upon install.  Beautiful!  Thank you Ubuntu for having an awesome distro! Supposedly, the xorg-driver-fglrx package in the Ubuntu repos for the Hardy development version]]></description>
			<content:encoded><![CDATA[<p>Oh, my.  What a weird couple weeks it&#8217;s been for my laptop&#8230;</p>
<p>I started with Alpha5, in which suspend worked.  Alpha 6 also supported suspend.  Both with the open-source ati driver upon install.  Beautiful!  <a title="Go there.  Install it.  Hesitant?  Google for Wubi." href="http://www.ubuntu.com" target="_blank">Thank you Ubuntu for having an awesome distro!</a></p>
<p>Supposedly, the xorg-driver-fglrx package in the Ubuntu repos for the Hardy development version addressed the suspend/resume issues that have been the bane of Linux geeks with newer ATI cards eveywhere.  I, for one, did not notice that the issue had been resolved.</p>
<p>I DID notice, however, that out-of-the-box, so to speak, suspend worked with the open-source ati driver.  I could suspend, resume, hibernate, etc.  But, I&#8217;m whiney, and wanted my ever-so-cool desktop effects (mostly for the transparent terminals).</p>
<p>Upon installing this xorg-driver-fglrx package, my suspend/resume functionality broke.  Ouch.  That&#8217;s a beta-killer if ever.</p>
<p>I have tried every sort of configuration imaginable, and googled every combination of keywords for fglrx, suspend, hibernate, sleep, resume, ati, proprietary, and on and on.  I found several people (with different cards and different configurations) that were successful in manipulating the /etc/default/acpi-support file in such a way that suspend just worked.  Hoorah for them!  I was still stuck.</p>
<p>I have a Gateway MT3705 with an integrated ATI Radeon XPRESS 200M graphics card:</p>
<blockquote><p><strong>$ lspci -vv</strong><br />
01:05.0 VGA compatible controller: ATI Technologies Inc RC410 [Radeon Xpress 200M] (prog-if 00 [VGA controller])<br />
Subsystem: Gateway 2000 Unknown device 0318<br />
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-<br />
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium &gt;TAbort- &lt;TAbort- &lt;MAbort- &gt;SERR- &lt;PERR-<br />
Latency: 255 (2000ns min), Cache Line Size: 32 bytes<br />
Interrupt: pin A routed to IRQ 19<br />
Region 0: Memory at d0000000 (32-bit, prefetchable) [size=256M]<br />
Region 1: I/O ports at 9000 [size=256]<br />
Region 2: Memory at c0000000 (32-bit, non-prefetchable) [size=64K]<br />
[virtual] Expansion ROM at c0020000 [disabled] [size=128K]<br />
Capabilities: &lt;access denied&gt;</p></blockquote>
<p>Pulling info from dpkg, I can see the version and supported cards:</p>
<blockquote><p><strong>$ sudo dpkg -p xorg-driver-fglrx | grep &#8216;Version\|Xpress&#8217;</strong><br />
Version: 1:7.1.0-8-3+2.6.24.11-12.31<br />
* Radeon Xpress: 1200 series, 1100 series, 200 series</p></blockquote>
<p>All in all, it is &#8220;supposed&#8221; to work.  I have NO idea why it does not.  I am not that far along.  In fact, I don&#8217;t think the issue is with the driver, after my most recent discovery.</p>
<p>I have successfully been able to suspend and resume my computer for several hours now!  Hoorah!</p>
<p>Here is what I have done:</p>
<p>I changed a few things around in the /etc/default/acpi-support file, as per the instructions as <a title="The " href="http://wiki.cchtml.com/index.php/Ubuntu" target="_blank">cchtml</a> pertaining to Gutsy and Feisty, because they have not yet gotten the Hardy page together (since it&#8217;s still alpha, i understand!).  Here is my current /etc/default/acpi-support file:</p>
<blockquote><p><strong>$ sed &#8216;/^#/d;/^$/d&#8217; /etc/default/acpi-support</strong><br />
ACPI_SLEEP=true<br />
ACPI_HIBERNATE=true<br />
ACPI_SLEEP_MODE=mem<br />
MODULES=&#8221;"<br />
MODULES_WHITELIST=&#8221;fglrx&#8221;<br />
SAVE_VBE_STATE=false<br />
VBESTATE=/var/lib/acpi-support/vbestate<br />
POST_VIDEO=<br />
USE_DPMS=false<br />
DOUBLE_CONSOLE_SWITCH=false<br />
HIBERNATE_MODE=shutdown<br />
LOCK_SCREEN=true<br />
STOP_SERVICES=&#8221;"<br />
RESTART_IRDA=false<br />
ENABLE_LAPTOP_MODE=false<br />
SPINDOWN_TIME=12</p></blockquote>
<p>This is not stock.  However, I have made enough changes to it that I am not sure what the stock implementation is anymore!  It works now, so I&#8217;m cool with it.</p>
<p>Now, if I try to suspend via gnome-power-manager, or the Logout button, it will sleep and blink at me slowly and drearily, but will abruptly tell me to piss off when I try to wake it.  Ever poked a sleeping bear?  Same thing.</p>
<p>However, if I open my terminal and run this command (in bold), I can sleep and resume, as you can see by the output of the script (not in bold):</p>
<blockquote><p><strong>$ sudo /etc/acpi/sleep.sh force</strong><br />
ifdown: interface eth0 not configured<br />
ifdown: interface wlan0 not configured<br />
* Shutting down ALSA&#8230;                                                 [ OK ]<br />
* Saving the system clock<br />
* Setting the system clock<br />
Ignoring unknown interface eth0=eth0.<br />
Ignoring unknown interface wlan0=wlan0.<br />
* Setting up ALSA&#8230;                                                    [ OK ]<br />
FATAL: Module acpi_sbs not found.<br />
FATAL: Module acpi_sbs not found.</p></blockquote>
<p>So, when it suspends, I get a grey-and-white-blinky-screen-of-death, and then *poof!* it&#8217;s out and peaceful.  When returned to a wakeful state, I am greeted with my desktop and session information that I left behind.</p>
<p>Once concern I have is that the screen is not locked when the computer awakens, so theoretically, anyone could awaken my laptop and overtake me completely.  Since it is nearly always within arm&#8217;s reach, I am not terribly worried.  I worked around this issue as such:</p>
<blockquote><p><strong>$ sudo /etc/acpi/sleep.sh force &amp;&amp; gnome-screensaver-command &#8211;lock</strong></p></blockquote>
<p>For me, this is too much to remember, so I have set up a little alias in my ~/.bashrc file called simply &#8220;sleep&#8221; that performs this command for me when I type, well, &#8220;sleep&#8221;:</p>
<blockquote><p><strong> $ grep &#8220;alias sle&#8221; ~/.bashrc </strong><br />
alias sleep=&#8217;sudo /etc/acpi/sleep.sh force &amp;&amp; gnome-screensaver-command &#8211;lock&#8217;</p></blockquote>
<p>I am a terminal junky, and am perfectly fine with this.  But, some people are not, so here&#8217;s a GUI-type version of the above.  These can be run by pressing Alt-F2, and copying in the commands.  You will likely be prompted for a password:</p>
<blockquote><p><strong>$ gksu gedit /usr/local/bin/sleeparound.sh</strong></p>
<p>Type into file:<br />
#!/bin/bash<br />
gksu /etc/acpi/sleep.sh force &amp;&amp; gnome-screensaver-command &#8211;lock</p>
<p><strong>$ gksu chmod +x /usr/local/bin/sleeparound.sh</strong></p></blockquote>
<p>Now that the tough terminal part is done, simply add a custom launcher to the panel (right-click the panel, click &#8220;Add to Panel&#8230;&#8221;, click &#8220;Custom Application Launcher&#8221;)  that calls this command.  It will prompt you for a password, then sleep, and lock your screen when it wakes up.<a title="Screenshot-Create_Launcher.png" href="http://www.ozymo.com/wp-content/uploads/2008/03/screenshot-create_launcher.png"><img src="http://www.ozymo.com/wp-content/uploads/2008/03/screenshot-create_launcher.png" border="1em" alt="Screenshot-Create_Launcher.png" hspace="5em" vspace="5em" align="left" /></a></p>
<p>Cool.</p>
<p><em>Now, make a note that during my research, I found that some people had networking problems after resume, particularly pertaining to wireless.  I did not, so will not delve into that, but two key things that I saw (which could be added to the sleeparound.sh script) wereunloading and reloading the driver modules for the particular net interface, and restarting the Gnome Network Manager. </em></p>
<p>I gotta say, I love Linux.</p>
<p>/cs</p>
<p>UPDATE 080319: A smoother version of the command to use for sleep involves using the -S flag for sudo, which causes it to read from standard input.  For example, in .bashrc, the alias &#8220;sleep&#8221; would be comprised of this:</p>
<blockquote><p><strong>alias sleep=&#8217;gnome-screensaver-command &#8211;lock &amp;&amp; sleep 3 &amp;&amp; cat ~/.passfile | sudo -S /etc/acpi/sleep.sh force&#8217;</strong></p></blockquote>
<p>So, in your home directory, issue the command &#8216;cat &gt; ~/.passfile &amp;&amp; chmod 400 ~/.passfile&#8217; and type in your password.  Setting the permissions to 400 disallow other users from reading the file (other than root).  You can also replace the command in the shell script we created above with this, as well.</p>
<p>This version will lock the screen, then sleep, whereas before, it would sleep, then lock the screen on wake.  Sorry &#8211; I wrote the last one at like 2 in the morning.  /cs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozymo.com/explosions/31/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
