|
From: Chris B. <ch...@cn...> - 2013-03-25 17:36:43
|
On Mon, Mar 25, 2013 at 11:28 AM, Jason Gerecke <kil...@gm...>wrote: > On Sun, Mar 24, 2013 at 7:59 PM, Chris Bagwell <ch...@cn...>wrote: > >> On Sun, Mar 17, 2013 at 11:56 AM, Tamas Papp <tk...@gm...> wrote: >> >>> Hi, >>> >>> I have a Wacom Bamboo (CTH-470) which I am using with a wireless module, >>> with Debian. If I am not using the tablet for a while, it goes to >>> sleep, which does not play well with xournal. Is there a way I can >>> control the sleep timeout, eg with xsetwacom? >>> >> >> Short answer is no; there is such option. >> >> Longer answer is it should be possible to enhance the Linux driver to >> adjust the sleep timer if someone was motivated enough. Its been almost a >> year since I looked but I recall the Windows driver exposing a setting for >> this. Same issue will exist for Intuos5 which shares same wireless module. >> >> I'd have to research again but it seemed iffy feature to implement at the >> time. Maybe something like you could adjust between 1 and 5 minutes and >> that didn't seem wide enough range to me. Maybe an on/off setting would be >> useful though. >> >> Anyone else on the list find the sleep timeout to short or to long? >> >> Chris >> >> > It looks like power-saving for the wireless module has a few > implementation details that we'd want to be careful about exposing. For > instance, the sleep timeout can be reliably set to any value from 5-60 > minutes. Above that, and sleep mode is disabled; below that, and sleep mode > is reset to the hardware default of 15 minutes. > Ah, both 5 or 15 minutes are an extremely long time and I guess I was thinking most people would want an on/off contoller before tweaking those values to much. > If a userspace program is unaware of this, it could inadvertently run into > either of these cases while setting a timeout. When reading the current > timeout, if the tablet happily reports numbers outside the 5-60 range then > the kernel would need to adjust the value to match reality. > > For the 5-60 range validation part, I most often see a sysfs item that is read-only and exposes either a list of all valid possible values or 2 read only files that list min and max range. Something like: /sys/*/wacom/sleep_timer <--- read/write to both control and see current value /sys/*/wacom/sleep_timer_min <--- read only - 5 /sys/*/wacom/sleep_timer_max <--- read only - 60 So that way we can support hardware with different ranges if they come to exist and also gracefully ignore writes to sleep_timer with values below 5. For the sleep timer OFF feature (values above 60), I'd expose that to user different then hardware does it and ignore writes to sleep_timer above max level as well. I'd instead create a /sys/*/wacom/sleep file with valid values of 0/1. Some sysfs do use magic values such as saying sleep_max value means OFF but I think a seperate controler would be more self documenting. Chris |