Samsung nc20 brightness keys do not send release events

Bug #360247 reported by Barry Carroll on 2009-04-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
linux (Ubuntu)
Manoj Iyer
Manoj Iyer

Bug Description

This bug seems to be common with some of the newer samsung laptops such as the nc10, nc20, q210, q310 etc..
First you add an entry to /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi to allow the nc20 key mapping to take place but then you get the problem where key release events are not generated for the brightness controls (fn button plus arrow up / arrow down).

I have already filed a bug with a patch to enable hal-info to recognise the keycodes for the nc20.

The other half of the fix is to stop the keys from repeating and I followed the example of other patches and tested a kernel that I compiled and it fixed the issue for me.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: linux-image-2.6.28-11-generic 2.6.28-11.41
ProcCmdLine: root=UUID=09dc7cc6-6365-4e34-b5a5-d9fcb999ef3a ro quiet splash
ProcVersionSignature: Ubuntu 2.6.28-11.41-generic
SourcePackage: linux

Barry Carroll (baz8080) wrote :
Changed in linux:
status: Unknown → Confirmed

Hi Barry,

Thanks for writing the patch and additionally escalating this upstream, that's awesome and much appreciated. From the upstream bug report it indeed looks like this'll get merged upstream at which point the Ubuntu kernel team will cherry-pick the patch back into the Ubuntu kernel. The Ubuntu kernel is currently frozen for the upcoming Jaunty release, but I'll go ahead and approve the Jaunty nomination for a stable release update. Thanks.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Manoj Iyer (manjo) on 2009-04-22
Changed in linux (Ubuntu Jaunty):
assignee: nobody → manjo
Manoj Iyer (manjo) wrote :

can you please test the kernel in and report back here ?

Changed in linux (Ubuntu Jaunty):
status: Triaged → Incomplete
Barry Carroll (baz8080) wrote :


I installed the kernel and it works fine. It overwrote the 2.6.28-11-generic one that i had compiled myself. I installed it on Jaunty beta and I can check with the full release when it goes live tomorrow.

The fix also requires that the nc20 model is added to the hal-info configuration files as per the patch in but that fix hasn't been integrated just yet.



Manoj Iyer (manjo) wrote :

submitted sru for jaunty, kindly push patch upstream.

Barry Carroll (baz8080) wrote :

Is that comment directed at me? I'm pretty new to all of this so forgive my newbieness! The last time that I checked the patch has been incorporated into the latest prepatch of 2.6.30:

Thanks, Barry.

Manoj Iyer (manjo) wrote :

SRU justification:

IMPACT: Samsung nc20 brightness keys do not send release events
FIX: patch similar to the one done for NC10 laptops, use dmi_match to call
atkbd_samsung_keymap_fixup for NC20.
TEST: A test kernel from
was tested by the originator of the bug, and verified to fix this problem.

Changed in linux (Ubuntu Jaunty):
status: Incomplete → Fix Committed
Steve Langasek (vorlon) wrote :

Accepted linux into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Barry Carroll (baz8080) wrote :

Thanks, will verify later on today.

Steve Beattie (sbeattie) on 2009-05-01
tags: added: hw-specific
Barry Carroll (baz8080) wrote :

Apologies for the delay, I thought that the update was going to show in update manager. I installed the kernel and headers (2.6.28-12) with apt-get on the terminal just now and I can confirm that the fix is working. Thanks to everyone for your help.

Martin Pitt (pitti) wrote :

I see no reason for the karmic task being "incomplete".

tags: added: verification-done
removed: verification-needed
Changed in linux (Ubuntu):
status: Incomplete → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.28-13.44

linux (2.6.28-13.44) jaunty-proposed; urgency=low

  [ Stefan Bader ]

  * Revert "SAUCE: [jaunty] ALSA: Add retry for Intel8x0 clock measurement"
  * Revert "SAUCE: [jaunty] ALSA: Fix clock and buffer calculations for
  * Revert "SAUCE: [jaunty] ALSA: Fix buffer positions and checks"

linux (2.6.28-12.43) jaunty-proposed; urgency=low

  [ Amit Kucheria ]

  * Enable SYN_COOKIES for iop32x and versatile flavours
    - LP: #361687
  * SAUCE: Quirk for BT USB device on MacbookPro to be reset before use
    - LP: #332443

  [ Brad Figg ]

  * [jaunty] Add missing mvsas (Marvel SAS 6440) module configuration.
    - LP: #352336

  [ Chuck Short ]

  * SAUCE: [USB] Unusual Device support for Gold MP3 Player Energy
    - LP: #125250

  [ Daniel T Chen ]

  * SAUCE: [jaunty] ALSA: Fix buffer positions and checks
    - LP: #345627
  * SAUCE: [jaunty] ALSA: Fix clock and buffer calculations for Intel8x0
    - LP: #345627
  * SAUCE: [jaunty] ALSA: Add retry for Intel8x0 clock measurement
    - LP: #345627

  [ Luke Yelavich ]

  * disable CONFIG_SND_HDA_INPUT_BEEP on amd64 and i386
    - LP: #331589

  [ Makito SHIOKAWA ]

  * [ARM] 5404/1: Fix condition in arm_elf_read_implies_exec() to set
    - LP: #364358

  [ Manoj Iyer ]

  * SAUCE: Added quirk to fix key release for Samsung NC20
    - LP: #360247

  [ Oleg Nesterov ]

  * posix timers: fix RLIMIT_CPU && fork()
    - LP: #361508

  [ Scott James Remnant ]

  * [Config] Disable libusual and the ub driver
    - LP: #364538

  [ Stefan Bader ]

  * Disable unwanted staging builds
    - LP: #366144
  * Remove prism2_usb driver from ubuntu and use the one from staging
    - LP: #325366
  * SAUCE: Make rtl8187se depend on WIRELESS_EXT
    - LP: #366144
  * Disable CONFIG_RTL8187SE for armel.versatile
    - LP: #366144

  [ Tejun Heo ]

  * libata: handle SEMB signature better
    - LP: #257790

  [ Tim Gardner ]

  * Set USB_SERIAL=m for i386/amd64
    - LP: #345002
  * SAUCE: Jaunty - aic79xx - set reset delay to 5 seconds, down from 15.
    - LP: #79542
  * SAUCE: (drop after 2.6.28) Wifi suspend/resume scan timeout fixes
    - LP: #336055
  * Sony laptop: Sony Vaio laptops do not enable wwan power by default.
    - LP: #364678

  [ Tyler Hicks ]

  * SAUCE: (drop after 2.6.28) eCryptfs: Larger buffer for encrypted
    symlink targets
    - LP: #357345

  [ Upstream Kernel Changes ]

  * V4L/DVB (9999): gspca - zc3xx: Webcam 046d:089d added.
    - LP: #326674
  * V4L/DVB (10044): gspca - pac7311: Webcam 093a:2620 added.
    - LP: #363195
  * hwmon: (it87) Add support for the ITE IT8720F
    - LP: #357766
  * vgacon: Return the upper half of 512 character fonts
    - LP: #355057
  * drm/i915: add support for G41 chipset
    - LP: #365958

 -- Stefan Bader <email address hidden> Mon, 25 May 2009 17:30:40 +0200

Changed in linux (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Paul Oranje (por) wrote :

The same problem occurs with the Samsung Q320.

monophase (monophase) wrote :

There is the same problem with the Samsung Q210. Please submit this patch for the q210 too.

feanor (manuel-gaus) wrote :

same problem with Samsung R700 Aura.

I can confirm that the fixes regarding /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi make the hotkeys come to life in Xorg. But I still have problems in fixing the kernel regarding the key release events.

The "forced_release_keys" array in "atkbd_samsung_keymap_fixup" contains scan codes that would be absolutely suitable for the R700 (if these hexadecimal values really represent scancodes with msb set to one (break codes))
The next thing to be done is an entry in "atkbd_dmi_quirk_table[]". I have done that. To reproduce it just copy the entry for the NC20 and set DMI_PRODUCT_NAME to "SR700". That should do the trick, if I am right.

The next step would be to compile the kernel. Now before i do that and take these 4h i could really spend better, i just want to ask: is there an easy way? At least something easier as described in the Kernel/Compile instrcutions? Something that does it by, say: "dpkg-buildpackage" and out comes your kernel .deb, your l-r-m package, and so on? Would be cool :-) -> It also would be cool if the changes to /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi and linux/drivers/input/keyboard/atkbd.c would be in the updates anyway soon. I can upload the files if this is wished.

The next thing to mention is that gnome seems to realize that I press say, the "brightness up"-key, because it displays an osd telling me that brightness goes up... but the screen brightness does not change with my nvidia card.
I have tried smartdimmer -s and that works. How can I get gnome or whatever is responsible for that to use smartdimmer or anything that works?

help would be great :-)


Manuel Gaus

feanor (manuel-gaus) wrote :

got it running here too...

just stopped the whining and compiled/installed the kernel my custom kernel according to the ubuntu kernel/compile howto. That fixed up the repeating keys.

For the backlight problem i wrote a little dbus listener in perl that listens to /org/freedesktop/PowerManagement/Backlight events and sets the brightness appropriately using smartdimmer.

It is probably best, if I attach the files I modified.

feanor (manuel-gaus) wrote :

Full path is /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi

feanor (manuel-gaus) wrote :

I put that to /opt/smartdimmerd
To run it I changed the launcher of gnome-power-manager in gnome autostart to point to /opt/smartdimmerd.
The first time that smartdimmerd tries to establish a dbus connection to the power-managers backlight service will fail, because power-manager does not run yet. But obviously this kicks of the launching of gnome-power-manager, so that the second try connecting to the service succeeds.

This is not really clean, I know, but my knowledge of gnome, hal, dbus and so on is rather shallow, so I am quite satisfied having come so far... brightness adjustment works at least :-)

have fun...

Manuel Gaus

Changed in linux:
status: Confirmed → Fix Released
scottnn (scottnn) wrote :

Does this fix contain a solution for the Q320? If so, will this fix be downloaded during a system update? Sorry for the questions, I'm new to al this...

Jeremy Foshee (jeremyfoshee) wrote :

Setting Fix Committed. Please open new bugs for differing hardware as, even though the behavior may seem the same, on different hardware the fix will be specific to that hardware. Please also attach apport data to any new bug filed.



Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Changed in linux:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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