-
Notifications
You must be signed in to change notification settings - Fork 104
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
Last known 'good' version of Raspbian OS for PaperTTY - and help in updating the install guide? #119
Comments
I tried a fresh install of the latest 64 bit Raspberry Pi OS/Raspbian last month and it worked alright. |
thanks! I think libtiff5 was one of the things that didn't install. I'll try again with libtiff5-dev and see if there are knock-on effects. I tried installing with poetry. Took a while to get pipx to install (used pip instead of apt in the end). To try the pip install, I'd type the following?
|
Yep, that should be it. The first command creates a virtual python environment. |
@bodnerry I tried going through this again today. I guess something has changed since the build I tried last month, as I did need to install an extra dependency. In addition to libtiff5-dev as mentioned above, I needed to install libfreetype-dev.
I also wound up creating a script to try and automate the entire PaperTTY setup from start to finish, on a fresh install of Raspberry Pi OS. So if you're still having trouble then that might be worth a try. https://github.com/mcarr823/papertty-init |
Oooh! thanks for that. I'll give it a try this evening (I'm in Sydney) I
did get lots of errors when I tried installing with pip3.
I'll make a fresh SD card image. Just for info,
- are you using a Pi3 or Pi4?
- Which Raspbian OS are you using?
- 32 or 64 bit?
- I'm assuming the 64 bit OS is still fine with the Pi3? (I know I can
probably google that one)
I'm excited because I never quite got papertty to work for me so I must've
missed some important info somewhere along the way that wasn't immediately
obvious.
I'm using the Waveshare 6" HD IT8951-based screen
Rod.
…On Thu, 21 Dec 2023 at 17:38, mcarr823 ***@***.***> wrote:
@bodnerry <https://github.com/bodnerry> I tried going through this again
today. I guess something has changed since the build I tried last month, as
I did need to install an extra dependency.
In addition to libtiff5-dev as mentioned above, I needed to install
libfreetype-dev.
The tricky part is that libfreetype-dev needs to be installed before
papertty.
If it's installed afterwards, then you need to reinstall pillow.
eg.
papertty_env/bin/pip3 uninstall pillow
sudo apt install libfreetype-dev
papertty_end/bin/pip3 install papertty
I also wound up creating a script to try and automate the entire PaperTTY
setup from start to finish, on a fresh install of Raspberry Pi OS. So if
you're still having trouble then that might be worth a try.
https://github.com/mcarr823/papertty-init
—
Reply to this email directly, view it on GitHub
<#119 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATRKFZUJUMUFJ4UBOAFCXLYKPKNTAVCNFSM6AAAAABAYB3WIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGYZDMNRWGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Rodney Berry
|
I tried it with a pi4, 64bit OS, either Raspberry Pi OS or Raspberry Pi OS Lite (the script supports both). rpi3 should support either 64bit or 32bit. |
@mcarr823 I just fired up your script on a fresh full install of 64bit bookworm on a Pi3B (4gb I think?) and it all went well. I chose to try your fork. and most default options. Typing is still a bit laggy with a bluetooth keyboard but I'll find a USB one and see how that goes. I'll try it again with 64bit Lite. I was originally hoping to use a Pi Zero W and run on batteries but I suspect that will be a bit too slow for this, right? I got an under-voltage warning earlier with the Pi3B but now seems ok with a USB battery pack. I think maybe the socket was a bit loose before. I imagine that the Pi4 and 5 will need a beefier battery set-up to run nicely. Most off-the-shelf phone-charger packs just boost 3.6v up to 5v and that is a bit shaky for a computer's power needs. |
When papertty starts up you should get a line of text show up along the lines of "lut_version = M841_TFA5210" or something similar. Could you see what yours is? If it starts with M641, then you might be able to speed up your panel a bit further by enabling A2 mode. A2 mode should be a bit faster than the default DU mode (I think it's like 260ms vs 120ms). A2 mode is enabled by default for all other IT8951 models. But the M641 (which some of the 6" panels use) is a bit different in how it works, so A2 mode is disabled by default. #This model requires four-byte alignment.
#Don't enable a2 support until that has been implemented.
#self.supports_a2 = True If your model starts with M641, then you could try uncommenting that third line and restarting papertty to see if everything still works correctly (no visual artifacts and such). A pi zero might work, but it depends on how fast you need it to be and where/how you're going to use this. If this is only going to be used at home, then one option would be to have the pi zero offload all the processing to a different device (eg. a desktop PC) and use the pi zero like a monitor. That's something which has only just been added and is currently pending as a pull request. I haven't written up instructions on that or added it to my fork or installer yet. Otherwise the pi zero will probably be too slow. The 6" HD panel is 1448x1072, which is quite a lot of pixels for a pi zero to handle. The 3B should be a lot faster, especially if A2 works. A Pi Zero 2 WH might work, but I don't have one so I can't really say if it's fast enough. I've been using a rpi 3A+ with Raspberry Pi OS Lite and a 1872x1404 panel. IIRC the delay caused by the pi's processing speed in terminal mode is around 60ms. For the 4b it was 8ms. For the 2b it was more like 200-250ms. So if you add that time + the refresh rate latency (120ms for A2 mode, or 260ms for DU mode) + the keyboard latency (0 for a USB connection, something hopefully low for bluetooth) you should get a general idea of the speed. A pi 4/5 will be faster, but I'd try USB and/or A2 mode first. The difference between a 3a+ and a 4b was only around 50ms in my testing, and the difference between the 4b and 5b can't be more than 8ms, so switching rpis seems like it would have diminishing returns. |
I'll make up another SD card with Lite to see if there is any difference. |
I forgot to say how much fun this is and how grateful I am for your help in getting this far. :) |
No problem. Here's hoping you get it running even smoother. Based on your screenshot there are a couple of things you can try in order to speed it up:
Those first two mean the individual writes to the panel are smaller and thus faster. Same with image comparisons. Disabling the word count does much the same thing, since you're not updating the text down the bottom of the screen. If less is changing on the screen then it's faster to draw. Using the rest of the screen should be the big one. From your screenshot it's obvious you aren't getting a lot of text on the screen before it starts scrolling, and every time it scrolls you're redrawing half the screen. So anything which means you can put more text on the screen before that happens should help. I would expect normal typing speed to be faster though. I know you said you enabled A2 mode (that is the right file - as long as you restarted papertty afterwards) but did you check the LUT version first? If it's something different than the ones listed in that source code file then it might not have helped. You can also try setting sleep to a smaller value. eg. --sleep 0.01 You could also set --vcom if the ribbon has a vcom value written on it. I don't know if it'll actually help the speed or not, but the vcom value written on the ribbon is what you should ideally run the driver at. 250ms doesn't seem unreasonable for a 3b though. I was getting around 60ms for the papertty logic with a 3a+. Add the A2 refresh (120ms) as well as the time taken to write to the pins and it's getting close to 200ms. Do you have a 4b or 5b to try out? Comparing it with a faster pi would help you to determine whether the delay is because of the panel or because of the pi. |
Aren't I having a nerdy christmas? :) Is there a way to check the LUT version while PaperTTY is running? My vcom sticker says -2.30 so I'll tweak that in the driver. I have made a spare SD with Bookworm 64 Lite so I'll see if I get a bit more performance from that. I have a Pi4 so I can compare that for speed too. Wordgrinder appears to be built around the assumption that you will focus better if the text you are working on is always at the center of the screen (vertically) and that everything else should revolve around that. The idea makes a lot of sense to me until, of course, we start trying it with EPD refresh rates. I'll check in the Wordgrinder discussions and see what people are doing with that and whether Wordgrinder can be customised enough for e-ink happiness. I find Nano quite easy to work with on the EPD screen because everything mostly stays put, and I could use markdown if I need to get fancy. I'm not likely to enjoy writing anything substantial in LaTEX though. :) I might even revisit VIM to see if my brain can be convinced that it's a good idea. then, of course there is emacs, which seems to be its own operating system! Sorry, I'm maybe too chatty for an Issues discussion. I've pinned a best practice with what we have so far summary so others can arrive and get what they need without reading the whole thing. :) cheers and thanks again! Rod |
That's weird. When you start papertty (with an IT8951 panel) it should print a few things to the command line. print("width = %d" % self.width)
print("height = %d" % self.height)
print("img_addr = %08x" % self.img_addr)
print("firmware = %s" % firmware_version)
print("lut = %s" % lut_version) That last one should be the lut version. I think nano is a good fit for this. The interface is minimal and the screen doesn't move until you hit the bottom. I'm thinking I'll put the above performance tips (and other information) into a wiki on github at some point. Redoing the README is on my list lol. |
@mcarr823 with your script, I noticed a couple of warnings in the install. I chose gpiozero but it's still talking about RPi.GPIO - not a concern for me because it's running on a Pi3B but just checking. :) Installing collected packages: spidev, RPi.GPIO, incremental, zope-interface, typing-extensions, six, pycryptodomex, Pillow, idna, constantly, click, attrs, hyperlink, automat, Twisted, vncdotool, papertty |
Haven't got the CLI version working yet when installing from a script. (Pi3B Raspbian lite latest bookworm). The thinner font seemed to speed things up a little. Enabling partial refresh seems to help too but is there a keyboard shortcut to force a full refresh sometimes? I have a lot of missing text when I have to scroll about and edit or read back what I've written. |
when I run ./.local/bin/papertty-init/startpapertty.sh , I get the following:
|
This probably belongs elsewhere but, after asking the Wordgrinder author about scrolling behaviour in Wordgrinder, they said that the latest development version has a menu option under Look and Feel to change to jump-scrolling so the page doesn't keep moving around you as you type at the center of the screen. Does not yet seem to be in the apt installed version for Pi. In Nano, there are a few startup options that help with EPD displays. (You put them in your ~/.nanorc file): |
This happens when the script installs papertty via pip.
The warnings are from pip, because RPi.GPIO and Pillow 7.1.2 aren't in the new pip packaging format (I think).
There's no shortcut, though it should be simple enough to add a full refresh after x number of updates in terminal mode, just like VNC mode does.
The error message suggests that papertty isn't installed in the venv. |
I'm using a 3.7in waveshare display, and a Raspberry Pi 5, when I run startpapertty.sh I get this error:
Looks like lgpio isn't installed, but they only distribute a wheel for 0.0.0.2 which I think is too old. Anyone had this before? |
@spectre1989 looks like I'm running into the same issue using Raspberry Pi 5. It might be due to the change in GPIO hardware in the new Pi, so now RPi 5 can't use
|
@atneik From your log @spectre1989 I ran into the same issue. |
@atneik like @mcarr823 I had more luck compiling lgpio from scratch, pip only seems to have a really old version. Once I built it I converted the egg to a wheel and then installed it with pip. The next issue I got around by going into drivers_base.py and commenting out: |
@spectre1989 I've had another look at this and I was able to get lgpio working on a raspberry pi 4. The problem seems to be that the spidev kernel module reserves certain pins (notably the CS pin). The only gpiozero factory which currently works with the pi5 is the lgpio one. gpiod (which also supports the pi5) seems to have the same problem, so changing libraries probably won't help. I'm not sure how best to address this. In the case of the IT8951 board, I guess an alternative would be to use the USB driver instead of the GPIO pins. |
Edit: I'll try to keep a short TLDR of the below discussion for those who just want to get going quickly:
@joukos' fantastic work on PaperTTY had to take a back set while they have been flat-out with other stuff. Since the last major revisions a few things have changed in Raspbian distributions and it's a bit hard for a beginner to get things working from the original instructions. The information below will get a pip-based install happening relatively painlessly. The Poetry install still needs revision to make it work as written.
Quickie Guide for the impatient (thanks mostly to @mcarr823 ):
You can quickly get PaperTTY going using a fresh install of Raspbian 64 full or Lite by using @mcarr823's script(s) to be found here: https://github.com/mcarr823/papertty-init
After you get that happening, there are a few tweaks to try:
(Original Post)
Hi all, I'm a newcomer to the PaperTTY universe.
I started trying to install PaperTTY on the current (15th Dec 2023) 64 bit Raspbian but soon got bogged down in errors. I'm assuming there are two ways to go:
I imagine option 1. would be quicker (on a Pi3B) but that option 2. would be better for the future - to get it done and document it so there is a contemporary install guide for newcomers to work with.
I am happy to make nice documentation but my system knowledge is a bit too gappy to easily get PaperTTY up and running on a fresh install of Bookworm 64 bit, for example.
Is anyone in a position to help me get something working?
I currently have a Pi3B and a Pi4(B?) and a Waveshare IT8951-based 6" ID display.
best wishes and thanks in advance,
Rodney
The text was updated successfully, but these errors were encountered: