Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kobo Aura HD 32bit fb ? #13

Open
rfenouil opened this issue Jan 28, 2023 · 0 comments
Open

Kobo Aura HD 32bit fb ? #13

rfenouil opened this issue Jan 28, 2023 · 0 comments

Comments

@rfenouil
Copy link

rfenouil commented Jan 28, 2023

Hello and thank you for the great work.

I'm trying kvncviewer from the extracted zip file (1st post on mobileread forum) on my Kobo Aura HD (firmware 4.35.20400).
When I use files extracted from this zip file I get the error:

# ./luajit vncviewer.lua -password ahahah 192.168.1.51:1
./luajit: ./ffi/framebuffer_linux.lua:183: unknown bpp value for the mxc eink driver
stack traceback:
        [C]: in function 'error'
        ./ffi/framebuffer_linux.lua:183: in function 'open'
        vncviewer.lua:3: in main chunk
        [C]: at 0x0000bd31

A look at the kobo framebuffer gives:

# fbset
mode "1080x1440-0"
        # D: 0.008 MHz, H: 0.005 kHz, V: 0.003 Hz
        geometry 1080 1440 1088 1536 32
        timings 120000000 32 508 4 5 32 2
        accel false
        rgba 8/16,8/8,8/0,8/24
endmode

I tried to add a condition for 32bit fb in framebuffer_linux.lua:

...
-- TODO: implement a better check for Kobo                                                              
                if fb.vinfo.bits_per_pixel == 32 then                                                            
                        -- this ought to be a Kobo                                                                      
                        local dummy = require("ffi/mxcfb_kobo_h")                                                       
                        fb.einkUpdateFunc = kobo_update                                                                 
                        fb.bb = BB.new(fb.vinfo.xres, fb.vinfo.yres, BB.TYPE_BB32, fb.data, fb.finfo.line_length)       
                        fb.bb:invert()                                                                               
                        if fb.vinfo.xres > fb.vinfo.yres then                                                           
                                -- Kobo framebuffers need to be rotated counter-clockwise (they start in landscape mode)
                                fb.bb:rotate(-90)                                                             
                        end                                                                                             
                elseif fb.vinfo.bits_per_pixel == 16 then                                                        
                        -- this ought to be a Kobo                                                                      
                        local dummy = require("ffi/mxcfb_kobo_h")
...

I got the program to run and draw part of the VNC session screen on the flickering Kobo screen.
Nikel was not killed before trying that, maybe its interface interferes with kvncviewer display ? (and touch inputs ?)

The framebuffer settings I put in the above code is a quick and dirty trial to get the program running, but probably all wrong. Would you have suggestions on how to get a correct init of the display ?

I saw this issue: #4
Updating these files by the latest commit of kvncviewer did not help with the first error, so I guess the 32bit reported by fbset is the result of a firmware change between his version and the newest ?

I'll try to get a better control of the flickering (don't need quick updates or frequent fullscreen refresh, the screen I'm targeting is mostly static), and get the touch input to work, feel free to let me know if you have suggestions.

TightVNC server running on windows on port 5901.

Thank you for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant