<?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>pi | Matt Crawford</title>
	<atom:link href="https://mattcrawford.me/tag/pi/feed/" rel="self" type="application/rss+xml" />
	<link>https://mattcrawford.me</link>
	<description>Handyman &#124; Geek &#124; YouTuber</description>
	<lastBuildDate>Wed, 15 Jun 2022 00:07:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
<site xmlns="com-wordpress:feed-additions:1">176948450</site>	<item>
		<title>Prevent your Raspberry Pi from Sleeping</title>
		<link>https://mattcrawford.me/raspberry-pi-sleeping__trashed/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=raspberry-pi-sleeping__trashed</link>
					<comments>https://mattcrawford.me/raspberry-pi-sleeping__trashed/#respond</comments>
		
		<dc:creator><![CDATA[Matt Crawford]]></dc:creator>
		<pubDate>Wed, 18 Sep 2019 13:00:38 +0000</pubDate>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[pi]]></category>
		<guid isPermaLink="false">https://t3dus.com/?p=4593</guid>

					<description><![CDATA[<p>You&#8217;re using your Pi and your monitor keeps going blank and it&#8217;s driving you mad. There are various methods to accomplish this so we&#8217;ll look at a few. That way if you find one isn&#8217;t working for you, you&#8217;ll have some alternatives. setterm &#8211; terminal blanking On a per session basis, you can run: This [&#8230;]</p>
The post <a href="https://mattcrawford.me/raspberry-pi-sleeping__trashed/">Prevent your Raspberry Pi from Sleeping</a> first appeared on <a href="https://mattcrawford.me">Matt Crawford</a>.]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">You&#8217;re using your Pi and your monitor keeps going blank and it&#8217;s driving you
mad.</p>



<p class="wp-block-paragraph">There are various methods to accomplish this so we&#8217;ll look at a few. That way
if you find one isn&#8217;t working for you, you&#8217;ll have some alternatives.</p>



<h2 class="wp-block-heading">setterm &#8211; terminal blanking</h2>



<p class="wp-block-paragraph">On a per session basis, you can run:</p>



<pre class="wp-block-code"><code>setterm -blank 0 -powerdown 0</code></pre>



<p class="wp-block-paragraph">This will set the timeout of your monitor to 0, which will prevent it from
going to sleep.</p>



<p class="wp-block-paragraph">If you get yelled at about permissions, try &#8220;sudo setterm&#8221; instead.</p>



<p class="wp-block-paragraph">You might not want to enter these commands every time you boot up your Pi.
In this case, open up your .bashrc file (or .extras or other custom file you
might use).</p>



<pre class="wp-block-code"><code>nano ~/.bashrc</code></pre>



<p class="wp-block-paragraph">At the end of the file add a new line with the setterm command you entered
before.</p>



<pre class="wp-block-code"><code>setterm -blank 0 -powerdown 0</code></pre>



<p class="wp-block-paragraph">Hit ctrl+x to exit, &#8216;y&#8217; to save your changes and enter to save the file.</p>



<p class="wp-block-paragraph"><em>Note: the default value for the -blank option is 0 so it may be excluded</em></p>



<p class="wp-block-paragraph">Now when you boot up, your monitor will never sleep.</p>



<h2 class="wp-block-heading">kbd configuration &#8211; terminal blanking</h2>



<p class="wp-block-paragraph">Open up your configuration:</p>



<pre class="wp-block-code"><code>sudo nano /etc/kbd/config</code></pre>



<p class="wp-block-paragraph">Find the line for BLANK_TIME and POWERDOWN_TIME and set them to 0.</p>



<pre class="wp-block-code"><code>BLANK_TIME=0
POWERDOWN_TIME=0</code></pre>



<p class="wp-block-paragraph">If these lines doesn&#8217;t exist go ahead and add them.</p>



<h2 class="wp-block-heading">lxde configuration &#8211; Xsession blanking</h2>



<p class="wp-block-paragraph">The previous methods should work for the terminal. This method should prevent
your screen saver from coming on in the GUI.</p>



<p class="wp-block-paragraph">Open up your lxde autostart file:</p>



<pre class="wp-block-code"><code>sudo nano /etc/xdg/lxsession/LXDE/autostart</code></pre>



<p class="wp-block-paragraph">If your Pi is newer, the file you&#8217;ll need to change may be:</p>



<pre class="wp-block-code"><code>sudo nano /etc/xdg/lxsession/LXDE-pi/autostart</code></pre>



<p class="wp-block-paragraph">Add these lines:</p>



<pre class="wp-block-code"><code>@xset s noblank
@xset s off
@xset -dpms</code></pre>



<h2 class="wp-block-heading">lightdm configuration &#8211; Xsession blanking</h2>



<p class="wp-block-paragraph">If adding those settings to your LXDE autostart didn&#8217;t work, this might help
if you&#8217;re booting straight into the GUI.</p>



<p class="wp-block-paragraph">Open your lightdm configuration:</p>



<pre class="wp-block-code"><code>sudo nano /etc/lightdm/lightdm.conf</code></pre>



<p class="wp-block-paragraph">Anywhere below the [SeatDefaults] header, add:</p>



<pre class="wp-block-code"><code>xserver-command=X -s 0 -dpms</code></pre>



<p class="wp-block-paragraph">This will set your blanking timeout to 0 and turn off your display power
management signaling.</p>The post <a href="https://mattcrawford.me/raspberry-pi-sleeping__trashed/">Prevent your Raspberry Pi from Sleeping</a> first appeared on <a href="https://mattcrawford.me">Matt Crawford</a>.]]></content:encoded>
					
					<wfw:commentRss>https://mattcrawford.me/raspberry-pi-sleeping__trashed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4593</post-id>	</item>
	</channel>
</rss>
