Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2020, 02:08 PM   #1
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
com.lab126 command for invert black and white screen

there is a "new" funcation of pw4 ko2 ko3: invert black and white in all screen,(background change to black, text color change to white)

is there a way to trigger this funcation by "com.lab126" command?

I searched all printting of "lipc-probe -l " and "lipc-probe -a ", have not found any Suspect command for invert black and white screen.

is that possible to trigger "invert black and white screen" in command line?thanks!
kdusr is offline   Reply With Quote
Old 02-09-2020, 02:14 PM   #2
mergen3107
Wizard
mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.mergen3107 ought to be getting tired of karma fortunes by now.
 
mergen3107's Avatar
 
Posts: 1,060
Karma: 3000026
Join Date: Feb 2012
Location: Cape Canaveral
Device: Kindle Scribe
Maybe it is a part of eips command?
You can try to see logs via “showlog -f”, then turn on the inverted mode in settings and see what commands are being called.
mergen3107 is offline   Reply With Quote
Advert
Old 02-09-2020, 02:29 PM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
It's probably handled via awesome's ligl stuff, which is... not for the faint of heart.

Also, probably minified/obfuscated on production builds, so, might have to dig in a recent-enough factory image.

----

For custom content, fbink -H -s will do the job, on a per-refresh basis. (Depending on what's on screen and whether you want a flash, you'll also want to manually select one of the three dedicated nightmode waveform modes).
NiLuJe is offline   Reply With Quote
Old 02-11-2020, 05:28 AM   #4
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
thanks Mergen3107, NiLuJe,
did a little bit research, but I have not found clue...
kdusr is offline   Reply With Quote
Old 03-27-2020, 12:30 AM   #5
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
in /usr/sbin/shipping_mode

i came across this tidbit:

Code:
# Disable the Nightmode if the Nightmode is enabled
if [ "$(devcap-get-feature -a nightmode)" -eq "1" ]; then
    epdcMode=$(lipc-get-prop com.lab126.winmgr epdcMode)
    if [ "$epdcMode" = "Y8INV" ]; then
        lipc-set-prop com.lab126.winmgr epdcMode Y8
        epdcMode=$(lipc-get-prop com.lab126.winmgr epdcMode)
        if [ "$epdcMode" != "Y8" ]; then
            logger -t system -- "Failed to disable the Nightmode before shipping mode"
        fi
    fi
fi
I dont have a PW4 so i cant try it but
Code:
lipc-set-prop com.lab126.winmgr epdcMode Y8INV
should turn on Nightmode and
Code:
lipc-set-prop com.lab126.winmgr epdcMode Y8
should turn it off.


someone please let me know if this works.
yparitcher is offline   Reply With Quote
Advert
Old 03-27-2020, 12:55 AM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I naively read that as simply swapping the epdc to the inverted palette like the K4, which simply involves an ioctl to set the fb's vinfo grayscale field to 2 (GRAYSCALE_8BIT_INVERTED), but I don't have the device either .

(The ioctl approach *should* work everywhere, though, but I don't remember testing this all that much.
[EDIT: Even works properly on a Kobo, where the fb cmap is completely bogus]
[EDIT²: Which makes sense, as it turns out that in this case, the epdc driver simply enforces the EPDC_FLAG_ENABLE_INVERSION flag ]
TL;DR: Which means that, yes, this (ioctl) will enable the bare-minimum HW nightmode automagically everywhere without having to handle it on a per-refresh basis. No fancy waveform modes or fl trickery, though (unless ligl bases its decisions on checking the grayscale flag's value).).

EDIT: On the other hand, on Zelda/Rex, there *is* an MXCFB_SET_NIGHTMODE ioctl. I'm not *quite* sure how it's supposed to work (especially since it doesn't appear to have anything to do with the mxcfb_nightmode_ctrl struct, which appears to be handled by the fl driver, on Zelda, at least). And it also doesn't appear to be plugged into anything in the driver code?
I do have strace builds around for Zelda/Rex if someone's curious (the one shipped w/ USBNet will prooobably segfault on Zelda/Rex).

Last edited by NiLuJe; 03-27-2020 at 01:25 AM.
NiLuJe is offline   Reply With Quote
Old 03-27-2020, 01:27 PM   #7
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
i have a KT4, so the strace for rex would be useful.

on a side note how far back does the devcap-get-feature command go? as it is a good way to do feature detection. screen size/fl/nightmode etc. it reports correctly that i dont have nightmode on my KT4.
yparitcher is offline   Reply With Quote
Old 03-27-2020, 02:49 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
FWIW, I just added a -H, --nightmode flag to fbdepth to play with this. (EDIT: And fbgrab -v will output all you'll ever need to know about the fb state, including the grayscale flag. eips can do something similar, IIRC, but I never remember the syntax).

(I, err, never actually tried fbdepth on a Kindle, but I *should* have hidden the NTX quirks behind ifdefs ).

Every Kindle since the K5 (and the K4, technically ) will support the actual PxP inversion this requests (by which I mean to say that the only things missing on the KT4 are the fancy waveform modes and the fl shenanigans).

EDIT: This now ships as part of USBnet .

@yparitcher: strace for Rex & Zelda. (For eInk stuff, you'll want to strace awesome on FW 5.x, and cvm on older devices. I usually go with strace -fittv -e trace=ioctl -p $(pidof awesome)).

I don't rightly recall when the devcap stuff was added, but I would assume anything running FW 5.x should be fair game .

Last edited by NiLuJe; 04-10-2020 at 05:44 PM. Reason: Updated strace builds
NiLuJe is offline   Reply With Quote
Old 03-27-2020, 03:23 PM   #9
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
Quote:
Originally Posted by NiLuJe View Post
FWIW, I just added a -H, --nightmode flag to fbdepth to play with this. (EDIT: And fbgrab -v will output all you'll ever need to know about the fb state, including the grayscale flag. eips can do something similar, IIRC, but I never remember the syntax).

(I, err, never actually tried fbdepth on a Kindle, but I *should* have hidden the NTX quirks behind ifdefs ).

Every Kindle since the K5 (and the K4, technically ) will support the actual PxP inversion this requests (by which I mean to say that the only things missing on the KT4 are the fancy waveform modes and the fl shenanigans).

@yparitcher: strace for Rex & Zelda. (For eInk stuff, you'll want to strace awesome on FW 5.x, and cvm on older devices. I usually go with strace -fittv -e trace=ioctl -p $(pidof awesome)).

I don't rightly recall when the devcap stuff was added, but I would assume anything running FW 5.x should be fair game .
Thanks
yparitcher is offline   Reply With Quote
Old 03-27-2020, 05:58 PM   #10
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
when i run

Code:
lipc-set-prop com.lab126.winmgr epdcMode Y8INV
strace shows
Code:
[pid  3704] 16:40:28.676711 [76937bdc] ioctl(19, FBIOGET_VSCREENINFO, 0x7e90e5f8) = 0
[pid  3704] 16:40:28.680562 [76937bdc] ioctl(19, FBIOPUT_VSCREENINFO or PF_IOCTL_UNINIT, 0x7e90e5f8) = 0
strace: Process 21893 attached
[pid 21893] 16:40:28.750241 [76aa2228] --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x76aa2228} ---
[pid 21893] 16:40:28.801246 [????????] +++ exited with 0 +++
[pid  3704] 16:40:28.802288 [768d03cc] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21893, si_uid=0, si_status=0, si_utime=0, si_stime=3} ---
strace: Process 21894 attached
[pid 21894] 16:40:28.870378 [????????] +++ exited with 0 +++
[pid  3704] 16:40:28.871231 [768d03cc] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21894, si_uid=0, si_status=0, si_utime=1, si_stime=3} ---
[pid  4910] 16:40:28.916391 [76937bdc] ioctl(19, _IOC(_IOC_WRITE, 0x46, 0x2e, 0x50), 0x7608fc7c) = 0
[pid  4910] 16:40:29.318591 [76937bdc] ioctl(19, _IOC(_IOC_WRITE, 0x46, 0x2e, 0x50), 0x7608fc7c) = 0
[pid  4910] 16:40:29.323166 [76937bdc] ioctl(19, _IOC(_IOC_WRITE, 0x46, 0x2e, 0x50), 0x7608fc7c) = 0
[pid  4910] 16:40:29.336899 [76937bdc] ioctl(19, _IOC(_IOC_WRITE, 0x46, 0x2e, 0x50), 0x7608fc7c) = 0
and since HW nightmode does not actually work on my KT4 every time the screen updates, after the first update it just keeps on flashing white/black

with
Code:
strace -fittv -e trace=ioctl ./fbdepth -vH toggle
i get:
Code:
[FBInk] Detected a Kindle Basic 3 (10L -> 0x414 => Jaeger on Rex)
16:46:49.109301 [76e6abdc] ioctl(3, FBIOGET_VSCREENINFO, 0x23090) = 0
Variable fb info: 600x800 (608x10752), 8bpp @ rotation: 3 (Counter Clockwise, 270°)
16:46:49.114350 [76e6abdc] ioctl(3, FBIOGET_FSCREENINFO, 0x23138) = 0
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6537216 bytes & line length: 608 bytes

Current bitdepth is already 8bpp, but the grayscale flag is bogus!

Switching fb to 8bpp (current bitdepth) . . .
Setting bitdepth to 8bpp
Setting grayscale to 2
16:46:49.121415 [76e6abdc] ioctl(3, FBIOPUT_VSCREENINFO or PF_IOCTL_UNINIT, 0x23090) = 0
Bitdepth is now 8bpp (grayscale: 2) @ rotate: 3 (Counter Clockwise, 270°)

16:46:49.122738 [76e6abdc] ioctl(3, FBIOGET_VSCREENINFO, 0x23090) = 0
Variable fb info: 600x800 (608x10752), 8bpp @ rotation: 3 (Counter Clockwise, 270°)
16:46:49.123972 [76e6abdc] ioctl(3, FBIOGET_FSCREENINFO, 0x23138) = 0
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6537216 bytes & line length: 608 bytes
16:46:49.126350 [????????] +++ exited with 0 +++

btw when i try to compile FBInk utils with -flto i get errors
Code:
make CFLAGS=-flto KINDLE=1 CROSS_TC=~/x-tools/arm-kindlepw2-linux-gnueabi/bin/arm-kindlepw2-linux-gnueabi utils 
fatal: No names found, cannot describe anything.
mkdir -p Release/shared/cutef8 Release/static/cutef8 Release/shared/libunibreak/src Release/static/libunibreak/src Release/shared/qimagescale Release/static/qimagescale
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/bin/arm-kindlepw2-linux-gnueabi-gcc  -DNDEBUG -D_REENTRANT=1 -D_GNU_SOURCE -DFBINK_FOR_KINDLE -DFBINK_MINIMAL -flto -ftree-vectorize -funroll-loops -fno-common -Wall -Wextra -Wunused -Wformat=2 -Wformat-signedness -Wformat-truncation=1 -Wnull-dereference -Wuninitialized -Wno-maybe-uninitialized -Wduplicated-branches -Wduplicated-cond -Wundef -Wbad-function-cast -Wwrite-strings -Wjump-misses-init -Wlogical-op -Wstrict-prototypes -Wold-style-definition -Wshadow -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wcast-qual -Wcast-align -Wconversion -Wno-jump-misses-init    -Wl,--as-needed -L./Release -oRelease/rota utils/rota.c
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: /tmp/ccLgKxMp.ltrans0.ltrans.o: in function `font8x8_get_bitmap':
<artificial>:(.text+0xb18): undefined reference to `u8_cp_to_utf8'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: <artificial>:(.text+0xb3c): undefined reference to `u8_cp_to_utf8'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: /tmp/ccLgKxMp.ltrans0.ltrans.o: in function `draw':
<artificial>:(.text+0xd94): undefined reference to `u8_strlen2'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: <artificial>:(.text+0x1c46): undefined reference to `u8_cp_to_utf8'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: <artificial>:(.text+0x1c96): undefined reference to `u8_cp_to_utf8'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: <artificial>:(.text+0x30e4): undefined reference to `u8_nextchar2'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: /tmp/ccLgKxMp.ltrans0.ltrans.o: in function `fbink_print':
<artificial>:(.text+0x7be8): undefined reference to `u8_strlen2'
/home/user/x-tools/arm-kindlepw2-linux-gnueabi/lib/gcc/arm-kindlepw2-linux-gnueabi/7.5.0/../../../../arm-kindlepw2-linux-gnueabi/bin/ld.bfd: <artificial>:(.text+0x857e): undefined reference to `u8_nextchar2'
collect2: error: ld returned 1 exit status
make: *** [Makefile:525: utils] Error 1
but make KINDLE=1 CROSS_TC=~/x-tools/arm-kindlepw2-linux-gnueabi/bin/arm-kindlepw2-linux-gnueabi utils works
yparitcher is offline   Reply With Quote
Old 03-27-2020, 06:01 PM   #11
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
with fbdepth -H
the nightmode works, (no constant flashing)
yparitcher is offline   Reply With Quote
Old 03-27-2020, 06:14 PM   #12
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@yparitcher: That's... interesting.

I imagine the lipc stuff is doing something else that relates to ligl, then.

Can you check the output from fbgrab -v /dev/null before and after?
It's at least doing a PUT_VSCREENINFO, so I'd expect the same grayscale change as with fbdepth, but, who knows...

As for FBInk, the utils target will attempt to enable LTO on its own if that's not already the case. Having -flto in CFLAGS without the requisite -fuse-linker-plugins will probably break it ;p.
NiLuJe is offline   Reply With Quote
Old 03-27-2020, 06:21 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Sidebar: is that the right strace binary?

It doesn't appear to be decoding the MXCFB_SEND_UPDATES ioctl properly (that's supposed to be the _IOC(_IOC_WRITE, 0x46, 0x2e, ...) stuff), which is weird, since I could have sworn someone used it to send me nightmode dumps at one point...
(Might have been from a Zelda, though).

Remind me to do a fresh build to double-check .

EDIT: Done, links updated above.

Last edited by NiLuJe; 03-27-2020 at 06:57 PM.
NiLuJe is offline   Reply With Quote
Old 03-27-2020, 07:06 PM   #14
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
Quote:
Originally Posted by NiLuJe View Post
Sidebar: is that the right strace binary?

It doesn't appear to be decoding the MXCFB_SEND_UPDATES ioctl properly (that's supposed to be the _IOC(_IOC_WRITE, 0x46, 0x2e, ...) stuff), which is weird, since I could have sworn someone used it to send me nightmode dumps at one point...
(Might have been from a Zelda, though).

Remind me to do a fresh build to double-check .
i was using the system strace by mistake

Code:
[root@kindle tc]# ./strace -fittv -e trace=ioctl -p $(pidof awesome)
./strace: Process 3704 attached with 9 threads
[pid  3704] 17:47:18.713611 [76937bdc] ioctl(19, FBIOGET_VSCREENINFO, 0x7e90e5f8) = 0
[pid  3704] 17:47:18.716647 [76937bdc] ioctl(19, FBIOPUT_VSCREENINFO, 0x7e90e5f8) = 0
./strace: Process 25260 attached
[pid 25260] 17:47:18.782768 [76adc228] --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x76adc228} ---
[pid 25260] 17:47:18.835638 [????????] +++ exited with 0 +++
[pid  3704] 17:47:18.836463 [768d03cc] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=25260, si_uid=0, si_status=0, si_utime=1, si_stime=2} ---
./strace: Process 25261 attached
[pid 25261] 17:47:18.900744 [????????] +++ exited with 0 +++
[pid  3704] 17:47:18.901752 [768d03cc] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=25261, si_uid=0, si_status=0, si_utime=1, si_stime=5} ---
[pid  4910] 17:47:18.937798 [76937bdc] ioctl(19, MXCFB_SEND_UPDATE, {update_region={top=0, left=0, width=600, height=800}, waveform_mode=WAVEFORM_MODE_AUTO, update_mode=UPDATE_MODE_PARTIAL, update_marker=331, temp=TEMP_USE_AMBIENT, flags=0, dither_mode=EPDC_FLAG_USE_DITHERING_PASSTHROUGH, quant_bit=0, alt_buffer_data={phys_addr=0, width=0, height=0, alt_update_region={top=0, left=0, width=0, height=0}}, hist_bw_waveform_mode=WAVEFORM_MODE_DU, hist_gray_waveform_mode=WAVEFORM_MODE_GC16}, 0x7608fc7c) = 0
[pid  4910] 17:47:19.168755 [76937bdc] ioctl(19, MXCFB_SEND_UPDATE, {update_region={top=91, left=0, width=600, height=709}, waveform_mode=WAVEFORM_MODE_AUTO, update_mode=UPDATE_MODE_PARTIAL, update_marker=332, temp=TEMP_USE_AMBIENT, flags=0, dither_mode=EPDC_FLAG_USE_DITHERING_PASSTHROUGH, quant_bit=0, alt_buffer_data={phys_addr=0, width=0, height=0, alt_update_region={top=0, left=0, width=0, height=0}}, hist_bw_waveform_mode=WAVEFORM_MODE_DU, hist_gray_waveform_mode=WAVEFORM_MODE_GC16}, 0x7608fc7c) = 0
[pid  4910] 17:47:19.172369 [76937bdc] ioctl(19, MXCFB_SEND_UPDATE, {update_region={top=0, left=0, width=600, height=32}, waveform_mode=WAVEFORM_MODE_AUTO, update_mode=UPDATE_MODE_PARTIAL, update_marker=333, temp=TEMP_USE_AMBIENT, flags=0, dither_mode=EPDC_FLAG_USE_DITHERING_PASSTHROUGH, quant_bit=0, alt_buffer_data={phys_addr=0, width=0, height=0, alt_update_region={top=0, left=0, width=0, height=0}}, hist_bw_waveform_mode=WAVEFORM_MODE_DU, hist_gray_waveform_mode=WAVEFORM_MODE_GC16}, 0x7608fc7c) = 0
[pid  4910] 17:47:19.181464 [76937bdc] ioctl(19, MXCFB_SEND_UPDATE, {update_region={top=32, left=0, width=600, height=59}, waveform_mode=WAVEFORM_MODE_AUTO, update_mode=UPDATE_MODE_PARTIAL, update_marker=334, temp=TEMP_USE_AMBIENT, flags=0, dither_mode=EPDC_FLAG_USE_DITHERING_PASSTHROUGH, quant_bit=0, alt_buffer_data={phys_addr=0, width=0, height=0, alt_update_region={top=0, left=0, width=0, height=0}}, hist_bw_waveform_mode=WAVEFORM_MODE_DU, hist_gray_waveform_mode=WAVEFORM_MODE_GC16}, 0x7608fc7c) = 0
./strace: Process 3704 detached
./strace: Process 4888 detached
./strace: Process 4889 detached
./strace: Process 4907 detached
./strace: Process 4908 detached
./strace: Process 4910 detached
./strace: Process 4911 detached
./strace: Process 4912 detached
./strace: Process 15780 detached
vs
Code:
[root@kindle tc]# ./strace -fittv -e trace=ioctl ./fbdepth -qH toggle
17:47:56.314454 [76f17bdc] ioctl(3, FBIOGET_VSCREENINFO, 0x23090) = 0
17:47:56.317420 [76f17bdc] ioctl(3, FBIOGET_FSCREENINFO, 0x23138) = 0
17:47:56.318948 [76f17bdc] ioctl(3, FBIOPUT_VSCREENINFO, 0x23090) = 0
17:47:56.320730 [76f17bdc] ioctl(3, FBIOGET_VSCREENINFO, 0x23090) = 0
17:47:56.322101 [76f17bdc] ioctl(3, FBIOGET_FSCREENINFO, 0x23138) = 0
17:47:56.324760 [????????] +++ exited with 0 +++
fbgrab does not show a difference but with eips -i the grayscale: field is 1 with NM off and 2 with NM on, no differece if changed by lipc or fbdepth
yparitcher is offline   Reply With Quote
Old 03-27-2020, 07:13 PM   #15
yparitcher
Connoisseur
yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.yparitcher ought to be getting tired of karma fortunes by now.
 
Posts: 52
Karma: 616590
Join Date: Feb 2019
Device: K4 KT4 PW4 PW5
in /etc/xdg/awesome/lab126_ligl.lua the epdcMode lipc call is defined as:

Code:
    -- property to enable/disable colorInverse mode
    propertyColorInverseMode = registerLipcStringProp("epdcMode", "rw")
    propertyColorInverseMode.value =  execAndGrabResult("get-dynconf-value winmgr.colorinverse.pref")
    propertyColorInverseMode.listener = function (name, value)

        local ret = ligl.set_epdc_grayscale_mode(g_liglRef, tostring(value))
        if (ret == 1) then
            execAndGrabResult("set-dynconf-value winmgr.colorinverse.pref " .. tostring(value))
            execAndGrabResult("xrefresh -root")
            sendLipcEvent("nightModeStateChanged",{tostring(value)})
        else
            llog.error("WindowManager", "propertyColorInverseMode", "","Failed to set EPDC MODE to " .. tostring(value))
            propertyColorInverseMode.value =  execAndGrabResult("get-dynconf-value winmgr.colorinverse.pref")
        end
    end
yparitcher is offline   Reply With Quote
Reply

Tags
invert color, lab126, screen


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you reverse screen to white on black? mrmcmanus Nook Color & Nook Tablet 11 10-29-2018 03:35 PM
Aura Invert color black background white fonts Nielsd Kobo Reader 2 01-16-2017 03:36 PM
tried to change reader, now on bootscreen i get white/black screen wakkaday Kobo Reader 4 01-04-2016 02:14 PM
DR1000 how to repair the screen, lots of black and white block wy6688 iRex 1 08-03-2010 11:39 AM


All times are GMT -4. The time now is 08:53 PM.


MobileRead.com is a privately owned, operated and funded community.