I'm trying to make a screensaver feature (or screen blanking) from user request that allows the screen to go blank and wakeup via user touch input. The problem I'm having is trying to handle the first "click" event on wakeup, as this is an embedded panel pc device that only has a touch screen and users simply don't know where they are tapping when the screen is off (which means that users can cancel and tap things they don't intend to).

I see there is an existing question Xorg - ignore first click event when resuming from Screen Blanking that was asked about 3 years ago that I'm wondering if there are any updates to. I've played around with xset enabling dpms, setting various timeouts, screen blanking, but everything ends up in the first touch event immediately triggering the button below where the user clicks.

I'm using Poky 1.8 (Fido), Kernel 3.19.5 and have complete access to source code if anyone knows any way to handle these events in C++. The program does not have a lock screen, and is running as root. I'm working on building XScreensaver just to see if this would help, or if this is just a lost cause.

2 Answers 2


I had the same problem (also using yocto fido). I couldn't use the proposed answer because i didn't manage to build xscreensaver (has way to many dependencies)

I finally solved it by using xssstart and modifying slock which is a screen locker. I called it clicklock


I also made a fork of xssstart with autotools build files for easy cross-compilation (just use inherit autotools in the recipe): https://github.com/zpfvo/xssstart

xssstart runs a command as soon as the screensaver gets enabled and clicklock is just a black fullscreen window which closes after the first touch or key event.

So you have to run xssstart clicklock


This is a rather old question. However I won't be the last one struggling to solve this.

In short: I've found a solution.

I'm running chromium in kiosk mode with fluxbox as WM. Instead of relying on Xorg to put the screen to sleep I'm using xscreensaver with blanking only.

This enables me to listen for state changes of the screen with a small perl script. http://pastebin.com/uwFsvG87

This script switches to another (empty) virtual desktop using wmctrl when the screen blanks and switches back on unblank (with 100ms delay).

To make this invisible to the user, I've disabled the fluxbox toolbar and set a completely black background.

It works very well. :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .