Computer idle settings and button input

Home Forums AR Sandbox Forum Computer idle settings and button input

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #103054


    I’ve currently built a sandbox which is working great, and is going to be placed as an exhibition piece at our local library. Because the Sandbox will be there long term we’re looking to save as much of the projectors bulb life as possible.

    The setup we imagine is every 2 or so hours, if none of the arcade buttons are pressed (we have 4 currently: rain, drain, lava, water), the computer will go idle and suspend until a button is pressed to wake up the computer. While idle the projector will go into bulb saving mode until input is received again.

    We currently have two problems with this, the first is that linux won’t go into idle or sleep due to the sandbox being fullscreen / being read as constant input.

    The second problem is that while the arcade buttons we are using work with the sandbox(Bus 001 Device 021: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad) they don’t give any input to linux and therefore can’t be used to wake up the machine if it goes idle.

    So we need a way to make sure the computer always goes to sleep unless there’s input, and we need the input to be caused by the buttons.

    Any help would be appreciated,

    Thank you!

    Oliver Kreylos

    Tough problem. You could run shutdown --halt +120 when starting the sandbox to schedule system suspension two hours later. Then you’d modify the sandbox tool code to call shutdown -c to cancel the scheduled shutdown, and shutdown --halt +120 to schedule another one two hours later, whenever a button is pressed. That will keep the shutdown two hours ahead of any tool activity.

    Instead of modifying the sandbox code, you could write a script that reads directly from the button controller’s device file (just like the sandbox does), and executes above sequence when there is new input. A second reader on the same device file shouldn’t interfere with sandbox operation, but I haven’t tried this.

    To wake the computer back up, you could use an extra “wake-up” button that acts like a USB keyboard (those are a dime a dozen), and set your computer’s BIOS to wake up on keyboard activity.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comments are closed.