Samsung Chromebook: Multimedia keys act as F-Keys and produce no scan code

Bug #1248808 reported by Hans-Christoph Steiner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I've got XUbuntu/saucy on this US$250 Samsung Chromebook 5. It runs very well, it just had a couple of minor issues that need to be fixed and it'll be an awesome little Ubuntu laptop with a regular Ubuntu install!

The volume and brightness keys don't work. When I checked them out using xev, they were returning F keys:

F1 - back (i.e. like in a browser)
F2 - forward
F3 - refresh
F4 - fullscreen
F5 - switch screen mode
F6 - brightness down
F7 - brightness up
F8 - mute
F9 - volume down
F10 - volume up

I'm happy to try my hand at fixing it, but the documentation in https://wiki.ubuntu.com/Hotkeys/Troubleshooting pointed towards a non-existent file for directions on the next steps: /usr/share/doc/udev/README.keymap.txt

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: udev 204-0ubuntu19
Uname: Linux 3.4.0-5-chromebook armv7l
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: armhf
CustomUdevRuleFiles: 99-hide-disks.rules
Date: Wed Nov 6 22:32:06 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 SHELL=/bin/bash
ProcKernelCmdLine: cros_secure console= console=tty1 debug verbose root=/dev/mmcblk1p7 rootwait rw lsm.module_locking=0
SourcePackage: systemd
UpgradeStatus: Upgraded to saucy on 2013-10-24 (13 days ago)

Revision history for this message
Hans-Christoph Steiner (eighthave) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please install the "evtest" package, run "sudo evtest", and select the device which represents your keyboard? Then you can press the Fn keys and check which of them have a wrong KEY_* code. Please note down the scan code, current, and intended key code.

 For example,

Event: time 1384346796.203894, type 4 (EV_MSC), code 4 (MSC_SCAN), value 06
Event: time 1384346796.203894, type 1 (EV_KEY), code 227 (KEY_SWITCHVIDEOMODE), value 0

This is scan code 4 (from "code 4 (MSC_SCAN)"), and key code "SWITCHVIDEOMODE". With the updated map that you provide I can fix udev's keymaps.

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

I updated https://wiki.ubuntu.com/Hotkeys/Troubleshooting to use evtest, thanks for pointing out.

summary: - volume and brightness keys are mismapped on Samsung Chromebook
+ [keymap] volume and brightness keys on Samsung Chromebook
Revision history for this message
Martin Pitt (pitti) wrote : Re: [keymap] volume and brightness keys on Samsung Chromebook

Or do you mean that pressing e. g. "F8" is not actually yielding "F8" but some special funtion like "projector" or "brightness"? Some laptops require pressing Fn+F8 to get the actual F8, and the simple "F8" is a hotkey. This often can be switched around in the BIOS, though.

Revision history for this message
Hans-Christoph Steiner (eighthave) wrote :

I'll run evtest when I get home today and report back. I attached an image of the keyboard for reference. You can see that the top row of keys are labeled like media keys, etc. There is no Fn key on it as far as I can tell. When I press any of the top row of keys, they send F-key key codes, so pressing Volume-Up sends an F10 for example. Also, being an ARM-based computer, it doesn't seem to have a PC-style BIOS at all.

Revision history for this message
Hans-Christoph Steiner (eighthave) wrote :
Download full text (11.8 KiB)

Here is the evtest transcript of my session of pressing the keys on the top row of the Chromebook, starting with the Left-Arrow key, which is just to the right of the Esc key:

$ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: chromeos-ec
/dev/input/event1: DAISY-I2S HDMI Jack
/dev/input/event2: DAISY-I2S Headphone Jack
/dev/input/event3: DAISY-I2S Mic Jack
/dev/input/event4: gpio-keys.8
/dev/input/event5: Cypress APA Trackpad (cyapa)
/dev/input/event6: Logitech Inc. iFeel Mouse
Select the device event number [0-6]: 0
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x1
Input device name: "chromeos-ec"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 1 (KEY_ESC)
    Event code 2 (KEY_1)
    Event code 3 (KEY_2)
    Event code 4 (KEY_3)
    Event code 5 (KEY_4)
    Event code 6 (KEY_5)
    Event code 7 (KEY_6)
    Event code 8 (KEY_7)
    Event code 9 (KEY_8)
    Event code 10 (KEY_9)
    Event code 11 (KEY_0)
    Event code 12 (KEY_MINUS)
    Event code 13 (KEY_EQUAL)
    Event code 14 (KEY_BACKSPACE)
    Event code 15 (KEY_TAB)
    Event code 16 (KEY_Q)
    Event code 17 (KEY_W)
    Event code 18 (KEY_E)
    Event code 19 (KEY_R)
    Event code 20 (KEY_T)
    Event code 21 (KEY_Y)
    Event code 22 (KEY_U)
    Event code 23 (KEY_I)
    Event code 24 (KEY_O)
    Event code 25 (KEY_P)
    Event code 26 (KEY_LEFTBRACE)
    Event code 27 (KEY_RIGHTBRACE)
    Event code 28 (KEY_ENTER)
    Event code 29 (KEY_LEFTCTRL)
    Event code 30 (KEY_A)
    Event code 31 (KEY_S)
    Event code 32 (KEY_D)
    Event code 33 (KEY_F)
    Event code 34 (KEY_G)
    Event code 35 (KEY_H)
    Event code 36 (KEY_J)
    Event code 37 (KEY_K)
    Event code 38 (KEY_L)
    Event code 39 (KEY_SEMICOLON)
    Event code 40 (KEY_APOSTROPHE)
    Event code 41 (KEY_GRAVE)
    Event code 42 (KEY_LEFTSHIFT)
    Event code 43 (KEY_BACKSLASH)
    Event code 44 (KEY_Z)
    Event code 45 (KEY_X)
    Event code 46 (KEY_C)
    Event code 47 (KEY_V)
    Event code 48 (KEY_B)
    Event code 49 (KEY_N)
    Event code 50 (KEY_M)
    Event code 51 (KEY_COMMA)
    Event code 52 (KEY_DOT)
    Event code 53 (KEY_SLASH)
    Event code 54 (KEY_RIGHTSHIFT)
    Event code 55 (KEY_KPASTERISK)
    Event code 56 (KEY_LEFTALT)
    Event code 57 (KEY_SPACE)
    Event code 58 (KEY_CAPSLOCK)
    Event code 59 (KEY_F1)
    Event code 60 (KEY_F2)
    Event code 61 (KEY_F3)
    Event code 62 (KEY_F4)
    Event code 63 (KEY_F5)
    Event code 64 (KEY_F6)
    Event code 65 (KEY_F7)
    Event code 66 (KEY_F8)
    Event code 67 (KEY_F9)
    Event code 68 (KEY_F10)
    Event code 69 (KEY_NUMLOCK)
    Event code 70 (KEY_SCROLLLOCK)
    Event code 71 (KEY_KP7)
    Event code 72 (KEY_KP8)
    Event code 73 (KEY_KP9)
    Event code 74 (KEY_KPMINUS)
    Event code 75 (KEY_KP4)
    Event code 76 (KEY_KP5)
    Event code 77 (KEY_KP6)
    Event code 78 (KEY_KPPLUS)
    Event code 79 (KEY_KP1)
    Event code 80 (KEY_KP2)
    Event code 81 (KEY_KP3)
    Event code 82 (KEY_KP0)
    Event code 83 (KEY_KPDOT)
    Event code 84 (?)
    Event code 85 (KEY_ZENKAKUHANKAKU)
    Event code 86 (...

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks; seems the chromebook kernel keyboard driver isn't sending scan codes along, but the actual key codes seem correct (F1 to F10) *if* they are actually F keys. If they are supposed to do something else, then the kernel needs to be fixed first to report proper scan codes.

Revision history for this message
Hans-Christoph Steiner (eighthave) wrote :

The keys are in the position of F keys but are not at all labeled as F keys. They are all labeled as media keys, basically. I'm not sure what the official definition of F keys are, but I do know that users of this laptop will not expect them to type F keys, but instead control the volume, brightness, etc. You can see them in the attached image above:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1248808/+attachment/3908100/+files/samsung-chromebook-series-3-xe303c12-keyboard.jpg

For an exampe, the Acer C720 Chromebook has the same row of media keys on the top, and reviews say that everything works with Ubuntu.

I just found out that this laptop was the #1 selling laptop on Amazon in 2013:
http://www.amazon.com/Best-Sellers-Computers-Accessories-Laptop/zgbs/pc/565108

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks; reassigning to the kernel then, as the keyboard driver must produce scan codes, otherwise we can't reassign their meaning. Of course, while doing that it could also just produce correct key codes :-)

affects: systemd (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
summary: - [keymap] volume and brightness keys on Samsung Chromebook
+ Samsung Chromebook: Multimedia keys act as F-Keys and produce no scan
+ code
Changed in linux (Ubuntu):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.