My multiple posts in various forums (for instance, see
http://www.linuxquestions.org/questi...m7250n-782813/) turned up nothing on the question of how to get my HP Media Center desktop (ASUS P5LP motherboard) to avoid hanging after a period of inactivity. So I'm wondering whether it might be possible to write a C program that every once in a while effectively fools the OS into believing that a keyboard or mouse interrupt has occurred. That way, I can achieve my goal of being able to leave the computer for long periods of time without finding it hung up on my return.
If possible, generation of such an interrupt would be contingent on a certain amount of time having passed since the last interrupt (real or faked) occurred, and the generated event would be innocuous, such as notification that the mouse has moved (0,0) relative to its previous position, or that the <Shift> key was depressed and then released.
I guess I'm thinking of something along the lines of:
Code:
void onPeriodic(){
if (timeInSecSinceLastInputPeripheralActivity() > MAX_INACTIVITY_SECS)
spoofInputPeripheralActivity(); /* Avoid ACPI suspend */
}
Is it possible to do this (or something like this, that has the desired effect of avoiding suspend) in software?
Sorry for my ignorance on ACPI, Linux interrupts, &cet.