<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hack It Yourself (Posts about ubuntu)</title><link>https://hiy.netlify.app/</link><description></description><atom:link href="https://hiy.netlify.app/categories/ubuntu.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:non@existent.com"&gt;author&lt;/a&gt; </copyright><lastBuildDate>Mon, 26 Jan 2026 01:30:25 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Mysterious suspend when no user is logged in, Ubuntu 24.04</title><link>https://hiy.netlify.app/posts/troubleshooting-ubuntu-mysterious-suspend.html</link><dc:creator>author</dc:creator><description>&lt;p&gt;My Ubuntu 24.04 LTS server strangely suspends itself after 20 min. However, if I
log in via Anydesk, then it stays on even if I minimize the Anydesk window and
do not touch it for hours (it would enter into screensaver mode). If I log out
my user and close Anydesk, it would auto suspend again. I've checked the
following:&lt;/p&gt;
&lt;p&gt;1) Disabled sleep / suspend / hibernation related settings in the Power settings
in LxQT.&lt;/p&gt;
&lt;p&gt;2) Checked from terminal: &lt;code&gt;gsettings list-recursively
org.gnome.settings-daemon.plugins.power&lt;/code&gt; &lt;a href="https://pastebin.com/rAtWvAet"&gt;output&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3) Explicitly set relevant settings to &lt;code&gt;ignore&lt;/code&gt; in &lt;code&gt;/etc/systemd/logind.conf&lt;/code&gt;
&lt;a href="https://pastebin.com/e1EDTvc5"&gt;logind.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4) Nothing out of the ordinary in &lt;code&gt;systemctl list-timers&lt;/code&gt;
&lt;a href="https://pastebin.com/STjf7dtT"&gt;output&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;5) Nothing unusual when I followed the systemctl log &lt;code&gt;journalctl -f&lt;/code&gt;. You can
see the message `The system will suspend now! &lt;a href="https://pastebin.com/vy7twv8H"&gt;log
file&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; With the help of ChatGPT and Gemini, the problem is solved!&lt;/p&gt;
&lt;p&gt;1) &lt;code&gt;sudo systemctl mask sleep.target suspend.target hibernate.target
   hybrid-sleep.target&lt;/code&gt; blocks the suspend operation, even though the underlying
   cause is not identified.&lt;/p&gt;
&lt;p&gt;2) Open an override file for the &lt;code&gt;systemd-logind&lt;/code&gt; service: &lt;code&gt;sudo systemctl edit
   systemd-logind.service&lt;/code&gt; and add the following to enable debug logging&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;Environment&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;SYSTEMD_LOG_LEVEL=debug&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;followed by &lt;code&gt;sudo systemctl restart systemd-logind.service&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, use &lt;code&gt;busctl monitor org.freedesktop.login1&lt;/code&gt; to monitor requests
for Suspend.&lt;/p&gt;
&lt;p&gt;3) (2) will produce a line before "The system will suspend now!" in the log
   file. &lt;code&gt;journalctl -b -1 | grep 'system will suspend now' -A 10 -B 10&lt;/code&gt; gives&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nx"&gt;Aug&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;44&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;MACHINE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;systemd&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;logind&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1004&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Got&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;method_call&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;=:&lt;/span&gt;&lt;span class="m m-Double"&gt;1.67&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;=:&lt;/span&gt;&lt;span class="m m-Double"&gt;1.1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;org&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;freedesktop&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;login1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;interface&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;org&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;freedesktop&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;login1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Manager&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;member&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;Suspend&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;99&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;reply_cookie&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;signature&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;4) &lt;code&gt;busctl --system list | grep ':1.67'&lt;/code&gt; or &lt;code&gt;busctl --user list | grep ':1.67'&lt;/code&gt;
   reveals that it's &lt;code&gt;/usr/lib/unity-settings-daemon/unity-settings-daemon&lt;/code&gt; that
   have been calling &lt;code&gt;org.freedesktop.login1.Manager.Suspend()&lt;/code&gt;. Uninstalling
   &lt;code&gt;unity-settings-daemon&lt;/code&gt; eliminated the problem!&lt;/p&gt;
&lt;p&gt;5) (1) is important because otherwise I will have to do (4) after a reboot. By
   that time, the D-Bus sender addresses (e.g., &lt;code&gt;:1.67&lt;/code&gt;) will point to a
   different process.&lt;/p&gt;</description><category>home-lab</category><category>linux</category><category>ubuntu</category><guid>https://hiy.netlify.app/posts/troubleshooting-ubuntu-mysterious-suspend.html</guid><pubDate>Fri, 08 Aug 2025 03:19:28 GMT</pubDate></item></channel></rss>