0

I need to run a set of (graphical) benchmarks with the screen disabled. The following command did not work:

xset dpms force off

Because any keyboard/mouse input would re-enable the screen. The other option was the following:

xrandr --output eDP-1 --off

This turns off the screen for a second, then, causes the following segmentation fault:

gnome-shell[25737]: segfault at 8 ip 00007f3d02ef9210 sp 00007ffeee4e1fd8 error 4 in libmutter-2.so.0.0.0[7f3d02e99000+156000]

How can the problem be solved? Is there any other user/kernel level alternative?


UPDATE:

The output for xinput --list is shown below:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=15   [slave  pointer  (2)]
⎜   ↳ USBest Technology SiS HID Touch Controller    id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Asus Wireless Radio Control               id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Video Bus                                 id=9    [slave  keyboard (3)]
    ↳ Sleep Button                              id=10   [slave  keyboard (3)]
    ↳ USB2.0 HD UVC WebCam: USB2.0 HD           id=12   [slave  keyboard (3)]
    ↳ Asus WMI hotkeys                          id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]

P.S.: This question is also asked in the Unix StackExchange Website and Xorg Mailing List.

TheAhmad
  • 101

1 Answers1

1

You can disable mouse and keyboard input using xinput --list to list the input devices by name and id, then using xinput --disable device-or-id for each of the real mouse and keyboard devices. To reverse use --enable.

Alternatively, you can use sudo evtest --grab /dev/input/eventN & where N is the number of the input device. The grab lasts until the process is interrupted.


Another thing to try is setting the screen to stay on in the Xserver, then use ddccontrol to talk directly to the monitor over the DDC I2C bus. If the monitor is recognised, you can give a command to turn it off. Presumably, the Xserver will not try to turn it on if it assumes it is still on.

meuh
  • 6,624