<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/"/>

<title>Jeff Epler's blog</title>
<modified>2019-04-07T20:42:29Z</modified>
<tagline>Photos, electronics, cnc, and more</tagline>
<author><name>Jeff Epler</name><email>jepler@unpythonic.net</email></author>
<entry>
<title>Linux: don't wake display on mouse motion</title>
<issued>2019-04-07T20:42:29Z</issued>
<modified>2019-04-07T20:42:29Z</modified>
<id>https://emergent.unpythonic.net/01554669749</id>
<link rel="alternate" type="text/html" href="https://emergent.unpythonic.net/01554669749"/>
<content type="text/html" mode="escaped">

I have one machine which repeatedly wakes its display at night.  My assumption is that this is due to spurious movement from the mouse.

&lt;p&gt;There is not an explicit way to configure Linux (X11) so that it doesn't exit DPMS sleeps on mouse movement, but I found a tip on the internet to disable the mouse device at the XInput level when activating the screensaver, and reactivating it when the screensaver exits.

&lt;p&gt;I don't run a &amp;quot;screensaver application&amp;quot; so wiring into things like dbus for notification doesn't work.  Instead, I wrote an X program which polls the requested DPMS state and enables or disables the mouse device accordingly.

&lt;p&gt;It remains to be seen whether this solves the problem which causes the display
to turn on multiple times per night, but it might just fix it.

&lt;p&gt;You'll need to customize the program by changing the &amp;quot;device_name&amp;quot; string in the source to match your own input device.  If you have multiple input devices, then more extensive work will be required.

&lt;p&gt;License: GPL v3+
&lt;p&gt;&lt;b&gt;Files currently attached to this page:&lt;/b&gt;
&lt;table cellpadding=5 style=&quot;width:auto!important; clear:none!important&quot;&gt;&lt;col&gt;&lt;col style=&quot;text-align: right&quot;&gt;&lt;tr bgcolor=#eeeeee&gt;&lt;td&gt;&lt;a href=&quot;https://media.unpythonic.net/emergent-files/01554669749/nobump.c&quot;&gt;nobump.c&lt;/a&gt;&lt;/td&gt;&lt;td&gt;2.0kB&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;
</content>
</entry>
</feed>
