-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
monitor: Ctrl-]/Ctrl-t + Ctrl-f stopped working (IDFGH-9686) #11027
Comments
Might be related to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=83efeeeb3d04b22aaed1df99bc70a48fe9d22c4d. On Arch from
and from
|
aha. I'm also on 6.2.2. So what's to do? rebuild the kernel? |
I was just running into this, too, and checking to see if anyone else had hit this. I think console_reader.py should be modified to no longer utilize this ioctl. You could certainly use an older kernel. |
This does the trick for now, but it really should be moved to a different approach as this busy waits; this matches the approach in Windows in this file. (I could see opening a pipe between the two threads and sending data such that the select gets it, or by using a signal to cause the
|
@tim-nordell-nimbelink Thanks for the patch, can confirm that it's working. Can you create a PR with this patch? I really don't wanna downgrade my kernel or rebuild my kernel. |
I have also encountered this issue since ~5.80, currently on |
Hi, thank you for reporting the issue, we were able to reproduce it and we will work on providing the fix. If you are having the same issue, provided workaround seems to be working, but I wouldn't recommend using it with an interactive terminal because it does not support escape sequences - some useful features (such as navigation using arrows, autocomplete, etc.) will be missing. Another workaround would be to re-enable TIOCSTI which can be done by |
FYI, not all distros allow you to re-enable TIOCSTI without switching away from the main kernel. The kernel configuration allows you to make it into a controllable sysctl, or to completely disable it. In Arch:
Also, while there shouldn't be any problems with escape sequences with the temporary solution I provided above, I did test it just now against the advanced console example. Using strace reveals that, curiously, the code read 1 character of the escape sequence, and the subsequent
That works against the advanced console loop example code. I wonder why Thanks, |
@tim-nordell-nimbelink Thanks for providing the additional fix! This works for me on newer and older kernels and also in interactive and standard modes of the monitor. You can create a PR to esp-idf-monitor and take credit for your contribution. We can make it work with minor tweaks. If you are not interested in creating PR, let me know, and I will do it. |
Ah, I totally realize now what's going on; I was stracing the wrong thread. The thread with the input has internal buffering in the |
The fix is linked and is included in |
so, I can "pip install esp-idf-monitor" and get 1.0.4 "installed" on my v4.4.4 environment, but idf.py monitor still runs the old version, and there doesn't appear to be any binary installed, the wrappers have obviously changed in v5+ |
The fix for the v4.4 branch is not yet merged. |
…rt kernel > 6.2 Closes #11027
Answers checklist.
IDF version.
v.4.4.3
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
Wroverkit V1
Power Supply used.
USB
What is the expected behavior?
According to the help menu in the idf.py monitor when I press Ctrl-t followed by Ctrl-f, the device should be reflashed. Similarly when pressing Ctrl-] in monitor mode, the mode should exit returning me back to the shell.
What is the actual behavior?
Steps to reproduce.
idf.py -p /dev/ttyUSB0 flash monitor
Debug Logs.
No response
More Information.
Could be related to #1209
The text was updated successfully, but these errors were encountered: