<?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>pikopong &#187; linux</title>
	<atom:link href="http://www.pikopong.com/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pikopong.com/blog</link>
	<description>it&#039;s all about knowledge</description>
	<lastBuildDate>Tue, 13 Jul 2010 10:18:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Configuring Linux to work with NVIDIA Hybrid SLI Technology</title>
		<link>http://www.pikopong.com/blog/2010/02/21/configuring-linux-to-work-with-nvidia-hybrid-sli-technology/</link>
		<comments>http://www.pikopong.com/blog/2010/02/21/configuring-linux-to-work-with-nvidia-hybrid-sli-technology/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 14:31:13 +0000</pubDate>
		<dc:creator>amree</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[guides]]></category>

		<guid isPermaLink="false">http://www.pikopong.com/blog/?p=286</guid>
		<description><![CDATA[First of all, at the time of this writing, NVIDIA Hybrid SLI Technology is not supported on Linux and without proper configuration, you won&#8217;t even be able to load your Desktop Environment such as Xfce. That&#8217;s not the only problem, based on an interview with NVIDIA&#8217;s Tom Petersen, one of its main feature is called [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, at the time of this writing, NVIDIA Hybrid SLI Technology is <a href="http://www.nvnews.net/vbulletin/showpost.php?p=1613349&#038;postcount=2">not supported</a> on Linux and without proper configuration, you won&#8217;t even be able to load your Desktop Environment such as Xfce.</p>
<p>That&#8217;s not the only problem, based on <a href="http://www.nvnews.net/articles/hybrid_sli_interview/index.shtml">an interview</a> with NVIDIA&#8217;s Tom Petersen, one of its main feature is called HybridPower which basically allows users to shut off the graphics card when not needed and dramatically reduce power consumption. This means, there is a possibility that if we can&#8217;t find a way to turn off the second GPU, it will consume more power that it should be. But that&#8217;s another problem. Right now, we want to boot into our Desktop Environment properly.</p>
<ol>
<li>Running

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">amree<span style="color: #000000; font-weight: bold;">@</span>pikopong:~$ startx</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="xorg_conf" style="font-family:monospace;"><span class="br0">&#40;</span>!!<span class="br0">&#41;</span> More than one possible primary <span style="color: #990000;">device</span> found
<span class="br0">&#40;</span>--<span class="br0">&#41;</span> PCI: <span class="br0">&#40;</span><span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">2</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span><span class="br0">&#41;</span> 10de:06e8:<span style="color: #cc66cc;">1028</span>:0271 rev <span style="color: #cc66cc;">161</span>, Mem @ 0xae000000/<span style="color: #cc66cc;">16777216</span>, 0xd0000000/<span style="color: #cc66cc;">268435456</span>, 0xac000000/<span style="color: #cc66cc;">33554432</span>, I/O @ 0x00004000/<span style="color: #cc66cc;">128</span>
<span class="br0">&#40;</span>--<span class="br0">&#41;</span> PCI: <span class="br0">&#40;</span><span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">3</span>:<span style="color: #cc66cc;">0</span>:<span style="color: #cc66cc;">0</span><span class="br0">&#41;</span> 10de:0866:<span style="color: #cc66cc;">1028</span>:0271 rev <span style="color: #cc66cc;">177</span>, Mem @ 0xaa000000/<span style="color: #cc66cc;">16777216</span>, 0xb0000000/<span style="color: #cc66cc;">268435456</span>, 0xcc000000/<span style="color: #cc66cc;">33554432</span>, I/O @ 0x00005000/<span style="color: #cc66cc;">128</span>, BIOS @ 0x????????/<span style="color: #cc66cc;">131072</span></pre></div></div>

<p>gave me some errors from my</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/var/log/Xorg.0.log</pre></div></div>

</li>
<li>Login as a root and run the command below

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>pikopong:~<span style="color: #666666; font-style: italic;"># nvidia-xconfig</span></pre></div></div>

<p>This is to generate the right configuration for your X.
</li>
<li>Get the list of the GPUs.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>pikopong:~<span style="color: #666666; font-style: italic;"># lspci</span>
02:<span style="color: #000000;">00.0</span> VGA compatible controller: nVidia Corporation G98 <span style="color: #7a0874; font-weight: bold;">&#91;</span>GeForce 9200M GS<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> a1<span style="color: #7a0874; font-weight: bold;">&#41;</span>
03:<span style="color: #000000;">00.0</span> VGA compatible controller: nVidia Corporation C79 <span style="color: #7a0874; font-weight: bold;">&#91;</span>GeForce 9400M G<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">rev</span> b1<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>You will get a long list of devices connected to your PCI buses. We are only interested with the VGA controller.
</li>
<li>As you can see, we have two VGA controller, we need to specify which one we would like to use.

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>pikopong:~<span style="color: #666666; font-style: italic;"># nano /etc/X11/xorg.conf</span></pre></div></div>

</li>
<li>Go to your Device section and set Bus ID for your controller in it. So, in the end, if I chose the second controller, my Xorg.conf would somehow look like this:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="xorg_conf" style="font-family:monospace;"><span style="color: #b1b100;">Section</span> <span style="color: #0000ff;">&quot;Device&quot;</span>
    <span style="color: #990000;">Identifier</span>     <span style="color: #0000ff;">&quot;Device0&quot;</span>
    <span style="color: #990000;">Driver</span>         <span style="color: #0000ff;">&quot;nvidia&quot;</span>
    <span style="color: #990000;">VendorName</span>     <span style="color: #0000ff;">&quot;NVIDIA Corporation&quot;</span>
    <span style="color: #990000;">BoardName</span>      <span style="color: #0000ff;">&quot;GeForce 9400M G&quot;</span>
    <span style="color: #990000;">BusID</span>          <span style="color: #0000ff;">&quot;PCI:3:0:0&quot;</span>
<span style="color: #b1b100;">EndSection</span></pre></td></tr></table></div>

</li>
<li>The configuration is simple, you just need to add the 6th line. Just make sure you put it in the correct format PCI:X:X:X, X possibly refers to the last 3 digit number in your error log</li>
</ol>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.pikopong.com/blog/2010/07/13/install-tweetdeck-on-slackware-13-1-with-xfce/" title="Install TweetDeck on Slackware 13.1 with Xfce">Install TweetDeck on Slackware 13.1 with Xfce</a></li><li><a href="http://www.pikopong.com/blog/2009/07/22/how-to-enable-mysql-support-in-qt-sdk-for-linux/" title="How to enable MySQL support in Qt SDK for Linux">How to enable MySQL support in Qt SDK for Linux</a></li><li><a href="http://www.pikopong.com/blog/2008/09/10/printing-to-pdf-using-cups/" title="Printing to PDF Using CUPS">Printing to PDF Using CUPS</a></li><li><a href="http://www.pikopong.com/blog/2008/09/09/java-printing-fix-for-linux-with-cups/" title="Java Printing Fix for Linux with CUPS">Java Printing Fix for Linux with CUPS</a></li><li><a href="http://www.pikopong.com/blog/2010/05/18/streamyx-cool-uni-pack/" title="Streamyx Cool Uni Pack">Streamyx Cool Uni Pack</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.pikopong.com/blog/2010/02/21/configuring-linux-to-work-with-nvidia-hybrid-sli-technology/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Printing to PDF Using CUPS</title>
		<link>http://www.pikopong.com/blog/2008/09/10/printing-to-pdf-using-cups/</link>
		<comments>http://www.pikopong.com/blog/2008/09/10/printing-to-pdf-using-cups/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:01:49 +0000</pubDate>
		<dc:creator>amree</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[guides]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://www.pikopong.com/blog/?p=107</guid>
		<description><![CDATA[Install CUPS-PDF based on your distro, you can download if from here. Click this link http://localhost:631 or type it into your browser. If the page requested a username and password, just enter your root username and password. Go the &#8220;Administration&#8221; tab and select &#8220;Add Printer&#8221; in the Printer section. For &#8220;Add Printer&#8221; page, put a [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Install CUPS-PDF based on your distro, you can download if from <a title="CUPS-PDF" href="http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/download.shtml" target="_blank">here</a>.</li>
<li>Click this link <a title="CUPS Administration" href="http://localhost:631" target="_blank">http://localhost:631</a> or type it into your browser.</li>
<li>If the page requested a username and password, just enter your root username and password.</li>
<li>Go the <strong>&#8220;Administration&#8221;</strong> tab and select <strong>&#8220;Add Printer&#8221;</strong> in the Printer section.</li>
<li>For <strong>&#8220;Add Printer&#8221;</strong> page, put a name for your virtual PDF printer, any name will do. Then click <strong>&#8220;Continue&#8221;</strong>.</li>
<li>For the second page, that is <strong>&#8220;Device for a&#8221;</strong>, you should select <strong>&#8220;CUPS-PDF (Virtual PDF Driver)&#8221;</strong>. If it&#8217;s not there, then you haven&#8217;t execute Step 1 successfully.</li>
<li>In the 3rd page, choose <strong>&#8220;Generic&#8221;</strong> as the Make and then click <strong>&#8220;Continue&#8221;</strong>.</li>
<li>4th page, choose <strong>&#8220;Generic CUPS-PDF Printer (en)&#8221;</strong> as the model and then click <strong>&#8220;Add Printer&#8221;</strong>. You&#8217;re done, but we need to customize where the file will be located when you printed it.</li>
<li>Edit <strong>/etc/cups/cups-pdf.conf</strong> in your favourite editor.</li>
<li>Put these lines at the end of the file and save it (both can be customized):</li>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Out /home/${USER}/Desktop
Label 1</pre></td></tr></table></div>

</ol>
<ol start="11">
<li>The first line actually tell CUPS to print your file to the Desktop and the second line will make sure your file won&#8217;t be overwritten by the newer one.</li>
<li>Restart your CUPS, for Slackware users, you can type this command <strong>/etc/rc.d/rc.cups restart</strong></li>
<li>So, that&#8217;s all and good luck !</li>
</ol>
<p><strong>Tested on Slackware 12.1, CUPS 1.3.7</strong></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.pikopong.com/blog/2008/09/09/java-printing-fix-for-linux-with-cups/" title="Java Printing Fix for Linux with CUPS">Java Printing Fix for Linux with CUPS</a></li><li><a href="http://www.pikopong.com/blog/2010/07/13/install-tweetdeck-on-slackware-13-1-with-xfce/" title="Install TweetDeck on Slackware 13.1 with Xfce">Install TweetDeck on Slackware 13.1 with Xfce</a></li><li><a href="http://www.pikopong.com/blog/2010/02/21/configuring-linux-to-work-with-nvidia-hybrid-sli-technology/" title="Configuring Linux to work with NVIDIA Hybrid SLI Technology">Configuring Linux to work with NVIDIA Hybrid SLI Technology</a></li><li><a href="http://www.pikopong.com/blog/2009/07/22/how-to-enable-mysql-support-in-qt-sdk-for-linux/" title="How to enable MySQL support in Qt SDK for Linux">How to enable MySQL support in Qt SDK for Linux</a></li><li><a href="http://www.pikopong.com/blog/2009/02/11/reading-mifare-1k-card-using-java-in-linux/" title="Reading Mifare 1K Card using Java in Linux">Reading Mifare 1K Card using Java in Linux</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.pikopong.com/blog/2008/09/10/printing-to-pdf-using-cups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Printing Fix for Linux with CUPS</title>
		<link>http://www.pikopong.com/blog/2008/09/09/java-printing-fix-for-linux-with-cups/</link>
		<comments>http://www.pikopong.com/blog/2008/09/09/java-printing-fix-for-linux-with-cups/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 02:08:46 +0000</pubDate>
		<dc:creator>amree</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.pikopong.com/blog/?p=103</guid>
		<description><![CDATA[Apparently, there&#8217;s a bug in Java where people using newer version of CUPS cannot print (can&#8217;t even display the print dialog) due to a null pointer exception and this is actually a known bug. So, how do we fix this? For people who use Gnome, you can refer to this page. However, for people who [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently, there&#8217;s a bug in Java where people using newer version of CUPS cannot print (can&#8217;t even display the print dialog) due to a null pointer exception and this is actually a known bug. So, how do we fix this? For people who use Gnome, you can refer to this <a href="https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/156191/comments/18" target="_blank">page</a>.</p>
<p>However, for people who uses non gui environment such as Fluxbox, Openbox and etc (Gnome and KDE user can use these steps too), you can fix it by editing your CUPS printers configuration file. You can get edit the file at <strong>/etc/cups/printers.conf</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;DefaultPrinter Printer&gt;
# Printer configuration file for CUPS v1.3.7
# Written by cupsd on 2008-09-08 11:24
.
.
.
Option orientation-requested 3
&lt;/Printer&gt;</pre></div></div>

<p>Make sure you <strong>add line 7</strong> to every configuration for every printer you&#8217;ve installed. If you cannot find the file, you probably haven&#8217;t configured any printer yet.</p>
<p>This fix is simply to make sure CUPS will provide a page orientation setting to Java.</p>
<p>The exception:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Caused by<span style="color: #339933;">:</span> java.<span style="color: #006633;">lang</span>.<span style="color: #003399;">NullPointerException</span><span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">null</span> attribute
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">IPPPrintService</span>.<span style="color: #006633;">isAttributeValueSupported</span><span style="color: #009900;">&#40;</span>IPPPrintService.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1147</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceDialog</span>$OrientationPanel.<span style="color: #006633;">updateInfo</span><span style="color: #009900;">&#40;</span>ServiceDialog.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">2121</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceDialog</span>$PageSetupPanel.<span style="color: #006633;">updateInfo</span><span style="color: #009900;">&#40;</span>ServiceDialog.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1263</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceDialog</span>.<span style="color: #006633;">updatePanels</span><span style="color: #009900;">&#40;</span>ServiceDialog.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">437</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceDialog</span>.<span style="color: #006633;">initPrintDialog</span><span style="color: #009900;">&#40;</span>ServiceDialog.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">195</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceDialog</span>.<span style="color: #009900;">&#40;</span>ServiceDialog.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">124</span><span style="color: #009900;">&#41;</span>
        at javax.<span style="color: #006633;">print</span>.<span style="color: #006633;">ServiceUI</span>.<span style="color: #006633;">printDialog</span><span style="color: #009900;">&#40;</span>ServiceUI.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">188</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">RasterPrinterJob</span>.<span style="color: #006633;">printDialog</span><span style="color: #009900;">&#40;</span>RasterPrinterJob.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">855</span><span style="color: #009900;">&#41;</span>
        at sun.<span style="color: #006633;">print</span>.<span style="color: #006633;">PSPrinterJob</span>.<span style="color: #006633;">printDialog</span><span style="color: #009900;">&#40;</span>PSPrinterJob.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">421</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>Refer to some of the discussions here:</p>
<ul>
<li><a href="https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/156191/">Ubuntu Bugs Report</a></li>
<li><a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6633656">Java Bugs Report</a></li>
</ul>
<p>UPDATE: I forgot to add, you need to restart your CUPS after editing the configuration (Thanks to Brandon Bell)</p>
<p><strong>Tested on Slackware 12.1, JDK 1.6 Update 7, CUPS 1.3.7</strong></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.pikopong.com/blog/2008/09/10/printing-to-pdf-using-cups/" title="Printing to PDF Using CUPS">Printing to PDF Using CUPS</a></li><li><a href="http://www.pikopong.com/blog/2010/02/21/configuring-linux-to-work-with-nvidia-hybrid-sli-technology/" title="Configuring Linux to work with NVIDIA Hybrid SLI Technology">Configuring Linux to work with NVIDIA Hybrid SLI Technology</a></li><li><a href="http://www.pikopong.com/blog/2009/02/11/reading-mifare-1k-card-using-java-in-linux/" title="Reading Mifare 1K Card using Java in Linux">Reading Mifare 1K Card using Java in Linux</a></li><li><a href="http://www.pikopong.com/blog/2010/07/13/install-tweetdeck-on-slackware-13-1-with-xfce/" title="Install TweetDeck on Slackware 13.1 with Xfce">Install TweetDeck on Slackware 13.1 with Xfce</a></li><li><a href="http://www.pikopong.com/blog/2010/05/08/fix-dell-studio-xps-laptop-hanging-problem/" title="Fix Dell Studio XPS Laptop Hanging Problem">Fix Dell Studio XPS Laptop Hanging Problem</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.pikopong.com/blog/2008/09/09/java-printing-fix-for-linux-with-cups/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>
