Brightness hotkeys not seen by kernel on Asus n55s, other hotkeys ok.

Bug #1042359 reported by Stéphane Gourichon
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xserver-xorg-input-evdev (Ubuntu)
Invalid
Low
Unassigned

Bug Description

On an Asus n55sf, there is an issue with the handling of brightness adjust keys.

## Severity: consistent annoyance for the target human user

Rationale:
* On this laptop, the most natural way to set LCD brightness (hotkeys) *seems* to work at first.
* But the user's choice is consistently overriden.
* More precisely: it is overriden whenever, on batteries, there is a pause in keyboard/mouse activity (e.g. when the user reads text on-screen, or comes back to the laptop after a minute).

* Caveat: the problem is *not* the laptop dimming the brightness to save power, this is expected behavior. The problem is, when user provides events again, brightness is not reverted to value set by hotkeys.

## Context

* X session, it can be Unity or other (e.g. xfce), scenario is the same.
* Bug noticeable when running on batteries (due to automatic brightness change on idle).

## Expected behavior

* pressing Fn-F5 and Fn-F6 changes the brightness
* pressing Fn-F5 and Fn-F6 show on-screen notification
* on battery after 30 seconds without key/mouse event, backlight is dimmed. Then, pressing any key or moving mouse restores brigthness at the value set using keys

## Observed behavior

* pressing Fn-F5 and Fn-F6 changes the brightness -> OK
* pressing Fn-F5 and Fn-F6 *does not* show on-screen notification -> minor
* on battery after 30 seconds without key/mouse event, backlight is dimmed. Then, pressing any key or moving mouse restores brigthness at the last value set using software (gnome-control-center, xbacklight, whatever, but *not* the brightness set using keys) -> bad

## Steps to reproduce

* set backlight to 100% (using gnome-control-center or "xbacklight =100" (usage scenario : on AC, need bright display)
* unplug AC power to run on battery
* change brightness using Fn-F5, e.g. some value halfway (usage scenario : now on the move, need to save power)
* count a little more than 30 seconds without touching keyboard/touchpad/mouse, see brightness reduces to minimum
* press e.g. shift, or move mouse or touchpad
* expected : brightness jumps to halfway (set using hotkeys)
* observed : brightness jumps to maximum (set using software)

## Additional information

* Other keys work: sound volume, wifi toggle, touchpad toggle, sound play/pause/previous/next/stop
* Some working keys *do* display OSD feedback (at least volume up/down/mute, touchpad toggle, sound play/pause/previous/next/stop)
* Some working keys do not display OSD feedback (wifi toggle, supend, LCD toggle, LCD/external display toggle)

* On a different laptop, Asus X77VN, brightness keys do show on-screen notification with percentage bar, and the bug is never experienced. Laptop is different model but same brand and software, same packages, same system and user settings (Unity or xfce, same behaviour).

## Interpretation

* Everything seems consistent with the interpretation that although brightness hotkeys do work, Ubuntu is never aware of that. So when Ubuntu changes the brightness, it can not do better than use the value set using software.

## Workaround

* In gnome control center, uncheck "Dim screen to save power". A quick test shows that Ubuntu does not change brightness, so user preference set by hotkey is preserved.

## Other

$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+12ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-30.48-generic 3.2.27
Uname: Linux 3.2.0-30-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,workarounds,scale,expo,ezoom]
CompositorRunning: compiz
Date: Mon Aug 27 19:24:46 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes,
GraphicsCard:
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: ASUSTeK Computer Inc. Device [1043:2050]
 NVIDIA Corporation GF106 [GeForce GT 555M] [10de:1247] (rev ff) (prog-if ff)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120419)
MachineType: ASUSTeK Computer Inc. N55SF
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-30-generic root=UUID=31c3e78d-5937-43bd-b4b2-e14e52d2898c ro quiet splash vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
XorgConf:
 Section "Device"
  Identifier "Default Device"
  Option "NoLogo" "True"
 EndSection
dmi.bios.date: 08/29/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: N55SF.207
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: N55SF
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrN55SF.207:bd08/29/2011:svnASUSTeKComputerInc.:pnN55SF:pvr1.0:rvnASUSTeKComputerInc.:rnN55SF:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: N55SF
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
version.compiz: compiz 1:0.9.7.8-0ubuntu1.4
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.3+8.0.2-0ubuntu3.2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.3+8.0.2-0ubuntu3.2
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1.2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
bugbot (bugbot)
affects: xorg (Ubuntu) → xserver-xorg-input-evdev (Ubuntu)
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

Summary : interestingly, in a bare X session, xev does not react to those hotkeys, while it reacts to other. Does it mean the problem lies at X level ?

## General test

To isolate the problem, I logged in with an empty account running OpenBox only (no full desktop environment) and ran xev.

Here is the complete list of hotkeys I see when pressing special keys and Fn-* combinations, as reported by xev.

$ grep -o 'XF86[^ )]*' /tmp/xevlog.txt | sort | uniq
XF86AudioLowerVolume
XF86AudioMute
XF86AudioNext
XF86AudioPlay
XF86AudioPrev
XF86AudioRaiseVolume
XF86AudioStop
XF86Bluetooth
XF86Calculator
XF86Display
XF86Launch1
XF86Phone
XF86Sleep
XF86TouchpadToggle
XF86WebCam
XF86WLAN

They all occur at expected places, except XF86Phone (Fn-T, without other symbol), XF86Launch1 (Fn-C, symbol like a monitor showing letter S). Also pressing Fn-F2 shows XF86WLAN (expected) but also XF86Bluetooth a few seconds after (expected only XF86WLAN but that's probably a feature).

In bug description you can see which keys does what in regular desktop environment.

## Specific interesting part

Now, something different happens when pressing Fn-F5 (brightness down), Fn-F6 (brightness up) and Fn-F7 (backlight toggle, icon shows screen covered by a big X).

All three keys do change backlight as expected, but :

Fn-F5 (brightness down) cause no event seen by xev
Fn-F6 (brightness up) cause no event seen by xev
Fn-F7 (backlight toggle) causes the events below (it seems to be the only key that provides keycode 253):

KeyPress event, serial 48, synthetic NO, window 0x1600001,
    root 0xca, subw 0x0, time 704540, (23,116), root:(253,574),
    state 0x10, keycode 253 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 48, synthetic NO, window 0x1600001,
    root 0xca, subw 0x0, time 704540, (23,116), root:(253,574),
    state 0x10, keycode 253 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

## Now what ?

Does it mean that these keys are missing at X input driver level ?
I'd be okay to test some fix at the X level, so that this problem gets fixed.

Thanks.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

One more specific information : in bare OpenBox X session, none of these keys have a visible effect handled by Ubuntu, except XF86WLAN.

Also, this laptop was sold with Windows, and there all function keys work, including the brightness keys.

## kernel-level showkey test

I've tried https://wiki.ubuntu.com/Hotkeys/Troubleshooting but it seems outdated.
No gconf-editor, used dconf-editor instead. Tree paths do not exist, /usr/share/doc/udev/README.keymap.txt does not exist.

Anyway, following https://wiki.ubuntu.com/Hotkeys/Architecture I tested showkey.
Fn-* combinations produced scancodes, except for the 3 malfunctioning brightness key combinations.

## acpi-level test

Killing acpid would see it respawned immediately, so I moved the executable away for test.
Suspend button yields acpi events, but not brightness buttons.

$ sudo cat /proc/acpi/event
button/sleep SLPB 00000080 0000000a
battery BAT0 00000081 00000001
ac_adapter AC0 00000080 00000001
button/power PWRB 00000080 00000001

## Now what ?

This suggests that the problem should be fixed at kernel level, but it looks like kernel is never aware about those keypresses.

https://wiki.ubuntu.com/Hotkeys/Troubleshooting says :

> if there is neither an ACPI event nor an input event, this is probably also a kernel bug, though probably harder to diagnose (WMI, perhaps?)

I'm clueless now. Thank you for any hint.

summary: - Partially broken brightness hotkey handling.
+ Brightness hotkeys not seen by kernel on Asus n55s, other hotkeys ok.
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: New → Confirmed
Revision history for this message
ashjas (ashjas) wrote :

This bug also affects me. My notebook is asus N56VJ.After having a look at the problems posted over the forums , i can confirm that this bug affects many models of asus. asus N56VX series and zenbooks too.
Please fix. in the latest kernels,people have reported that the brightness keys are affecting the brightness settins.. but it isnt of much use as the brightness doesnot reduce beyond max and one less than max setting. see this:http://youtu.be/cKn6bnZgRtI

i have ubuntu 13.04 beta with 3.8.0-15-generic kernel.. which has the issue as reported in the above video.

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :
Download full text (5.0 KiB)

Just tried xubuntu 13.10 on the same laptop, keeping 12.10 on its partition to boot on one or another as will.
Xubuntu 13.10 is freshly installed, not much customized but updates applied and rebooted.

Kernel is 3.11.0-12-generic .

lsb_release -rd

Description: Ubuntu 13.10
Release: 13.10

On xubuntu 13.10, things that worked still work (hotkeys, etc), things that were unusual did as on 12.10 (e.g. Fn-F7). The good news is that Fn-F5 and Fn-F6 changed.

The following misbehavior that were true on 12.10 have changed:

> * pressing Fn-F5 and Fn-F6 *does not* show on-screen notification -> minor

Now there *is* an on-screen notification.

> Fn-F5 (brightness down) cause no event seen by xev

Now it causes this:

MappingNotify event, serial 37, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

FocusOut event, serial 37, synthetic NO, window 0x3400001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 37, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 37, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys: 74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

RRNotify event, serial 38, synthetic NO, window 0x3400001,
    subtype XRROutputPropertyChangeNotifyEvent
    output LVDS1, property Backlight, timestamp 848645, state NewValue

> Fn-F6 (brightness up) cause no event seen by xev

Now it causes this:

FocusOut event, serial 41, synthetic NO, window 0x3400001,
    mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 41, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 41, synthetic NO, window 0x3400001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 41, synthetic NO, window 0x0,
    keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
           0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

RRNotify event, serial 41, synthetic NO, window 0x3400001,
    subtype XRROutputPropertyChangeNotifyEvent
    output LVDS1, property Backlight, timestamp 853274, state NewValue

Just in case this difference in behavior could be due to a different set of installed packages, here is the an output on the working Xubuntu 13.10:

LC_ALL=C dpkg -l '*power*'

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================-================-================-===================================================
un gnome-power-manager <none> (no description available)
ii libupower-glib1:amd64 0.9.22-1ubuntu2 amd64 abstraction for power management - shared library
un pm-utils-powersave-poli <none> (no description available)
ii powermgmt-base 1.31build1 amd64 ...

Read more...

Revision history for this message
penalvch (penalvch) wrote :

gouri, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-input-evdev REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-input-evdev (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xserver-xorg-input-evdev (Ubuntu) because there has been no activity for 60 days.]

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Jaime Pérez (jaime-91) wrote :

Same problem with X200la. All other hotkeys work fine.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Expired → New
Revision history for this message
penalvch (penalvch) wrote :

Jaime Pérez, thank you for your comment. So your hardware and problem may be tracked, could you please file a new report by executing the following in a terminal:
ubuntu-bug xorg

Please ensure you have xdiagnose installed, and that you click the Yes button for attaching additional debugging information.

For more on this, please see the official Ubuntu documentation:
Ubuntu X.Org Team, Ubuntu Bug Control, and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Please note, not filing a new report will delay your problem being addressed as quickly as possible.

Thank you for your understanding.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: New → Incomplete
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

@Christopher, yes, you're right to ask Jaime to make a separate bug report. One reason is hardware is different. Another reason is this bug report was for an older release.

> Christopher M. Penalver (penalvch) wrote on 2014-01-09: #7
> gouri, this bug was reported a while ago and there hasn't been any activity

gouri (stephane-gourichon-lpad) wrote on 2013-11-02:

> On xubuntu 13.10, things that worked still work (hotkeys, etc), things that were unusual did as on 12.10 (e.g. Fn-F7).
> The good news is that Fn-F5 and Fn-F6 changed.
> Now there *is* an on-screen notification.

The notification shows that the OS is aware, and indeed xbacklight reports new values.
AFAIK this bug on this specific hardware (Asus N55S) is solved in Ubuntu 13.10, and 14.04.
It's good to close it, right ?

Revision history for this message
penalvch (penalvch) wrote :

gouri, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/1042359/comments/11 regarding this being fixed with an update. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in xserver-xorg-input-evdev (Ubuntu):
status: Incomplete → Invalid
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.