Samsung N120 Brightness controls don't work (Jaunty+Karmic)

Bug #429351 reported by Fabián Rodríguez on 2009-09-14
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
hal-info (Ubuntu)
Undecided
Unassigned
Nominated for Jaunty by Xavier Gnata
Nominated for Karmic by Xavier Gnata
Nominated for Lucid by Xavier Gnata
Nominated for Maverick by Xavier Gnata

Bug Description

Binary package hint: hal-info

Brightness control keys on a Samsung N120 netbook are not recognized and can't be used to control brightness.
Those are the up & down cursor keys (FN+UP and FN+DOWN).

I am using Jaunty (lpia kernel) with -proposed updates.

dmesg reports:
[ 341.102441] atkbd.c: Unknown key pressed (translated set 2, code 0x89 on isa0060/serio0).
[ 341.102458] atkbd.c: Use 'setkeycodes e009 <keycode>' to make it known.
[ 341.274301] atkbd.c: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
[ 341.274318] atkbd.c: Use 'setkeycodes e008 <keycode>' to make it known.

It seems the N120's hardware description in /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi, even adding it didn't resolve this problem for me.

There are other similar bugs related to brightness control keys on Samsung systems:
Bug #359814 - Samsung nc20 brightness keys do not work

input-event returns the following ("#" prefixed comments mine0
iz@lilo:~$ sudo input-events /dev/input/event0
[sudo] password for iz:
/dev/input/event0
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43841
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
08:39:35.153551: EV_MSC code=4 value=136 # FN+UP
08:39:35.153610: EV_SYN code=0 value=0
08:39:36.019309: EV_MSC code=4 value=137 #FN + DOWN
08:39:36.019371: EV_SYN code=0 value=0

Fabián Rodríguez (magicfab) wrote :
Fabián Rodríguez (magicfab) wrote :

Also see Bug #333352 - Samsung Q210 brightness keys do not work. Updating bugs descriptions directly doesn't seem to work ("Entity-body was not a well-formed JSON document.").

Fabián Rodríguez (magicfab) wrote :

Keep in mind this system BIOS has a "Brightness Mode Control" set to "Auto" under the "Boot" menu. Setting it to "User Control" makes the FN+UP/DOWN keys work at boot time.

Architecture: lpia
Dependencies:

DistroRelease: Ubuntu 9.10
Package: hal-info 20090716-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 LANG=fr_CA.UTF-8
 LANGUAGE=fr_CA.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-10.34-lpia
Uname: Linux 2.6.31-10-lpia i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

tags: added: apport-collected

I've upgrade to Karmic and the same problem persists.

Architecture: lpia
Dependencies:

DistroRelease: Ubuntu 9.10
Package: hal-info 20090716-0ubuntu1
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 LANGUAGE=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-11.38-lpia
Uname: Linux 2.6.31-11-lpia i686
UserGroups: adm admin audio cdrom dialout dip fax fuse lpadmin netdev plugdev sambashare tape vboxusers video
XsessionErrors:
 (gnome-settings-daemon:3010): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:3010): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (nautilus:3179): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (polkit-gnome-authentication-agent-1:3212): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (gnome-panel:3129): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -1 and height 24

summary: - Samsung N120 Brightness controls don't work (Jaunty)
+ Samsung N120 Brightness controls don't work (Jaunty+Karmic)

Hi, fresh install on X420 has the same problem, probably the same hardware. Haven't checked that.

Sonsum (scottonsum) wrote :

I have this too on a fully updated Karmic on a Samsung n120

nukul (nukulorrr) wrote :

I have the same problem as Felipe De la Puente. I already compiled Kernel 2.6.33-rc3 and tried that, but to no avail.
There is a new module in that kernel version, "samsung-laptop", which is supposed to fix exactly this problem.
I did an insmod on it with force=1:
sudo insmod samsung-laptop.ko force=1
and it returned: This computer does not support SABI.
I don't know what to do now. I have time until Friday (Jan. 15, 2010) to give back the laptop to the store if I don't get it to work, so I'd like to have fixed it until then^^ If I can provide further information on the problem, just tell me, I'll be glad!

Hulin (hulin-thibaud-gmail) wrote :

Hi,

I've the same probleme, however I resolved it with a bash script.
The command "sudo setpci -s 00:02.1 F4.B=n"
with n= a number from 5 to 100, adjust the luminosity.
I created a shortkey in preferences of gnome to execute a short script with shift / top arrow or shift / down arrow. These bash script increase or decrease the value record in a file with these inscrution.

Regards,
Thibaud.

Fortunato Ventre (voria) wrote :

I've built a .deb package for the latest stable kernel, containing the kernel module written by Greg Kroah-Hartman (http://github.com/gregkh/samsung-backlight), which enables backlight control on various Samsung netbooks, when KMS is enabled.

It's called 'nc10-backlight' and it's available on my repository for the 'Linux On My Samsung' project:
https://launchpad.net/~voria/+archive/ppa

Fabián Rodríguez (magicfab) wrote :

@Hulin, would you share/attach such scripts ?
@Fortunate, thank you, I'll be testing that shortly, I hope other with the same system do the same :)

Fabián Rodríguez (magicfab) wrote :

Sorry, meant to write Fortunato.

Sonsum (scottonsum) wrote :

@Fortunato, I installed your .deb "nc10-backlight" package on my Samsung N120. The first thing I noticed was my screen is so much brighter on the first boot. The brightness function keys do not work out-of-the-box, but the brightness panel applet now works. Thanks a lot, this is very much appreciated!

Fortunato Ventre (voria) wrote :

To enable the FN keys, you need to edit the file '/lib/udev/rules.d/95-keymap.rules', search for the string 'NC10', then add your model to the list of Samsung models.

In other words, modify the line:
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*NC20*|*SP55S*|..."
in:
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*NC20*|*N120*|*SP55S*|..."

If after a reboot you notice that some FN keys are stucked and don't get released after they are used, this means the kernel needs to be patched for proper support, like for other Samsung models.
Let me know if this is the case: since I'm already building a patched kernel for other models, I can easily add support for the N120 too.

Hulin (hulin-thibaud-gmail) wrote :

That's my script 'lumino' :
#!/bin/bash
file=$HOME/lumino
med=40
if [ -f $file ]
then
        l=$(cat $file)
else
        echo $med > $file
        l=$med
fi

case "$1" in
"+")
        l=$(( $l + 5 ))
        [ $l -gt 95 ] && l=95
        ;;
"-")
        l=$(( $l - 5 ))
        [ $l -lt 5 ] && l=5
        ;;
esac
echo $l
sudo setpci -s 00:02.1 F4.B=$l
echo $l > $file

Before to execute it, modify the /etc/sudoers file with sudo visudo and add (or modify) this line :
user user-samsung140 = NOPASSWD: /usr/bin/setpci
Use the good name user and the good machine name.
This is for don't request the password for root.

I will try the solution of Fortunato.

Fabián Rodríguez (magicfab) wrote :

Well this is interesting. I installed Fortunato's package and the brightness panel applet now works. I also modified the file and the FN+up / down keys for brightness control don't work, however ALT+up / down now control brightness (!). I removed the PPA as other packages risked being upgraded.

Fortunato Ventre (voria) wrote :

That's really odd.
Are the Fn+up and Fn+down keys recognized by using the 'xev' command line utility?

Martti Kauppinen (marttikoo) wrote :

Hi,

I installed your backlight package and modified 95-keymap.rules file. Now I have stuck FN key issue as you predicted might happen. Not big problem, but would be nice to have it solved. Hows your kernel patching going? Im using N120 and 9.10 netbook remix.

Thanks

Fortunato Ventre (voria) wrote :

Sorry for the late answer, but I was no more subscribed to this bug.

You can find fixed kernel and udev packages on my repository (link below), for both karmic and lucid.
They fix the FN keys release on these samsung models:
N120, N128, N130, N140, N148/N208, NB30, N150/N210/N220, N220, N310,
N510, Q310, R428/P428, R518, R519/R719, R528/R728, R560, R59P/R60P/R61P,
SR58P, SR700, SX22S, X118, X120.

https://launchpad.net/~voria/+archive/ppa

Fabián Rodríguez (magicfab) wrote :

I've now upgraded this system to Ubuntu 10.04LTS and this problem persists. Fortunato, have you considered submitting your fixes to the main Linux kernel ?

Is there a plan to merge these fixes and the samsung-backlight/tools/wireless into ubuntu 10.10 mainline?
Things like "backlight control" should really work out of the box on 10.10.

Sonsum (scottonsum) wrote :

@Xavier - Have you tried 10.10 yet? Because I believe they do work out of the box.

With the current daily-live of Kubuntu (http://cdimage.ubuntu.com/kubuntu/daily-live/current/ ) the Brightness controls do not work on a N210. You do see the brightness pop-up when you press the brightness keys but the brightness does not change (and the pop-up shows always minimum brightness).

I'm going to try ubuntu 10.10 to know if it is a Kubuntu specific bug or not...

Same issue on ubuntu 10.10 daily-live : the Brightness controls do not work on a N210.
I don't know if it's a udev rules issues or something at higher level but it should be easy to figure out (I'm going to investigate....)

Changed in hal-info (Ubuntu):
status: New → Confirmed

Shouldn't this be posted as a different bug? 10.10 seems to be working
for me with my N120, which the original bug was about.

Shouldn't you make a new one for the n210?

Because this one seems solved.

I think it would be better for everyone if you made a new one,
generically for samsung laptops (instead of just the n120) and for
Maverick and Lucid instead of Jaunty and Karmic.

2010/9/22 Xavier Gnata <email address hidden>:
> ** Changed in: hal-info (Ubuntu)
>       Status: New => Confirmed
>
> --
> Samsung N120 Brightness controls don't work (Jaunty+Karmic)
> https://bugs.launchpad.net/bugs/429351
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “hal-info” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: hal-info
>
> Brightness control keys on a Samsung N120 netbook are not recognized and can't be used to control brightness.
> Those are the up & down cursor keys (FN+UP and FN+DOWN).
>
> I am using Jaunty (lpia kernel) with -proposed updates.
>
> dmesg reports:
> [  341.102441] atkbd.c: Unknown key pressed (translated set 2, code 0x89 on isa0060/serio0).
> [  341.102458] atkbd.c: Use 'setkeycodes e009 <keycode>' to make it known.
> [  341.274301] atkbd.c: Unknown key pressed (translated set 2, code 0x88 on isa0060/serio0).
> [  341.274318] atkbd.c: Use 'setkeycodes e008 <keycode>' to make it known.
>
> It seems the N120's hardware description in /usr/share/hal/fdi/information/10freedesktop/30-keymap-misc.fdi, even adding it didn't resolve this problem for me.
>
> There are other similar bugs related to brightness control keys on Samsung systems:
> Bug #359814 - Samsung nc20 brightness keys do not work
>
> input-event returns the following ("#" prefixed comments mine0
> iz@lilo:~$ sudo input-events /dev/input/event0
> [sudo] password for iz:
> /dev/input/event0
>   bustype : BUS_I8042
>   vendor  : 0x1
>   product : 0x1
>   version : 43841
>   name    : "AT Translated Set 2 keyboard"
>   phys    : "isa0060/serio0/input0"
>   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP
>
> waiting for events
> 08:39:35.153551: EV_MSC code=4 value=136 # FN+UP
> 08:39:35.153610: EV_SYN code=0 value=0
> 08:39:36.019309: EV_MSC code=4 value=137 #FN + DOWN
> 08:39:36.019371: EV_SYN code=0 value=0
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/ubuntu/+source/hal-info/+bug/429351/+subscribe
>

Changed in hal-info (Ubuntu):
status: Confirmed → Fix Released
Albert I (albert-teixidor) wrote :

With upgrade to 10.10 the Brightness controls do not work on my N120
Now i work with the patch
.

fai (cmf-flamel) on 2010-11-11
Changed in hal-info (Ubuntu):
assignee: nobody → fai (cmf-flamel)
fai (cmf-flamel) on 2010-11-11
Changed in hal-info (Ubuntu):
assignee: fai (cmf-flamel) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers