<?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>Amateur Topologist &#187; nvidia</title>
	<atom:link href="http://www.amateurtopologist.com/tag/nvidia/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amateurtopologist.com</link>
	<description>Politics, programming, math, and science.</description>
	<lastBuildDate>Fri, 03 Sep 2010 16:43:29 +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>Fixing screen flickers on Linux with NVIDIA</title>
		<link>http://www.amateurtopologist.com/2009/06/27/fixing-screen-flickers-on-linux-with-nvidia/</link>
		<comments>http://www.amateurtopologist.com/2009/06/27/fixing-screen-flickers-on-linux-with-nvidia/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 01:57:55 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nvidia]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=134</guid>
		<description><![CDATA[I use Ubuntu 9.04 for my non-gaming computing typically; I enjoy the increased customizability, and the terminal program included by default is infinitely better than Windows&#8217;s shitty cmd.exe. But one of the things that bugged me for a while is that my screen would intermittently flicker black; parts or all of it would just turn [...]]]></description>
			<content:encoded><![CDATA[<p>I use Ubuntu 9.04 for my non-gaming computing typically; I enjoy the increased customizability, and the terminal program included by default is infinitely better than Windows&#8217;s shitty cmd.exe. But one of the things that bugged me for a while is that my screen would intermittently flicker black; parts or all of it would just turn black for a fraction of a second and return to normal. I managed to figure that it was only happening when I had the Compiz window compositing manager running, but all the suggestions I was given failed to fix it. Eventually, I tracked it down to PowerMizer, a feature NVIDIA includes with its graphics cards in order to decrease power usage. It&#8217;s useful, but sometimes changing power settings on the graphics card can cause the screen to flicker. So I did some quick Googling, and found a fix that works by disabling it entirely. But this will increase power consumption and possibly cause your laptop to heat up (not dangerously so, but enough to be noticeable), so for completeness&#8217;s sake I recommend you try these steps first:</p>
<ol>
<li>Disable Compiz and use your system for a while; by doing so, you should prevent PowerMizer from having to switch the power supply by ensuring the load on your GFX card never passes a certain level. If it&#8217;s still flickering, something else is the culprit.</li>
<li>Run Compiz with the &#8211;loose-binding option but <strong>not</strong> with &#8211;indirect-rendering. If you&#8217;re using fusion-icon, which I heavily recommend, you can right-click it and toggle these under &#8220;Compiz Options&#8221;. If you&#8217;re manually starting it, you&#8217;ll need to add/remove these switches to whatever process you use to start it.</li>
<li>Open CompizConfig Settings Manager, and in the Workarounds settings, under Utility, enable Force Synchronization between X and GLX.</li>
<li>If steps 2 or 3 worked, play around with those three settings until you find something that works for you. I personally enable loose binding due to the performance increase it gives me, but your mileage may vary.</li>
</ol>
<p>If all else fails, read on.</p>
<p><span id="more-134"></span></p>
<p>Since you&#8217;re reading this, you must be encountering the PowerMizer bug, and it&#8217;s time to mess around with PowerMizer. This will involve editing your xorg.conf file a bit, so I (HIGHLY, HIGHLY) recommend you make a backup by running</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.powermizerbackup</div></div>
<p>beforehand. Note the capitalization of the X in X11. In case this somehow royally messes up your system and/or config file (which it shouldn&#8217;t; it just involves adding one line) you can just copy the backup over the modified version.</p>
<p>With that out of the way, open /etc/X11/xorg.conf for editing. You&#8217;ll need to do so as root, so run</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gksu gedit /etc/X11/xorg.conf</div></div>
<p>(or whatever editor you want to use if you don&#8217;t like gedit). Now, find the section that starts with</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Section &quot;Device&quot;</div></div>
<p>. It should have the line</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Identifier &quot;Device0&quot;</div></div>
<p>nearby; if it doesn&#8217;t, something&#8217;s wrong. Start a new line somewhere between</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Section &quot;Device&quot;</div></div>
<p>and the</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">EndSection</div></div>
<p>that should come a few lines later, and add</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Option &quot;RegistryDwords&quot;</div></div>
<p>to the beginning of that line. What you put after that determines the settings PowerMizer will apply. There are four &#8216;parameters&#8217; you can put in the configuration string, each of which has a hexadecimal value; you specify them in the form &#8220;parameter1=value1; parameter2=value2; parameter3=value3&#8230;&#8221;. Since the values are all hexadecimal, you need to include a 0x before each of the values.</p>
<ul>
<li>PerfLevelSrc tells PowerMizer what &#8216;strategies&#8217; to use on AC and battery power. The two strategies are &#8216;fixed&#8217; and &#8216;adaptive&#8217;; &#8216;fixed&#8217; tells PowerMizer to always use the same clock frequency, and &#8216;adaptive&#8217; tells it to dynamically select one. The value for PerfLevelSrc is of the form xxyy, where xx specifies the battery power strategy and yy specifies the AC power strategy. Fixed is 22, and adaptive is 33.</li>
<li>PowerMizerDefault corresponds to the default clock frequency for battery power. 1 corresponds to maximum performance, 3 is maximum battery life, and 2 is an intermediate. Yes, I know it&#8217;s backwards.</li>
<li>PowerMizerDefaultAC is the same as PowerMizerDefault, but for AC power.</li>
<li>PowerMizerEnable enables PowerMizer, obviously. Set this to 1.</li>
</ul>
<p>So for example, if I wanted mycard to run at maximum frequency on AC power, but adaptive frequency on battery, I would use the line</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Option &quot;RegistryDwords&quot; &quot;PowerMizerEnable=0x1; PerfLevelSrc=3322; PowerMizerDefaultAC=0x1&quot;</div></div>
<p>If I wanted it to always run on minimum power on battery and maximum power on AC, the line would be</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Option &quot;RegistryDwords&quot; &quot;PowerMizerEnable=0x1; PerfLevelSrc=2222; PowerMizerDefaultAC=0x1; PowerMizerDefault=0x3&quot;</div></div>
<p>You get the picture. By way of example, the relevant setting of my xorg.conf file currently reads:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Section &quot;Device&quot;<br />
Identifier     &quot;Device0&quot;<br />
Driver         &quot;nvidia&quot;<br />
VendorName     &quot;NVIDIA Corporation&quot;<br />
Option &quot;RegistryDwords&quot;    &quot;PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x1&quot;<br />
EndSection</div></div>
<p>Once you&#8217;re done, save and close, and reboot and/or restart X. You can find more information about power settings and such at <a href="http://tutanhamon.com.ua/technovodstvo/NVIDIA-UNIX-driver/">this site</a>, which is where I got the information on the parameters for RegistryDwords.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/2009/06/27/fixing-screen-flickers-on-linux-with-nvidia/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
