mb1986 / rm-hacks

Small improvements and tweaks for rM devices, covering both rM1 and rM2.
Other
546 stars 9 forks source link

Wake tablet from sleep when writing #387

Closed IEEEPaulGerhard closed 4 weeks ago

IEEEPaulGerhard commented 2 months ago

To wake the tablet from sleep, we need to press the power button

I often find myself trying to write only to realise that the table is sleeping (especially as I don't have a screen for sleep, only stay on the current document and have Zzzz in the top right corner

I'd like a new feature where when the tablet is in sleep mode, it detects that I am trying to write (first contact) and wakes up the tablet

irqequirecoffee commented 2 months ago

I think that defeats the purpose of sleep mode. Why don't you adjust the go to sleep setting to a higher timeout?

Eeems commented 2 months ago

Having the Wacom layer powered while suspended would require kernel changes, which I would not recommend including in scope of this project.

It would also not accomplish the power savings that suspending is meant to accomplish.

IEEEPaulGerhard commented 2 months ago

Completly understood Eeems thanks for the constructive and explanatory comment. The tablet layer is inactive on sleep and thus unresponsive to pen input.

I'm assuming the tablet would also not be responsive to press of the button...

IEEEPaulGerhard commented 2 months ago

sorry I realised I asked a question before closing the issue...

Eeems commented 2 months ago

Completly understood Eeems thanks for the constructive and explanatory comment. The tablet layer is inactive on sleep and thus unresponsive to pen input.

I'm assuming the tablet would also not be responsive to press of the button...

You can find out more information on the different sleep states that linux provides here: https://www.kernel.org/doc/html/v4.18/admin-guide/pm/sleep-states.html

The reMarkable uses "Suspend-to-RAM" for full suspend. I haven't looked to confirm, but I believe that light sleep uses "Standby". Both of these states put all I/O devices into low-power states, and allows the device to resume from any interrupt caused by a device.

The power button would cause an interrupt to happen and wake the device, as it's low power state is the same as it's active state, as power is only consumed when a button is pressed and now there is an active electrical connection where there was previously no connection.

The low power state for the wacom layer would not trigger an interrupt when the pen is over the device, as it's not active, so no pen activity can be detected.