Is there a command in Ubuntu to determine when the mouse was moved last? The screensaver clearly knows, but how can I access that data from the terminal?
Screensavers do their own polling for mouse movement (position change) or clicking. See the XScreensaver FAQ number 10 which states exactly that behaviour. And as Jamie Zawinski — the author of XScreensaver states in this bug report, the position is only checked every 5 seconds.