Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 01-17-2021, 06:34 PM   #16
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
Thanks for proving it safe to run on the H2O 2v2. I was afraid to brick it
Elektron is offline   Reply With Quote
Old 01-17-2021, 08:20 PM   #17
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by Georgelemental View Post
First of all, this is quite impressive!

I tried running it on my Kobo Aura H20 2 v2. It boots fine. However, the display is upside-down (reverse portrait), and touch input is rotated 90 degrees counterclockwise from the visual display. The value of /sys/class/graphics/fb0/rotate is 3 and attempts to change it have no effect.
Hi,
Glad to see you got it up and running. You should see the Landscape mode hack (search "forceallowlandscape kobo" in Google) and that will probably solve all of your problems. You'll get a new landscape mode switch in your tray and you'll just have to toggle the "Landscape" mode.
Please let me know how it goes
NiMa is offline   Reply With Quote
Advert
Old 01-17-2021, 11:06 PM   #18
Georgelemental
Junior Member
Georgelemental began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: none
Quote:
Originally Posted by NiMa View Post
Hi,
Glad to see you got it up and running. You should see the Landscape mode hack (search "forceallowlandscape kobo" in Google) and that will probably solve all of your problems. You'll get a new landscape mode switch in your tray and you'll just have to toggle the "Landscape" mode.
Please let me know how it goes
When I turn on landscape mode, touch input in Nickel is rotated 180 degrees from the display.
Georgelemental is offline   Reply With Quote
Old 01-18-2021, 12:53 AM   #19
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by Georgelemental View Post
When I turn on landscape mode, touch input in Nickel is rotated 180 degrees from the display.
I'll adjust the Python file for your problem then. You should get it by tomorrow morning here in Canada
Now I need some sleep...
NiMa is offline   Reply With Quote
Old 01-18-2021, 07:51 AM   #20
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by NiMa View Post
I'll adjust the Python file for your problem then. You should get it by tomorrow morning here in Canada
Now I need some sleep...
Hi,
I checked my Python file and I doubt that that's the problem. Can you try starting up KoBox and then telnet/SSH your Kobo and entering this command:
Code:
echo 1 > /sys/class/graphics/fb0/rotate
even if you've already tried it? Then, tap somewhere on the screen to activate elements and you could see an update. If that doesn't work, try again with 0.5 instead of 1, and restarting your Kobo if this does nothing, then retyping the command in with the last number.
I hope it'll work for you!
NiMa is offline   Reply With Quote
Advert
Old 01-18-2021, 11:28 AM   #21
Elektron
Banned
Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.Elektron ought to be getting tired of karma fortunes by now.
 
Posts: 2,296
Karma: 5300240
Join Date: Jun 2020
Location: Edmonton, AB
Device: Kobo Aura H2O Edition 2 (mark 7), Kobo Mini
I'll do it... Soon™
I'm busy, sorry!!!
Elektron is offline   Reply With Quote
Old 01-18-2021, 05:44 PM   #22
Georgelemental
Junior Member
Georgelemental began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: none
Writing 1 to /sys/class/graphics/fb0/rotate does nothing, as before. Strangely, it seems that writing 3 to it sets it to 1, and puts the display in normal portrait mode (though touch input is still rotated 90 degrees counterclockwise from the display). Writing 0.5 sets it to 0 and corrupts the display.
Georgelemental is offline   Reply With Quote
Old 01-18-2021, 06:37 PM   #23
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
Welcome to NTX kernels that do mirrored inversions behind your back .

And... worse.
NiLuJe is offline   Reply With Quote
Old 01-18-2021, 07:00 PM   #24
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by NiLuJe View Post
Would be there a way to put it in the correct rotation?
(I don't remember which one, but it is one of the two landscape modes)
NiMa is offline   Reply With Quote
Old 01-18-2021, 07:02 PM   #25
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
@Georgelemental : this might help:
Code:
#!/usr/bin/python3
import os

# Touch mapper for Xorg/XDOTool >> Kobos
file = open("evtest-log","r")
coordinates = file.read()
file.close()
# Prevent other exit status than 0 if evtest log file is empty
if len(coordinates) <= 10:
    exit()
else:
    c1 = coordinates.split("\n")

    # Mapping x
    for item in c1:
        if "ABS_MT_POSITION_X" in item:
            c2 = item.split(" ")
            c3 = c2[-1]
    x = c3
    print("registered native x " + x)

    # Mapping y
    for item in c1:
        if "ABS_MT_POSITION_Y" in item:
            c2 = item.split(" ")
            c3 = c2[-1]
    y = c3
    print("registered native y " + y)

    # Dividing for lower resolutions
    # Originally made for Kobo Libra -> 1680x1264 / 2 = 840x632
    x = float(x)
    y = float(y)
    # Nasty hack
    x2 = y
    y2 = x
    print("converted native x to %s" % x2)
    print("converted native y to %s" % y2)

    # Passing x + y to xdotool
    os.system("DISPLAY=:0 xdotool mousemove {0} {1}".format(x2, y2))
    # Clicking mouse button
    os.system("DISPLAY=:0 xdotool click 1")

    # Done! Emptying the file
    os.system("> evtest-log")
Put it in /mnt/user/root/.utils/ while KoBox is running to replace the old xorg-kobo-touch.py
and start it in normal portrait mode
NiMa is offline   Reply With Quote
Old 01-18-2021, 07:14 PM   #26
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
@NiMa: Correct for whom? ^^.

Correct for nickel is fbdepth -R UR. Correct for a 1:1 touch:fb mapping is... not always (if ever) possible ^^.
NiLuJe is offline   Reply With Quote
Old 01-18-2021, 07:21 PM   #27
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by NiLuJe View Post
@NiMa: Correct for whom? ^^.

Correct for nickel is fbdepth -R UR. Correct for a 1:1 touch:fb mapping is... not always (if ever) possible ^^.
Well OK then...
Would it be possible to make a simple C/Python/Bash/whatever script to auto-determine the rotation for each device and set it so that my touch program won't be messed up?

(it is in FBInk, isn't it?)
NiMa is offline   Reply With Quote
Old 01-18-2021, 10:54 PM   #28
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
You're looking at it the wrong way around.

There's *always* a translation necessary, the touch layer *never* matches the fb.
c.f., Plato's input code for an idea of how "fun" this is to handle, or my first answer on github when I hinted that this was liable to drive someone mad for some other examples).

Last edited by NiLuJe; 01-18-2021 at 10:58 PM.
NiLuJe is offline   Reply With Quote
Old 01-20-2021, 07:45 PM   #29
Georgelemental
Junior Member
Georgelemental began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Oct 2019
Device: none
Quote:
Originally Posted by NiMa View Post
@Georgelemental : this might help:
Code:
#!/usr/bin/python3
import os

# Touch mapper for Xorg/XDOTool >> Kobos
file = open("evtest-log","r")
coordinates = file.read()
file.close()
# Prevent other exit status than 0 if evtest log file is empty
if len(coordinates) <= 10:
    exit()
else:
    c1 = coordinates.split("\n")

    # Mapping x
    for item in c1:
        if "ABS_MT_POSITION_X" in item:
            c2 = item.split(" ")
            c3 = c2[-1]
    x = c3
    print("registered native x " + x)

    # Mapping y
    for item in c1:
        if "ABS_MT_POSITION_Y" in item:
            c2 = item.split(" ")
            c3 = c2[-1]
    y = c3
    print("registered native y " + y)

    # Dividing for lower resolutions
    # Originally made for Kobo Libra -> 1680x1264 / 2 = 840x632
    x = float(x)
    y = float(y)
    # Nasty hack
    x2 = y
    y2 = x
    print("converted native x to %s" % x2)
    print("converted native y to %s" % y2)

    # Passing x + y to xdotool
    os.system("DISPLAY=:0 xdotool mousemove {0} {1}".format(x2, y2))
    # Clicking mouse button
    os.system("DISPLAY=:0 xdotool click 1")

    # Done! Emptying the file
    os.system("> evtest-log")
Put it in /mnt/user/root/.utils/ while KoBox is running to replace the old xorg-kobo-touch.py
and start it in normal portrait mode
The script almost fixes it. With normal portrait mode, mouse input is reflected across the center vertical axis from the display.
Georgelemental is offline   Reply With Quote
Old 01-20-2021, 08:58 PM   #30
NiMa
Evangelist
NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.NiMa ought to be getting tired of karma fortunes by now.
 
NiMa's Avatar
 
Posts: 469
Karma: 2390534
Join Date: Jun 2020
Location: Somewhere in the Universe
Device: Kobo Libra, Glo HD, Touch C/B, Mini, Glo, Aura SE, Clara HD, KT
Quote:
Originally Posted by Georgelemental View Post
The script almost fixes it. With normal portrait mode, mouse input is reflected across the center vertical axis from the display.
What do you mean? I didn't quite understand.
Do you still have inverted touch input? Like from when you tap the menu, it taps the desktop switcher?
NiMa is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HOWTO][WIP] Run Xorg on your Kobo + full-blown Firefox NiMa Kobo Developer's Corner 57 07-27-2023 05:33 PM
Archive.org book on Kobo question cpl625 Kobo Reader 4 10-28-2011 06:41 AM
Portable Firefox (Run it off a USB Drive) Colin Dunstan Lounge 3 11-22-2004 07:42 PM


All times are GMT -4. The time now is 07:10 PM.


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