Tuesday, 3 April 2012


So i've mostly just been using my kobo for reading lately (not a lot, but i'm usually so tired I cna barely go 5 pages before i fall asleep) - and it's crappy software is giving me the shits, particularly when reading text files. I'm not sure I could do much better, but at least I could try ...

It even got me riled up enough to have another go at working out suspend: but again I had no luck. I just can't tell how it's going into suspend mode. If I could work out that I would have enough to keep me happy and I would do some more work on ReaderZ.

But without it i'm just stuck and it just pisses me off.

Update So it occurred to me later that the problem might be more related to the wifi adaptor since I'm always doing this stuff from telnet. If I try to suspend using /sys/ it never recovers and I need to reset the machine.


Anonymous said...

i think i have worked out suspend
echo 1 > /sys/power/state-extended //turns of neonode touchscreen
echo mem > /sys/power/
then after resume
echo 0 /sys/power/state-extended
found this file after looking at strace of nickel
open("/sys/power/state-extended", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
864] dup2(3, 1) //copy filehandle
write(1, "1\n", 2) = 2
execve("/bin/sh", ["sh", "-c", "echo mem > /sys/power/state"]

from kobolabs source /KoboLabs/hw/imx508/cls/linux-

static ssize_t state_extended_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t n)
if ( buf[0] == '1' )
neonode_activate(0); disable_irq_wake(get_homekey_irq());

}else if(g_sys_full_suspend_state)

I have tried the above it seems to work
but have not fully tested by looking at battery level after while.

I looked at your readerz and hacked up your einkfb.c but i can't seem to refresh (ie get rid of ghosts)the screen partial updates work but UPDATE_MODE_FULL doesn't seem to refresh. I have tried various combinations of MXCFB_SET_AUTO_UPDATE_MODE and MXCFB_SET_UPDATE_SCHEME and even not doing any init and just mapping the framebuffer no luck.


NotZed said...

Cool thanks. I will have to try it next time I play with it, if I can get it to suspend I might look at the code again.

It's been a while since I looked at this, so off the top of my head i'm not sure why the eink stuff wont update properly. I do remember now that some settings that just don't work, e.g. with the update mode/update scheme.

The java application does a bit more than what's in einkfb.c, so you'd have to reference that too.

One thing I remembered from reviewing the code is that you need to use update_invert to get it to clear out the old stuff, and I think you also need to then update it again without invert set. And when you do this you need to wait till it's complete, otherwise changing the framebuffer bits while it's busy will leave artefacts. e.g. see EInkFB.java:main.

NotZed said...

had a look at the suspend thing. I got it to sort of work.

As i'm telnetting in the wifi is running, and i had to rmmod the wifi module(s) first.

I can get it to suspend-resume-suspend-resume, but at that point I get no input events anymore.

I'm closing/opening /dev/input/eventx around the suspend/resume.