I’m running Manjaro on two different machines. Whenever I attempt to open a root shell using sudo -i, the resulting shell drops most keystrokes – I have to hit the same key two to four times for the character to show up. This occurs using xfce4-terminal, console, and TTY terminals when using xterm.
I’ve never had this issue before on any other distro, whether on these machines or otherwise. I’m not sure how to troubleshoot this – does anyone else have this issue?
Currently running sudo v1.9.13p3 but this has been an ongoing issue.
Assuming your system is fully synced using a current mirror - I suggest you check your locale settings - perhaps the configuration files in your /root home.
I cannot reproduce this using neither xterm nor xfce-terminal - I am fairly confident it is a caused by a local configuration.
As mentioned in my initial post, there are two separate machines (both laptops, of different make and model) that are having this issue.
As far as I can tell, the issue only arises when I sudo into root using a terminal emulator in XFCE. The specific terminal emulator doesn’t seem to matter – I’ve tested xfce4-terminal, gnome-terminal, and terminator. (And tmux.)
When I use a tty to sudo into root or ssh into the machine and sudo into root, the issue goes away. Interestingly, this is the case even if I ssh into localhost.
If I su to another user and then sudo -i, the issue goes away.
I don’t see anything weird in the journal. That was the first thing I checked.
.xsession-errors and Xorg.0.log do not produce any new errors when I sudo into a root shell.
Resource usage is nominal.
There is no .inputrc that I can find.
stty sane and reset have no effect on the issue.
The issue applies to all keys, and appears to be essentially random – for any given keypress there’s a roughly 40% chance the press is recognized. You don’t get the same character repeated 3-5 times once the keypress is finally recognized.
Did it always work this way, or was it after an update, after install of a unique package, or after user customizations?
Assuming:
all machines are current on upgrades
stable branch (pacman-mirrors --get-branch)
there are no outstanding .pacnew files (DIFFPROG=meld pacdiff)
the shell is bash
Does this work:
sudo -i exo-open --launch TerminalEmulator
Could try:
clear ~/.cache directory, logoff/on
Last thoughts,
These two machines, I assume have the same customizations. Usually the way to narrow a problem is to create a new user and add customizations incremently, testing with each change… that may mean logging off/on multiple times. Or going the other direction, slowly remove (via comments) customizations from the current user. This is where a VM comes in handy to do a clean install and test things. Do you have a unique PS1 for root? Perhaps something sent to the terminal, is messing it up.
The only other thing, is there a process that is capturing keystrokes.