Bug 772997

Summary: Hotkeys on Toshiba P855-S5200 are wrongly mapped, e.g. F3 puts computer to sleep
Product: [openSUSE] openSUSE 12.2 Reporter: Foolish Ewe <foolishewe>
Component: BasesystemAssignee: Joey Lee <jlee>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None    
Version: RC 1   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Foolish Ewe 2012-07-25 12:40:41 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0.1

This is a follow up to Bug 772646, on my Toshiba P855-S5200 using the 12.2-RC1 KDE Live CD (x86-64) I've confirmed that F3 performs a suspend to RAM.  Please note that this does not happen in Windows 7, so the F3 key is unlikely to be hardwired to trigger the suspend to RAM (rather it is the increase screen brightness).

I did not have network access when I tried it, so I don't have a dmesg log, and I'm not sure which component is responsible.

Reproducible: Always

Steps to Reproduce:
1.Boot KDE Live 12.2 RC-1 x86-64 cd
2.wait for kde to be running
3.hit F3
Actual Results:  
Machine goes to sleep

Expected Results:  
Normal F3 functionality in KDE (e.g. if searching, it should repeat the search from the current position to find the next instance of the substring).
Comment 1 Joey Lee 2012-07-26 02:13:07 UTC
For normal behavior, you should press Fn+F3 for launch suspend or increase screen brightness, dependent on the function key definition with your machine.

On some notebook, there have BIOS option to define function key like "F3 = Fn+F3", and "Fn+F3 = F3", please check your BIOS have any option relate to function key behavior.

If not, please Use root account to run:
   #showkey

Then report what did you see when you press F3 key.
Comment 2 Foolish Ewe 2012-07-26 15:51:46 UTC
You were right about there being a bios setting called "special fn key" so that it treated the keys as if fn was pressed by default.  I switched it to "standard fn key" which appears to have improved the behavior in 12.1 tumbleweed that I'm currently running.  I'll need to boot of the 12.2 cd when I get home (I don't have it here).  Interestingly under Windows 7 and on the keycap the F3 key appears to be labeled as the increase screen brightness key, but under openSuse it is treated as the suspend key.
Comment 3 Foolish Ewe 2012-07-27 01:07:58 UTC
I got home and booted from the 12.2-RC1 KDE Live CD for x86-64.
Please recall that the BIOS setting was adjusted so the "standard key codes" is selected rather than the setting for "special key codes" which was in place when I filed this bug.

The first key press is F3, the second key press if FN+F3.  The second key press put the machine to sleep (i.e. suspend to RAM).

linux@linux:~> showkey
Couldn't get a file descriptor referring to the console
linux@linux:~> sudo showkey

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

kb mode was ?UNKNOWN?
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

press any key (program terminates 10s after last keypress)...

keycode  61 press
keycode  61 release
keycode 142 press
keycode 142 release
linux@linux:~> 
linux@linux:~> showkey
Comment 4 Joey Lee 2012-07-27 05:42:56 UTC
(In reply to comment #3)
> I got home and booted from the 12.2-RC1 KDE Live CD for x86-64.
> Please recall that the BIOS setting was adjusted so the "standard key codes" is
> selected rather than the setting for "special key codes" which was in place
> when I filed this bug.
> 
> The first key press is F3, the second key press if FN+F3.  The second key press
> put the machine to sleep (i.e. suspend to RAM).
> 
> linux@linux:~> showkey
> Couldn't get a file descriptor referring to the console
> linux@linux:~> sudo showkey
> 
> We trust you have received the usual lecture from the local System
> Administrator. It usually boils down to these three things:
> 
>     #1) Respect the privacy of others.
>     #2) Think before you type.
>     #3) With great power comes great responsibility.
> 
> kb mode was ?UNKNOWN?
> [ if you are trying this under X, it might not work
> since the X server is also reading /dev/console ]
> 
> press any key (program terminates 10s after last keypress)...
> 
> keycode  61 press
> keycode  61 release
> keycode 142 press
> keycode 142 release
> linux@linux:~> 
> linux@linux:~> showkey

Per showkey result, keycode on you machine is make sense now:

All keycode definition is in linux/input.h in Linux kernel:

#define KEY_F3                  61
#define KEY_SLEEP               142     /* SC System Sleep */

So, 61 is F3, 142 is KEY_SLEEP.


Do you think the BIOS option solve your issue?
Comment 5 Foolish Ewe 2012-07-27 14:48:49 UTC
The behavior is definitely better after the BIOS option was adjusted.
For the purposes of the fix, I think this is good enough, we should close this,
and the 12.1 variant of this bug, Bug 772646.

Thanks for your help.

On a side note, I have not yet identified all the keys, but FN+FX where x = 1..12
do not contain any key that maps to.  However the laptop's power button does the job.

#define KEY_WAKEUP              143     /* System Wake Up */
Comment 6 Foolish Ewe 2012-07-27 14:51:09 UTC
The previous message was garbled.  I was trying to say FX+FN where x is in 1..12 does not resolve to KEY_WAKEUP. I'll have to see if I can figure out the key mappings.  Is there a system utility that will dump the key map or should I use showkey to try every key combination?
Comment 7 Joey Lee 2012-07-30 09:16:18 UTC
(In reply to comment #6)
> The previous message was garbled.  I was trying to say FX+FN where x is in
> 1..12 does not resolve to KEY_WAKEUP. I'll have to see if I can figure out the
> key mappings.  Is there a system utility that will dump the key map or should I
> use showkey to try every key combination?

Yes, you need use showkey and press all Fn key.
Comment 8 Joey Lee 2012-07-30 09:18:21 UTC
Thanks for Follish's report, set this bug to INVALID because it causes by BIOS configuration.

Please feel free file any other bug if found.