<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=774&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=774</link>
		<description><![CDATA[The most recent posts in Issues with Laptop Lid Suspend/Hibernate and Panel Plugins.]]></description>
		<lastBuildDate>Mon, 15 Apr 2019 07:36:57 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15561#p15561</link>
			<description><![CDATA[<p>Thanks Head on a Stick,</p><p>That was very useful. As an additional note...</p><p>On my Dell XPS 13 I also had to check the contents of /sys/power/mem_sleep as the default (between brackets) was s2idle and it indicated that also &#039;deep&#039; or suspend to RAM was possible, saving even more power. </p><p>I followed the instructions of <a href="https://www.kernel.org/doc/html/v4.18/admin-guide/pm/sleep-states.html" rel="nofollow">https://www.kernel.org/doc/html/v4.18/a … tates.html</a> to make &#039;deep&#039; the default by adding it to /etc/default/grub e.g.</p><p>GRUB_CMDLINE_LINUX_DEFAULT=&quot;quiet mem_sleep_default=deep&quot;</p><p>and ran &#039;update-grub&#039; afterwards.</p>]]></description>
			<author><![CDATA[dummy@example.com (StevenB)]]></author>
			<pubDate>Mon, 15 Apr 2019 07:36:57 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15561#p15561</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15085#p15085</link>
			<description><![CDATA[<p>BUMP!</p><p>I have a solution to the lid suspend problem that works without <em>pm-utils</em> <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p><strong>/etc/acpi/events/lid</strong>:</p><div class="codebox"><pre><code>event=button/lid
action=/etc/acpi/lid</code></pre></div><p><strong>/etc/acpi/lid</strong> (must be executable):</p><div class="codebox"><pre><code>#!/bin/sh
grep -q close /proc/acpi/button/lid/LID/state &amp;&amp; echo mem &gt; /sys/power/state</code></pre></div><p>Then reload the configuration:</p><div class="codebox"><pre><code># pkill -hup acpid</code></pre></div><p>(This presumes that <em>acpid</em> is already installed and started.)</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Tue, 26 Mar 2019 18:30:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15085#p15085</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=8108#p8108</link>
			<description><![CDATA[<p>This works for me for pm-suspend/hibernate, and works with acpi/lid.sh:</p><p>/etc/pm/sleep.d/00lock</p><div class="codebox"><pre><code>#!/bin/sh

# Specify the display for acpi
export DISPLAY=:0
# Run a specified program as user
run(){
su -c &quot;$1&quot; omega
}
# Run programs for pm-utils
case $1 in
        suspend|hibernate)
                run /usr/bin/slock &amp;
                ;;
        resume|thaw)
                ;;
esac</code></pre></div><p>/etc/acpi/lid.sh</p><div class="codebox"><pre><code>#!/bin/sh
if [ &quot;$3&quot; = &quot;close&quot; ]; then
	/usr/sbin/pm-suspend
fi</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Tue, 27 Mar 2018 19:11:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=8108#p8108</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6602#p6602</link>
			<description><![CDATA[<div class="quotebox"><cite>ulno wrote:</cite><blockquote><div><p>acpi-script hack</p></div></blockquote></div><p>That&#039;s such a beautifully mis-informed notion!</p><p>It reads as a praise to the layers and layers of code in between the person and the action, simply to make a drawing of it, so it can be operated without articulated thought.</p><p>Other than that, I have nothing <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Thu, 07 Dec 2017 22:08:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6602#p6602</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6598#p6598</link>
			<description><![CDATA[<div class="quotebox"><cite>ulno wrote:</cite><blockquote><div><p>I confirm all problems still persist in xfce on Devuan:<br />- no lid-based actions in xfce (only via acpi-script hack -&gt; but this still doesn&#039;t trigger anything power-related in the xfce gui)<br />- no battery actions -&gt; this is particularly annoying as you don&#039;t get warning when you run out of battery or also don&#039;t see if you are charging or not<br />- strangly: volume and display buttons work<br />- power button works sometimes (usually not)</p><p>I tried diffrent versions of xfce4-power-manager, upower, acpid - even from ceres - all don&#039;t work.</p><p>I don&#039;t actually understand why all this doesn&#039;t work? Anybody has a better idea what is missing in xfce4-power-manager?<br />All this does work on voidlinux (I haven&#039;t tried artix yet).</p></div></blockquote></div><p>It is disappointing, the Mate power manager is even worse.&#160; </p><p>You got all that to work on voidlinux? Maybe doublecheck packagelists and see if there&#039;s something extra that&#039;s helping it work right in the other distro? Version used in voidlinux?</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Thu, 07 Dec 2017 21:20:14 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6598#p6598</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=6596#p6596</link>
			<description><![CDATA[<p>I confirm all problems still persist in xfce on Devuan:<br />- no lid-based actions in xfce (only via acpi-script hack -&gt; but this still doesn&#039;t trigger anything power-related in the xfce gui)<br />- no battery actions -&gt; this is particularly annoying as you don&#039;t get warning when you run out of battery or also don&#039;t see if you are charging or not<br />- strangly: volume and display buttons work<br />- power button works sometimes (usually not)</p><p>I tried diffrent versions of xfce4-power-manager, upower, acpid - even from ceres - all don&#039;t work.</p><p>I don&#039;t actually understand why all this doesn&#039;t work? Anybody has a better idea what is missing in xfce4-power-manager?<br />All this does work on voidlinux (I haven&#039;t tried artix yet).</p>]]></description>
			<author><![CDATA[dummy@example.com (ulno)]]></author>
			<pubDate>Thu, 07 Dec 2017 20:15:12 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=6596#p6596</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=5579#p5579</link>
			<description><![CDATA[<p>Thanks Ralph, i&#039;ll keep messing with it, right now can&#039;t get the locker to work with it (i3lock) no matter what I do.</p><p>And doesn&#039;t look like there&#039;s a way to mod the XFCE power manager to run the proper commands, it offers close/lid options but they don&#039;t work. This is what&#039;s really needed IMO, but I guess the power manager would need to be modded and re-compiled.</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Mon, 16 Oct 2017 22:28:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=5579#p5579</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=5578#p5578</link>
			<description><![CDATA[<p>Ideally you should insert the locking program before the suspend action as otherwise it&#039;ll wake up unlocked until the locking starts. For example:</p><div class="codebox"><pre><code>if [  &quot;$3&quot; = &quot;close&quot; ] ; then
     DISPLAY=:0 su -c &quot;xtrlock -b&quot; ralph &amp;
     /usr/bin/obsession-exit -s
fi</code></pre></div><p>Note also that (afaik) the lid button script is run by <span class="bbu">acpid</span> as <span class="bbu">root</span> and not &quot;the DE user&quot;, so a sudo isn&#039;t needed, but some way to ensure GUI access is. The added command line above includes the two parts of making the locking program (<span class="bbu">xtrlock</span>) have the right <span class="bbu">$DISPLAY</span> set up, and (via <span class="bbu">su</span>) be the right user (for my laptop).</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Mon, 16 Oct 2017 22:13:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=5578#p5578</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=5577#p5577</link>
			<description><![CDATA[<p>Just a quick update. The above method worked for me, but I used obsession-exit to suspend since it&#039;s already on my systems, bonus: didn&#039;t have to give sudo privilege to user to do it this way.</p><div class="codebox"><pre><code>#!/bin/bash

if [  &quot;$3&quot; = &quot;close&quot; ] ; then
     /usr/bin/obsession-exit -s
fi</code></pre></div><p>I imagine you can just add &quot;&#160; &amp;&amp; [lock program or command] &quot; to that command and it will lock as well?</p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Mon, 16 Oct 2017 21:58:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=5577#p5577</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=5574#p5574</link>
			<description><![CDATA[<p>I just had to use this again for a fresh install of Devuan and XFCE on a Thinkpad x220. It worked on this machine too. <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (quadcricket)]]></author>
			<pubDate>Mon, 16 Oct 2017 20:51:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=5574#p5574</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=4148#p4148</link>
			<description><![CDATA[<p>Will be trying this out on mine later, thanks for posting!</p><div class="quotebox"><cite>quadcricket wrote:</cite><blockquote><div><p>I was just posting to let everyone know that I did a fresh install on a Thinkpad T440 with xfce4 and it would not sleep on lid close. Using this thread and some searching I got it to work. </p><p>First was running visudo as root to allow my user to run pm-suspend</p><div class="codebox"><pre><code># username suspend permission
username ALL=NOPASSWD: /usr/sbin/pm-suspend</code></pre></div><p>then I created an acpi event by creating /etc/acpi/events/lid</p><div class="codebox"><pre><code>event=button/lid
action=/etc/acpi/actions/lid_suspend.sh %e</code></pre></div><p>(make sure to make it executable with &quot;chmod +x lid&quot;)</p><p>Finally I created the folder and file /etc/acpi/actions/lid_suspend.sh</p><div class="codebox"><pre><code>#!/bin/bash
if [  &quot;$3&quot; = &quot;close&quot; ] ; then
     /usr/sbin/pm-suspend
fi</code></pre></div><p>(chmod +x lid_suspend)</p><p>I did &quot;service restart acpid&quot; for good luck and it worked!</p><p>Thank you everyone for your help!</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Wed, 02 Aug 2017 19:01:47 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=4148#p4148</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=4143#p4143</link>
			<description><![CDATA[<p>I was just posting to let everyone know that I did a fresh install on a Thinkpad T440 with xfce4 and it would not sleep on lid close. Using this thread and some searching I got it to work. </p><p>First was running visudo as root to allow my user to run pm-suspend</p><div class="codebox"><pre><code># username suspend permission
username ALL=NOPASSWD: /usr/sbin/pm-suspend</code></pre></div><p>then I created an acpi event by creating /etc/acpi/events/lid</p><div class="codebox"><pre><code>event=button/lid
action=/etc/acpi/actions/lid_suspend.sh %e</code></pre></div><p>(make sure to make it executable with &quot;chmod +x lid&quot;)</p><p>Finally I created the folder and file /etc/acpi/actions/lid_suspend.sh</p><div class="codebox"><pre><code>#!/bin/bash
if [  &quot;$3&quot; = &quot;close&quot; ] ; then
     /usr/sbin/pm-suspend
fi</code></pre></div><p>(chmod +x lid_suspend)</p><p>I did &quot;service acpid restart&quot; as root for good luck and it worked!</p><p>Thank you everyone for your help!</p>]]></description>
			<author><![CDATA[dummy@example.com (quadcricket)]]></author>
			<pubDate>Wed, 02 Aug 2017 07:05:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=4143#p4143</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=3306#p3306</link>
			<description><![CDATA[<p>I&#039;ll be gone for the next week, but I shall return and reinvigorate this dying thread. By July 24th, you&#039;ll hear from me again, hopefully with a report of success. I will not allow this thread to be left abandoned.</p>]]></description>
			<author><![CDATA[dummy@example.com (Adhil)]]></author>
			<pubDate>Wed, 12 Jul 2017 16:11:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=3306#p3306</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=3083#p3083</link>
			<description><![CDATA[<p>I&#039;m afraid I overlooked the importance of having a working event declaration file in /etc/acpi/events. Mine is:</p><div class="codebox"><pre><code>event=button[ /]lid
action=/etc/acpi/lidbtn-suspend.sh %e</code></pre></div><p> and my script is named accordingly.</p><p>Especially the <span class="bbu">%e</span> on the invoked command is important; it gets replaced with the triggering input line from <span class="bbu">acpid</span></p><div class="quotebox"><blockquote><div><p>button/lid LID close<br /><em>or</em><br />button/lid LID open<br /><em>or</em><br /><em>any other acpid event lines</em></p></div></blockquote></div><p>and it thus gives three arguments to the script, the third of which is the lid action. The script I suggested peeps a those, and requires the third to be <span class="bbu">close</span> in order to suspend.</p><p>Note that your alternative pattern lines are all ok, I think, in the sense of matching the event line. An observation though (irrelevant as it is), since the pattern is a regular expression, an ending of <span class="bbu">d*</span> says that there must be zero or more <span class="bbu">d</span> at that match point. I guess you intended it to be <span class="bbu">d.*</span> (saying &quot;a <span class="bbu">d</span> followed by whatever&quot;). But &quot;followed by whatever&quot; is implied unless there is a <span class="bbu">$</span> at the end.</p><p>Hopefully that can make it work for you.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sun, 02 Jul 2017 23:10:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=3083#p3083</guid>
		</item>
		<item>
			<title><![CDATA[Re: Issues with Laptop Lid Suspend/Hibernate and Panel Plugins]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2758#p2758</link>
			<description><![CDATA[<p>Is it a fix if I&#039;ve changed the lid.sh script as ralph suggested, rebooted, attempted restarting acpi daemons, and still to no avail? I don&#039;t mean this in a snide way either, I&#039;m just stating I&#039;ve tried the code ralph ronnquist volunteered to provide to no effect. I forgot to mention in the initial post that suspend works when run from the terminal, but not using the pm-suspend command. I do have pm-utils installed (by default during Devuan&#039;s installation); however, pm-suspend does not work unless you are the root user as per my terminal:</p><div class="codebox"><pre><code>InsertUsernameHere@HostMachine:~$ /usr/sbin/pm-suspend
This utility may only be run by the root user.</code></pre></div><p>Only typing suspend or clicking Log Out and manually selecting Suspend works, and intermittently at that! As I write this now, typing suspend just hangs in the terminal. Logging into a root terminal, I found pm-suspend command to work flawlessly regardless. This has me stymied. </p><p>Perhaps adding pm-suspend to my sudoers.d file and prefixing the command with sudo might work? My other thought was with <strong>changing lm_lid from this:<br /></strong></p><div class="codebox"><pre><code>event=button/lid.*
action=/etc/acpi/lid.sh</code></pre></div><p><strong>To this:</strong></p><div class="codebox"><pre><code>event=button[ /]lid.*
action=/etc/acpi/lid.sh</code></pre></div><p>Anyone who can help to solve this will be greatly lauded by the community, especially me. I&#039;m going to keep working on this when I have time; until then, I encourage others to post their suggestions and potential solutions for the community.</p><p><span class="bbu">P.S.</span> <strong>Thanks for weighing in Green Jeans, its nice to know others are experiencing the same frustrations; the more prominent an issue this becomes, the greater attention that will be garnered from developers like you, thank you!</strong></p>]]></description>
			<author><![CDATA[dummy@example.com (Adhil)]]></author>
			<pubDate>Sun, 02 Jul 2017 17:12:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2758#p2758</guid>
		</item>
	</channel>
</rss>
