-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Ubuntu] --preview error : Failed to read /dev/tty #1486
Comments
I have just run into the same problem. The problem occurred just after a system update. System is ubuntu 18.04 LTS. Before the system update, everything worked flawlessly.
"sudo chmod 777 /dev/tty" won't make a difference. uninstalling/reinstalling won't make a difference. The other commands CTRL-R and CTRL-T work without any problems. Any help will be appreciated. Thanks. |
I'm seeing this too. It appears to have started after an Ubuntu 18.04 kernel update to |
I'm hitting this problem too, it breaks the fzf.vim plugin. I get the following error in Vim:
If I run the equivalent command I get: channi16@ICT0115123:~$ fzf -m --prompt ~/ --expect=ctrl-v,ctrl-x,ctrl-t --height=19 > /tmp/vHnZunZ
Failed to read /dev/tty However just running |
I tried to track this down a bit more, it appears to be the innocuous channi16@ICT0115123:~$ fzf -m --prompt ~/ --expect=ctrl-v,ctrl-x,ctrl-t --height=14 > /tmp/vvHpkEQ
Failed to read /dev/tty
^[[3;1Rchanni16@ICT0115123:~$ fzf -m --prompt ~/
channi16@ICT0115123:~$ fzf -m --prompt ~/ --expect=ctrl-v,ctrl-x,ctrl-t
channi16@ICT0115123:~$ fzf -m --prompt ~/ --expect=ctrl-v,ctrl-x,ctrl-t --height=14
Failed to read /dev/tty
^[[7;1Rchanni16@ICT0115123:~$ ;1R So:
And it's not in combination with any other argument: channi16@ICT0115123:~$ fzf --height=14
Failed to read /dev/tty
^[[48;1Rchanni16@ICT0115123:~$ ;1R |
I managed to get fzf working in Vim (although it caused a core dump twice before it worked) by changing the display of fzf to be on the left rather than the bottom (my guess was this would stop using the let g:fzf_layout = { 'left': '~70%' } Actually I do still sometimes get an error:
But then running |
@ianchanning that change to |
Confirmed that booting Ubuntu kernel |
@tanc I'm not using tmux, so it could lie with that. See if you can run the same command outside Vim - I find that it will sometimes crash, but I can also get it to work with the |
As a working fzf in vim is such an important part of my daily work I ended up rolling back the kernel |
The other option that seems to work for me is to use neovim instead. So it could be an issue around the handling of |
Interesting, I'm using neovim and was seeing the problem |
A likely culprit: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873 |
I'm seeing the same problem after upgrading to Linux kernel |
I'm new to using fzf but I believe I am running into the same issue on Linux Mint with kernel Edit: I have fzf installed via Linuxbrew. |
Kernel version updated to |
After doing some research, every time I get |
@vhakulinen this is a benefit of using neovim instead of vim, with neovim when FZF |
|
@vhakulinen your findings are consistent with the ubuntu kernel bug linked above. It mentions:
I see the bug has been marked |
With some trial and error, I've found that this can reliably reproduce the issue: bash -c "sleep 1; bash -c 'echo hello'" | fzf |
For anyone who is as impatient to have this working as I was: I was able to use https://mintguide.org/tools/691-ukuu-ubuntu-kernel-upgrade-utility.html to install a newer kernel and fix this issue. |
@bartels I think they have other status for "Fix released". |
Would that apply for cosmic as well? I would participant if I could get that proposed change. |
@nickgronow It appears that the fix was already released for Cosmic. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1813873/comments/21 |
nice. it works! |
fixed by
|
From Ubuntu's documentation LTS Enablement Stacks, the recommended way to install a hardware enablement stack is as follows: sudo apt install --install-recommends linux-generic-hwe-18.04 I am not convinced that this is a proper solution. Either the kernel developers introduced a necessary change, a bug with an update, or a piece of software (fzf in this case) is using a feature in perhaps the wrong way; remember that kernel developers are very anal when it comes to not breaking userspace. |
I've confirmed that:
uname -a
Linux ICT0115123 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux I've also just spotted that in @junegunn 's comment the status of the bug has been updated to verified. 🎉 |
Updating to the latest on Ubuntu 18.10 fixed it. |
On ubuntu 16.04, I downgrade to linux-image-4.4.0-141 sloved this problem.
|
Is there any fix on ubuntu 16.04 for upgrade kernel - not downgrade? |
@marcinpraczko Yes - see @junegunn 's comment. It'll probably still be in pre-release. You can turn on proposed releases in the Software and Updates > Developer Options (tab) |
I have the same issue on ubuntu $ uname -r I got "Failed to read /dev/tty" in bash.
|
I upgraded to the recently released kernel 4.15.0-46-generic on Ubuntu 18.04 and approve that the regression has been fixed. edit: |
I as well can confirm that upgrading to 4.15.0-46 fixes this regression. |
I just upgraded my Linux kernel to 4.15.0-46 and the vim-fzf issue is fixed for me, but only if I run vim with SHELL set to bash (i.e. I use fish shell, so my SHELL is ordinarily set to When I run vim without setting SHELL in bash, I still see the "Failed to read /dev/tty" message when I run
Is there some way that I can have fzf use bash instead of fish? Some configuration for vim-fzf, maybe? As a workaround, I could alter my EDIT: Worth noting: I have |
I was bitten by this on 14.04 |
Was resolved with patches to the kernel of 18.04. The only version still waiting for the patch is Xenial (looking at the bug report). Actually, shouldn't this issue be closed? It's just waiting on that Ubuntu fix to go in right now. |
I'm still seeing this issue appear sporadically for me. It seems to happen if I use vim-fzf twice in quick succession, i.e.
I'm on Ubuntu 16.04, FWIW. |
For Ubuntu 14.04 with a
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1814647 |
still have same problem on Ubuntu kernel 5.3.0-20-generic and neovim v0.5.0-dev |
I also still have it. |
I also still have it. |
I have the same issue with Ubuntu 20.04 LTS
Update: I actually have it working
to only this line |
You need tmux 3.2 or above to use popups. |
When I use --preview I got the error message: Failed to read /dev/tty
The text was updated successfully, but these errors were encountered: