Is it possible to somehow configure xorg to ignore the first mouse click when screen blanking is enabled ??

The reason is I have a touch screen in an embedded arch linux application which remains active during screen blanking, and the first touch of a user should disable screen blanking and the click / touch event itself needs to be ignored as the user has no idea what button they are pressing since the screen is blank ?

Or any clever hack / work around methods ??

3 Answers 3


I know this a old question, but i had the same problem and finally solved it by using xssstart and modifying slock which is a screen locker. I called it clicklock


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


Xorg does not support such a configuration.

Another problem by using a 'hack' would be, that Xorg can expose the state that its blanked out but does not have to.

Do you really need the xorg blankout? If not, it can be disabled via xset s off.

Have you tried to use DPMS? This is the native power saving of the monitor. This may not be an option since you are using a touch device, but maybe its worth a try :-)

If you are not bound to use Xorgs blanking, why not use another screensaver daemon?


I had the same problem and found this discussion.

My solution for X11 (matchbox window manager) with qt5 is as follows.

I optionally do not switch off the display completely but reduce the brightness instead. But I still want to avoid that the first click goes to the application, because the dimmed display is somewhat dark and the user might not have seen what he touched.

First, I have a script which waits for a touch screen event for a certain time (the same time as for the screensaver). If the time elapses, the brightness of the display is reduced and an animation is started which exits if someone pressed on the touch screen. If that application exits, the brightness is set to the original value.

Second, the animation application is a Qt5 QuickScript Qml application.

First: the script which runs in background:


while [ 1 ]; do
  read -t $timeout -n 1 < $device

  if [ $notread == 0 ]; then
     echo $brightness >  /sys/class/backlight/pwm-backlight/brightness
     echo nobody has touched the screen, set screen more dark
     echo $darkness >  /sys/class/backlight/pwm-backlight/brightness
     /usr/bin/qt5/qml /usr/local/bin/darkshow.qml

Second - the script darkshow.qml:

 import QtQuick 2.2
 import QtQuick.Window 2.1

 Item {

 Window  { id: mainwindows
    width: 1024
    height: 600
    visible: true
    visibility: Window.Maximized
    opacity: 0.5

    modality: Qt.ApplicationModal
    // if it should stay on top:   flags: Qt.SplashScreen

    MouseArea {
        onClicked: Qt.quit();
        anchors.fill: parent

    onActiveChanged: {
         if (active == 0) Qt.quit();

 AnimatedSprite {
        id: sprite
        width: 1024
        height: 600
        anchors.centerIn: parent
        source: "content/awibuben_spritesheet.png"
        frameCount: 5
        frameSync: true
        frameWidth: 1024
        frameHeight: 600

You must log in to answer this question.