<?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>alan.lamielle.net &#187; linux</title>
	<atom:link href="http://alan.lamielle.net/tags/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://alan.lamielle.net</link>
	<description>Alan LaMielle</description>
	<lastBuildDate>Fri, 16 Sep 2011 16:50:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Windows 7 Nonpaged Pool Srv Error 2017</title>
		<link>http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017</link>
		<comments>http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:57:30 +0000</pubDate>
		<dc:creator>Alan LaMielle</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[event id 2017]]></category>
		<category><![CDATA[file server]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[media center]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[mount error]]></category>
		<category><![CDATA[nonpaged pool]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[srv]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[windows 7 media center]]></category>

		<guid isPermaLink="false">http://alan.lamielle.net/?p=444</guid>
		<description><![CDATA[I&#8217;m using my Windows 7 machine as a file server in addition to it being my Media Center. I&#8217;m mounting a Samba (smb) share using CIFS from my Linux server so I can synchronize files using rsync.  However, I ran into a problem after using the mounted share for a small amount of time.  I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using my Windows 7 machine as a file server in addition to it being my Media Center. I&#8217;m mounting a Samba (smb) share using CIFS from my Linux server so I can synchronize files using rsync.  However, I ran into a problem after using the mounted share for a small amount of time.  I found a simple solution after a bit of research.<br />
<span id="more-444"></span><br />
After running rsync for a short amount of time, I discovered that I was getting memory allocation errors related to the Windows share.  After unmounting, I attempted to remount the share and received the error:</p>
<p><code>mount error(12): Cannot allocate memory<br />
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)</code></p>
<p>After checking the Event Viewer System log, I found the following error:</p>
<p><code>Source: srv<br />
Event ID: 2017<br />
Level: Error<br />
The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.</code></p>
<p>Some research led me to find this <a class="vt-p" href="http://groups.google.com/group/microsoft.public.windows.vista.networking_sharing/browse_thread/thread/345de3116d959664/ea091e5eb4a647ba?lnk=raot">Google Groups discussion</a> about the problem and this <a class="vt-p" href="http://technet.microsoft.com/en-us/sysinternals/bb897446.aspx">Microsoft Technet article</a> discussing the solution (look at the bottom of the page).  Apparently you need to tell Windows that you want to use the machine as a file server and that it should allocate resources accordingly.  Set the following registry key to &#8217;1&#8242;:</p>
<p><code>HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache</code></p>
<p>and set the following registry key to &#8217;3&#8242;:</p>
<p><code>HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size</code></p>
<p>After making these changes and restarting, I haven&#8217;t seen this issue arise again.  Fixed!</p>
<p><strong>Update </strong>(2011/9/16): I had no idea this fix would end up being so popular when I wrote it up.  It is easily the most visited page on this site.  The original Technet article seems to be gone now, but a commenter has pointed me to a text file that contains the same content.  Here is the link: <a class="vt-p" href="http://www.decuslib.com/decus/vmslt99a/nt/tips.txt">http://www.decuslib.com/decus/vmslt99a/nt/tips.txt</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017/feed</wfw:commentRss>
		<slash:comments>144</slash:comments>
		</item>
		<item>
		<title>Google Gears in Firefox 3.5 in Linux x64_64</title>
		<link>http://alan.lamielle.net/2009/07/19/google-gears-in-firefox-3-5-in-linux-x64_64</link>
		<comments>http://alan.lamielle.net/2009/07/19/google-gears-in-firefox-3-5-in-linux-x64_64#comments</comments>
		<pubDate>Sun, 19 Jul 2009 17:59:45 +0000</pubDate>
		<dc:creator>Alan LaMielle</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[3.5]]></category>
		<category><![CDATA[3.5.1]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 3.5]]></category>
		<category><![CDATA[gears]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google gears]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu jaunty]]></category>
		<category><![CDATA[x86_64]]></category>

		<guid isPermaLink="false">http://alan.lamielle.net/?p=347</guid>
		<description><![CDATA[I recently posted about getting Firefox working in Ubuntu Jaunty 9.04 x86_64.  Updates to Firefox 3.5.1 were recently pushed to the repositories, and after updating, Gears stopped working again.  Use the Gears build here for Firefox 3.5.1 Linux x86_46, linked to from this Google Groups post. It really would be nice if 64-bit Linux was [...]]]></description>
			<content:encoded><![CDATA[<p>I recently <a href="http://alan.lamielle.net/2009/07/13/firefox-3-5-in-ubuntu-jaunty-9-04">posted</a> about getting Firefox working in Ubuntu Jaunty 9.04 x86_64.  Updates to Firefox 3.5.1 were recently pushed to the repositories, and after updating, Gears stopped working again.  Use the Gears build <a href="http://gkovacs.xvm.mit.edu/google-gears/gears-linux-x86_64-0.5.25.0.xpi">here</a> for Firefox 3.5.1 Linux x86_46, linked to from <a href="http://groups.google.com/group/gears-users/msg/70f164020c0f8f4e">this</a> Google Groups post.</p>
<p>It really would be nice if 64-bit Linux was supported by Google rather than having to find these work-around builds.  Clearly it works for us, what is the holdup?</p>
]]></content:encoded>
			<wfw:commentRss>http://alan.lamielle.net/2009/07/19/google-gears-in-firefox-3-5-in-linux-x64_64/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing nVidia driver 185.18.14 with real time linux kernel 2.6.28-3-rt</title>
		<link>http://alan.lamielle.net/2009/07/10/installing-nvidia-driver-185-18-14-with-real-time-linux-kernel-2-6-28-3-rt</link>
		<comments>http://alan.lamielle.net/2009/07/10/installing-nvidia-driver-185-18-14-with-real-time-linux-kernel-2-6-28-3-rt#comments</comments>
		<pubDate>Sat, 11 Jul 2009 00:50:28 +0000</pubDate>
		<dc:creator>Adam Labadorf</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[jaunty]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[nvidia]]></category>

		<guid isPermaLink="false">http://alan.lamielle.net/?p=302</guid>
		<description><![CDATA[This article discusses how to get the NVidia Linux graphics driver working with the real time linux kernel version 2.6.28-rt under Ubuntu (Kubuntu) 9.04 on AMD 64. DISCLAIMER:I have no idea if what I have here is a good idea beyond the fact that my video card is working properly under linux-rt.  My computer froze [...]]]></description>
			<content:encoded><![CDATA[<p>This article discusses how to get the NVidia Linux graphics driver working with the real time linux kernel version 2.6.28-rt under Ubuntu (Kubuntu) 9.04 on AMD 64.</p>
<p><span id="more-302"></span><strong>DISCLAIMER:</strong>I have no idea if what I have here is a good idea beyond the fact that my video card is working properly under linux-rt.  My computer froze a couple times with the following setup but I&#8217;m not sure if it&#8217;s the fix or the fact that linux-rt apparently doesn&#8217;t play well with multiple core machines.  Or the computer freezy gnomes.  Whatever.  Use at your own risk.</p>
<p>I&#8217;m running Kubuntu 9.04 on AMD64.</p>
<p>While setting up my linux audio recording setup on Kubuntu 9.04 I installed the linux-rt meta-package (which right now points to linux-2.6.28-3-rt) for real time process scheduling.  I was dismayed and not at all surprised that the proprietary nVidia driver for my GeForce 7950  GT did not work immediately when I booted up out of GRUB with the new kernel.  So, I downloaded the latest nVidia driver from <a title="http://www.nvidia.com/object/linux_display_amd64_185.18.14.html" href="http://www.nvidia.com/object/linux_display_amd64_185.18.14.html" target="aaaaaa">http://www.nvidia.com/object/linux_display_amd64_185.18.14.html</a> and tried to install as I have to do every time there is a new linux kernel update by running this with the downloaded script:</p>
<p><code>$&gt; sudo sh NVIDIA-Linux-x86_64-185.18.14-pkg2.run</code></p>
<p>The script informs you that it needs to compile the kernel module as usual, but dies saying compilation was unsuccessful.  Following the advice of some forum posts I found, I extracted the script into its source tree with:</p>
<p><code>$&gt; sudo sh NVIDIA-Linux-x86_64-185.18.14-pkg2.run -x</code></p>
<p>which creates a directory with a script <code>nvidia-installer.sh</code> and the source tree.  I ran the installer manually with:<br />
<code><br />
$&gt; cd  NVIDIA-Linux-x86_64-185.18.14-pkg2<br />
$&gt; sudo ./nvidia-installer<br />
</code></p>
<p>Compilation fails again at the same step.  Inspecting <code>/var/log/nvidia-installer.log</code> tells us:</p>
<p><code>/home/labadorf/video_drivers/NVIDIA-Linux-x86_64-185.18.14-pkg2/usr/src/nv/os-interface.c:130: error: incompatible types in assignment</code></p>
<p>After poking around some forums there were some suggestions about replacing some SEMAPHORE code in certain driver source files, but they were for the wrong driver version (177) and didn&#8217;t work. Alright, well I have the source for both the kernel and driver, I thought, so let&#8217;s see what this incompatible type assignment is.  At the end of the day, I traced the error to a couple lines of code earlier in <code>usr/src/nv/os-interface.c</code>.  Apparently, the driver is trying to pass some <code>raw_spinlock_t</code> kernel struct to a function that can only accept <code>spinlock_t</code> structs when it detects you&#8217;re using a real time kernel.  So, I thought a little commenting might do the trick&#8230;</p>
<p>Original <code>os-interface.c</code> source:</p>
<p><code><br />
86 typedef struct os_sema_s<br />
87 {<br />
88     nv_stack_t        *sp;<br />
89     struct completion  completion;<br />
90 #if defined(CONFIG_PREEMPT_RT)<br />
91     raw_spinlock_t     lock;<br />
92 #else<br />
93     spinlock_t         lock;<br />
94 #endif<br />
95     S032               count;<br />
96 } os_sema_t;<br />
97<br />
</code></p>
<p>Modified code:<br />
<code><br />
86 typedef struct os_sema_s<br />
87 {<br />
88     nv_stack_t        *sp;<br />
89     struct completion  completion;<br />
90 //#if defined(CONFIG_PREEMPT_RT)<br />
91 //    raw_spinlock_t     lock;<br />
92 //#else<br />
93     spinlock_t         lock;<br />
94 //#endif<br />
95     S032               count;<br />
96 } os_sema_t;<br />
97<br />
</code></p>
<p>Lo and behold, on recompiling the driver everything works fine.  Now, I suppose there may have been a good reason to use the raw version of the struct, but I got all of my audio stuff running with much lower latency AND using both monitors on high resolution (which is really handy since some of these audio apps take up a lot of screen real estate).  There are a couple bugs open on this issue so I didn&#8217;t feel the need to post anything (though none of the comments there helped with my problem), hopefully someone will figure out what the problem is and fix it soon.</p>
<p><strong>Note:</strong> By default the installer replaces whatever driver you have with the new one.  You <em>have</em> to unpack the driver source and use the installer manually if you want to use different kernels and not recompile the driver every time.  Look at <a href="http://meandubuntu.wordpress.com/2008/07/17/install-nvidia-17713-drivers-on-realtime-kernel/" target="aaaaa">this post</a> and specifically Switcher&#8217;s comment 12 for instructions on how to do that.</p>
<p>Like I said, the commenting out I&#8217;ve done may be a terrible, terrible idea, but as I know nothing about graphics drivers and even less about kernel building I&#8217;m playing the ignorant fool.  Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://alan.lamielle.net/2009/07/10/installing-nvidia-driver-185-18-14-with-real-time-linux-kernel-2-6-28-3-rt/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Environment Variables and GNU Screen</title>
		<link>http://alan.lamielle.net/2009/03/09/environment-variables-and-gnu-screen</link>
		<comments>http://alan.lamielle.net/2009/03/09/environment-variables-and-gnu-screen#comments</comments>
		<pubDate>Mon, 09 Mar 2009 19:32:00 +0000</pubDate>
		<dc:creator>Alan LaMielle</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[X]]></category>
		<category><![CDATA[Xorg]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://alan.lamielle.net/?p=80</guid>
		<description><![CDATA[I am an avid user of GNU screen.  However, one problem I’ve run into lately in Ubuntu involves the interaction of persistent screen sessions and less-than-persistent X sessions.  I’ve found that after starting a new X session, new environment variables are set (such as DISPLAY, SSH_AGENT_PID, and SSH_AUTH_SOCK).  This causes an incosistency between my X [...]]]></description>
			<content:encoded><![CDATA[<p>I am an avid user of <span class="caps">GNU</span> screen.  However, one problem I’ve run into lately in Ubuntu involves the interaction of persistent screen sessions and less-than-persistent X sessions.  I’ve found that after starting a new X session, new environment variables are set (such as <span class="caps">DISPLAY</span>, SSH_AGENT_PID, and <span class="caps">SSH</span>_AUTH_SOCK).  This causes an incosistency between my X session’s variables and those that exist in my persistent screen session.  This post discusses my solution to this issue.</p>
<p>I’m currently running the currently unreleased Ubuntu Jaunty on virtually all of my machines.  At times, such as when resuming my notebook, I find that my X session has died.  This is not that much of an inconvenience for me—I do most of my work within a screen session that exists as long as the machine stays running, regardless of what X decides to do.  However, services such as ssh-agent must be restarted when creating a new X session and along with this restart comes a new set values for <span class="caps">SSH</span>_AGENT_PID and <span class="caps">SSH</span>_AUTH_SOCK.  In addition, it is possible that <span class="caps">DISPLAY</span> may change as well.</p>
<p>While these variables have changed, the screen sessions values have not been updated.  So when I re-attach to the running screen session and attempt to use ssh, I find that rather than using the running ssh-agent process to cache my passphrase, I am prompted in my terminal to enter the passphrase.  If I were able to use the updated environment variables I could use the ssh-agent process and all would be fine.</p>
<p>As I normally do, I googled for this issue and ran across <a href="http://samrowe.com/wordpress/ssh-agent-and-gnu-screen/">this solution</a> to the problem.  Rather than reiterate the details presented in this post, I simply show the two zsh functions I’ve written, as they differ sightly from the afore mentioned post:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grabvars<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #007800;">VARS</span>=<span style="color: #ff0000;">&quot;SSH_AGENT_PID SSH_AUTH_SOCK DISPLAY&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#For each variable in $VARS</span>
<span style="color: #000000; font-weight: bold;">for</span> x <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$VARS</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ; <span style="color: #000000; font-weight: bold;">do</span>
<span style="color: #7a0874; font-weight: bold;">eval</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$x</span>=\$<span style="color: #007800;">$x</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span>  <span style="color: #ff0000;">'s/=/=&quot;/
s/$/&quot;/
s/^/export /'</span>
<span style="color: #000000; font-weight: bold;">done</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #007800;">$VARSLOC</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
sourcevars<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$VARSLOC</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
<span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #007800;">$VARSLOC</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Note that <span class="caps">VARSLOC</span> names the file that the export statements should be written to.</p>
<p>How do I use these two functions?  sourcevars is called every time a new shell is created (I’ve simply added a call to this function in ~/.zshrc).  grabvars is only called when I create or attach to a screen session, so I’ve aliased ‘screen’ to be ‘grabvars; screen’.  So now when I first login and create a new terminal, this terminal has the updated environment vars.  I do a ‘screen -DR session_name’ to attach, which then calls grabvars, the correct values are written to <span class="caps">VARSLOC</span>, and my screen session is attached.  If I create a new window in my screen session, the correct variables are now set.  If I want the updated variables in an exsiting window, I simply call ‘sourcevars’.</p>
]]></content:encoded>
			<wfw:commentRss>http://alan.lamielle.net/2009/03/09/environment-variables-and-gnu-screen/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

