User avatar
micksulley
Posts: 170
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Very Strange Problem - 's' not working

Sun Dec 01, 2013 12:00 am

I have seen this twice now, the first time with an SD card that was a little suspect and it would not boot at all next time. This time it is on a brand new SanDisk SDHC Ultra 16GB Class 10.

The problem is that I cannot type the letter 's'. I see this when logged on via ssh from my desktop, the 's' key works fine elsewhere. I also see it with a screen and keyboard plugged directly into the Pi. I cannot even cut and paste it in. I have tested all of the other keys, just the 's' that is not working. Even upper case 'S' works!! (pity Linux is case sensitive ;) )

At bootup I do get several (15 or so) messages of the form -
/etc/init.d/triggerhappy:28: /etc/triggerhappy: \e[1~:: not found
where the 28 and the [1 vary between messages.

What can cause this? I have compared it with a running Pi, they both have /etc/init.d/triggerhappy with the same date and size and both have /etc/triggerhappy as a folder empty except for a folder triggers.d which is also empty.

I am running Raspbian installed from NOOBS_v1_3_2

I am happy to investigate further if you can make suggestions, but bear in mind that I cannot type 's' so sudo is out.

Phill Rymer
Posts: 207
Joined: Sun Nov 04, 2012 3:01 am

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 12:39 am

try rasp-config change keyboard layout from usa to uk or uk to usa see if it clears the problem you can switch back easily or try another keyboard may be a sticky key

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 1:38 am

Phill Rymer wrote:try rasp-config change keyboard layout from usa to uk or uk to usa see if it clears the problem you can switch back easily or try another keyboard may be a sticky key
It's difficult to run raspi-config if you can't get a lower case 's'
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Phill Rymer
Posts: 207
Joined: Sun Nov 04, 2012 3:01 am

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 5:37 am

its not on noobs its part of set up for rasbian on first boot just reinstall raspbian it pops up automatically as configure for first time use
Last edited by Phill Rymer on Sun Dec 01, 2013 8:40 am, edited 1 time in total.

Dilligaf
Posts: 283
Joined: Wed May 23, 2012 6:48 pm

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 6:21 am

You can try using autocomplete, type "ra" then the tab key should cycle through all commands that start with ra that are in the path

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 6:47 am

micksulley wrote:I have tested all of the other keys, just the 's' that is not working. Even upper case 'S' works!! (pity Linux is case sensitive ;) )
In that case you may be able to type S, LeftArrow, Alt+L to switch to lower case. You can also run commands such as:

Code: Select all

/u?r/bin/?udo /u?r/bin/ra?pi-config
The problem cannot be the keyboard layout, because there are none with just 's' missing, and because the keyboard layout only affects the console, not SSH. It may be possible to accidentally bind 's' to something in triggerhappy, but again that would only affect the local USB keyboard, not remote SSH connections or cut and paste.

One way that you could accidentally disable 's' at the bash prompt is by adding something like "s: abort" to /etc/inputrc or ~/.inputrc, or "bind s:abort" to bashrc or profile. To check this:

Code: Select all

pi@raspberrypi ~ $ bind -p |grep $'\042\163\042'
"s": self-insert
At bootup I do get several (15 or so) messages of the form -
/etc/init.d/triggerhappy:28: /etc/triggerhappy: \e[1~:: not found
where the 28 and the [1 vary between messages.
This suggests that dash tried to execute as a shell script a file containing lines such as:

Code: Select all

"\e[1~": something
However, it is not clear how, since /etc/triggerhappy is a directory and you have checked /etc/init.d/triggerhappy. Worth noting that "\e" is inputrc syntax, not triggerhappy syntax.

User avatar
micksulley
Posts: 170
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 10:03 am

A bit more info, I just logged in via ssh from my laptop and created a file called xx which contained a string of sssssss

Code: Select all

control@pi-a ~ $ nano xx
control@pi-a ~ $ cat xx
sssssss
control@pi-a ~ $ 
So it can display 's' but typing 's' generates a beep but no character

Confused :!:

User avatar
micksulley
Posts: 170
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 10:13 am

jojopi wrote:
micksulley wrote:I have tested all of the other keys, just the 's' that is not working. Even upper case 'S' works!! (pity Linux is case sensitive ;) )
In that case you may be able to type S, LeftArrow, Alt+L to switch to lower case. You can also run commands such as:

Code: Select all

/u?r/bin/?udo /u?r/bin/ra?pi-config
The problem cannot be the keyboard layout, because there are none with just 's' missing, and because the keyboard layout only affects the console, not SSH. It may be possible to accidentally bind 's' to something in triggerhappy, but again that would only affect the local USB keyboard, not remote SSH connections or cut and paste.

One way that you could accidentally disable 's' at the bash prompt is by adding something like "s: abort" to /etc/inputrc or ~/.inputrc, or "bind s:abort" to bashrc or profile. To check this:

Code: Select all

pi@raspberrypi ~ $ bind -p |grep $'\042\163\042'
"s": self-insert
At bootup I do get several (15 or so) messages of the form -
/etc/init.d/triggerhappy:28: /etc/triggerhappy: \e[1~:: not found
where the 28 and the [1 vary between messages.
This suggests that dash tried to execute as a shell script a file containing lines such as:

Code: Select all

"\e[1~": something
However, it is not clear how, since /etc/triggerhappy is a directory and you have checked /etc/init.d/triggerhappy. Worth noting that "\e" is inputrc syntax, not triggerhappy syntax.
Just tried 'S left arrow Alt l' and yes that works, so I can now enter lower case s to make more investigations

bind -p |grep $'\042\163\042'
returns nothing

User avatar
micksulley
Posts: 170
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 11:57 am

Bit more info, I have run bind -p on both Pi's, most entries are the same but the following are missing from the problem Pi -
\e\e[D: backward-word
\e[1;5D: backward-word
\e[5D: backward-word
\e[1~: beginning-of-line
\e[4~: end-of-line
\e\e[C: forward-word
\e[1;5C: forward-word
\e[5C: forward-word
\e[2~: quoted-insert

Do I need to add these, if so how do I do it?
Mick

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 12:16 pm

Those nine missing bindings are exactly the ones that are normally set in /etc/inputrc, to add to the default bindings compiled into readline.

So this could be consistent with replacing all of /etc/inputrc with just "s:", or with creating ~/.inputrc containing just "s:", which also causes /etc/inputrc to be ignored for that user.

User avatar
micksulley
Posts: 170
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: Very Strange Problem - 's' not working

Sun Dec 01, 2013 12:53 pm

I checked /etc/inputrc on both Pi's, the problem Pi was just a couple of lines, the good one was much bigger. I copied the good one across, rebooted and it seems fine now.

Is there any point trying to find out why it happened, or should I put it down to 'just one of those things' and move on?

Thanks for your help
Mick

Return to “Troubleshooting”