-
Notifications
You must be signed in to change notification settings - Fork 2
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
the display stops responding #1
Comments
Thanks! I'll try and reproduce, what version of CircuitPython are you running? |
I installed CircuitPython 9.0.4 and the tdeck_repl files. After starting the repl and connecting a usb serial terminal, I waited a little more than 10 minutes and the keyboard was still working. Are you running any commands from either the terminal window or the tdeck keyboard before letting the device sit inactive? How long do you leave the device in active? Is the issue repeatable? If so, what are the exact steps you're taking before the issue occurs? |
I did find a bug in the playi2s applet, it wasn't properly loading the "input" overload so once playi2s was imported, only the usb uart (terminal screen) and not the t-deck keyboard would work until the applet was exited. If you're running python code you will run into the same issue if your code doesn't include the following block before executing any input statements: try:
from tdeck_repl import input
except:
pass |
sorry for the late just saw the asnwers, i did noticed that bug on playi2s and did the same things you said here last night i noticed that before happening i was getting the code stopping for an autoreload, so i just did the only thing i can think on is maybe a difference between running it from battery and usb? rn i'm just using the usb port to power it on and i wont have a battery for a long time edit: just saw you asked, it happens either way if i use a command, write random things or just turn it on and let it sit, after a random amount of time (longer now after disabling autoreload) the display just stops responding and keep showing the last thing on it, it's like is just frozen, but the t-deck keyboard inputs still work, in fact i'm able to reload repl from there, i just can't see what i'm typing until repl reloads |
Good call on the power issues, I disconnected the Lipo battery from my board and reproduced the issue pretty quickly. You properly explained this but I misunderstood, It's actually the screen that stops working not the keyboard. DOH 😁 This is also definitely related to the auto-reload... The screen is actually managed by the core, so it may take some digging to figure this one out. By the way, here's another approach to clearing the screen: |
I just reproduced the issue with the battery connected by forcing an auto-reload. It's not related to the power source after all... |
Something is blocking the auto-reload. I'm assuming that the |
My current theory is that the tdeck_repl code is getting run before the board has fully initialized the I2C bus after a restart and that's causing the restart to hang before the display is initialized. It's a little tough to diagnose though because I can sometime reproduce the issue and then it seems to fix itself. I'll pick this up later but in the mean time, if you could try adding During my testing it also appeared that adding a print statement to the try/except block at line 53 of tdeck_repl.py made a difference. I replaced the existing block with: try:
i2c.readinto(self._key)
except Exception as err:
print(f'Caught {err}')
self._key=bytearray(1) |
i'm very happy i explained properly, english is not my main language and i have a horrible time trying to explain myself sometimes hahha using exit just kills repl and give me the promp to press a key or ctrl-D i did add a command to code.py to make a reset
|
Along with the press a key message does it say anything about auto-reload? |
nope, just code running, press any key to start repl or ctrl-D to reload |
Auto-reload may be a dead-end, time to look at the core display functions.... |
at least on these last 22 mins since my first message, it's working just fine after adding the delay |
Hmm, I had talked myself out of that being an effective workaround. Let me know if you do have any screen hangs using the delay. |
well, until now i was just doing random things, mainly making errors with playi2s and just printing random things on loop, and it held up perfectly fine |
Well that's good info, I'm thinking the actual problem is that the lilygo_tdeck circuitpython build doesn't mark the SPI bus excluded from resets, I'm building a version of CircuitPython which I think will fix that. If it seems to resolve the issue, I'll go ahead and submit a PR to Adafruit to update the version on the circuitpython.org website. If you'd like, I can post a link to the firmware.bin file here so you can test it. I'm hoping it will fix the problem without either the delay or the extra print statements in line 53 😁 |
great! and yes, have no problem with that, just let me know what i have to do and i happy to test it 😄 |
Well it's not as simple as I had hoped, the never_reset modification doesn't seem to be helping. I've got an early morning so I'll have to pick this up tomorrow.... |
I've opened up a CircuitPython issue adafruit/circuitpython#9253 |
i saw! also yesterday i just found out about pydos, and while adafruit check that up (that i imagine it gonna be a long time) |
I'm glad you found PyDOS, it really shines on boards like this that have a display and keyboard 😁 I haven't put the temporary auto-reload fix into PyDOS yet so you may want to edit /lib/pydos_ui.py and modify the try/except block at line 57 by changing I'm actually traveling for the next week so it will probably be a week or so before I can spend any time looking at the core issue. |
as the tittle says, i noticed that after some inactivity time, the keyboard stops responding (on the t-deck) but i can still type using serial with screen (on this stage, the t-deck inputs dont show on the t-deck display, but the serial console inputs from my computer show just fine)
but after a little more time (around 3 or 4 mins) the display stops responding completely
i keep seeing the t-deck keyboard input on the the serial console, in fact typing exit and enter just close repl and it reloads normally, or ctrl + D from my pc
The text was updated successfully, but these errors were encountered: