make wireless led work with asus-laptop (the new module)

Bug #189889 reported by Nicolò Chieffo
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: acpi-support

attaching a patch to acpi-support that makes wifi led synced in hardy, which is using the new asus-laptop module

Tags: regression

Related branches

Revision history for this message
Nicolò Chieffo (yelo3) wrote :
Revision history for this message
Daniel Holbach (dholbach) wrote :

To get your fix included in Ubuntu, try transforming it into a debdiff (http://wiki.ubuntu.com/PackagingGuide/Recipes/Debdiff) and submitting it for review (http://wiki.ubuntu.com/SponsorshipProcess).

Changed in acpi-support:
status: New → Incomplete
Revision history for this message
Nicolò Chieffo (yelo3) wrote : Re: [Bug 189889] Re: make wireless led work with asus-laptop (the new module)

I'm sorry, this patch is too simple (it just adds a row to a file) I
don't think it is worth that I create a debdiff...
I have sent patches to other bugs too, but noone asked for a
debdiff... anyway I'll have a look

Daniel Hahler (blueyed)
Changed in acpi-support:
assignee: nobody → blueyed
status: Incomplete → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

The patch/fix has been included in the debdiff at bug 193842, and is waiting for sponsorship.

Changed in acpi-support:
assignee: blueyed → nobody
importance: Undecided → Low
status: In Progress → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.106

---------------
acpi-support (0.106) hardy; urgency=low

  * Cherrypicked bugfix patches from Launchpad (LP: #193842)
  * lib/state-funcs: make wireless led work with asus-laptop (the new module);
    patch from Nicolò Chieffo (LP: #189889)
  * Add events/asus-video to support asus switch video hotkey; patch from
    Nicolò Chieffo (LP: #138228)
  * events/asus-wireless-2, asus-wireless-2.sh:
    Support Fn+F2 on Asus A8Js; patch from Matteo Collina (LP: #105929)
  * Fix the value range in sonybright.sh (0-7 instead of 1-8); patch from unggnu
    (LP: #136380)
  * "lib/FUJITSU SIEMENS.config":
    - Enable suspend for Fujitsu-Siemens C1110 (LP: #52970)
    - Enable STR for Fujitsu-Siemens Lifebook S7020, S7110
  * resume.d/50-time.sh, suspend.d/88-time.sh:
    Fix handling of hardware clock before/after suspend; patch from Rodrigo
    Novo (LP: #36815)
  * events/asus-*: Fix event key names for ASUS (HOTK); patch from
    Jeroen van der Vegt (LP: #25784)
  * Fix names in comments for events/panasonic-{mute,volume-down,volume-up}
  * debian/rules, README.toshiba: Drop toshiba_acpi.modprobe, which only
    contained an invalid/obsolete option "hotkeys_over_acpi" (LP: #180678)
  * debian/control: Standards-Version 3.7.3
  * Drop thinkpad_acpi.modprobe: the workarounds therein are not needed for
    thinkpad_acpi in Hardy anymore; investigations by Jerone Young (LP: #194679)
  * Add events/lenovo-eject to handle the Thinkpad eject button (Fn+F9); patch
    from Jerone Young (LP: #194609)

 -- Daniel Hahler <email address hidden> Thu, 06 Mar 2008 02:15:54 +0100

Changed in acpi-support:
status: Triaged → Fix Released
Revision history for this message
Silvio (winky) wrote :

herm. today the automatic updater updated on my 64Bit hardy this fix.
actually my led was properly working and stopped working after apply this fix.
my laptop is Asus pro57 (alias M51 series) santarosa+T9300
Now led is not working on this model wile b4 wase working good

apologize for my broken english

take care
ciao

Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-opening.
Nicolò, do you have any idea what may be wrong?

Changed in acpi-support:
importance: Low → Medium
status: Fix Released → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

Silvio, do both of those commands toggle the led for you, maybe?
    test -w /proc/acpi/asus/wled && echo -n "$action" > /proc/acpi/asus/wled
    test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan

You can enter them in a console, after "sudo -i", to open a root shell.

Revision history for this message
Silvio (winky) wrote :

Daniel, none of them sorted any effect.

I removed from /usr/share/acpi-support/state-funcs the above few new lines and led now is alive again and perfectly working.

# Pass '1' to light LED and '0' to dark LED
# setLEDAsusWireless()
# {
# action=`test "$1" -ne 0 && echo 1 || echo 0`
# test -w /proc/acpi/asus/wled && echo -n "$action" > /proc/acpi/asus/wled
# test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan
# }

take care

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

please execute this command:

echo 1 | sudo tee /sys/devices/platform/asus-laptop/wlan
and then
echo 0 | sudo tee /sys/devices/platform/asus-laptop/wlan

what does the led do? Maybe the logic is inverted in your laptop

Revision history for this message
Daniel Hahler (blueyed) wrote :

Silvio, what have you removed from /usr/share/acpi-support/state-funcs now?
The whole setLEDAsusWireless function, or only the new line ("test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan").

My test above was bad.. because it had still $action in it, which should be "1", so please try:
    echo 1 | sudo tee /proc/acpi/asus/wled
and
    echo 1 | sudo tee /sys/devices/platform/asus-laptop/wlan

Maybe only one of the interfaces should get used (/proc/acpi/asus/wled or /sys/devices/platform/asus-laptop/wlan, whichever is writable)?

I can also imagine that the LED gets toggled from somewhere else already, and this new line toggles it then, too.

Revision history for this message
Silvio (winky) wrote :

Nicolò, on my system
echo 1 command turn on the wireless led
echo 0 command turn off the wireless led

Revision history for this message
Silvio (winky) wrote :

Daniel,
 my state-funcs is now remmed as per my previous post.
# Pass '1' to light LED and '0' to dark LED
# setLEDAsusWireless()
# {
# action=`test "$1" -ne 0 && echo 1 || echo 0`
# test -w /proc/acpi/asus/wled && echo -n "$action" > /proc/acpi/asus/wled
# test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan
# }

--------------

this above is what is doing after your commands

root@portatile-asus:~# echo 1 | tee /proc/acpi/asus/wled
tee: /proc/acpi/asus/wled: Nessun file o directory
1
root@portatile-asus:~# echo 1 | tee /sys/devices/platform/asus-laptop/wlan
1
root@portatile-asus:~#

Revision history for this message
Silvio (winky) wrote :

just to resume.

after upgrading with this patch my wifi led stopped working. It goes On during first part of boot, then on the middle it goes Off.

So I removed from my /usr/share/acpi-support/state-funcs
 the above lines

# Pass '1' to light LED and '0' to dark LED
# setLEDAsusWireless()
# {
# action=`test "$1" -ne 0 && echo 1 || echo 0`
# test -w /proc/acpi/asus/wled && echo -n "$action" > /proc/acpi/asus/wled
# test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan
# }

Now led is perfectly working again.
If I execute from shell this command,
echo 0 | sudo tee /sys/devices/platform/asus-laptop/wlan

It returns 0 and the led goes Off

echo 1 | sudo tee /sys/devices/platform/asus-laptop/wlan

It returns 1 and the led goes On

all other commands was not having any effect on led.

I hope to have been of some help
ty so much for your continuous and great work ubuntu rocks!!!

Revision history for this message
Silvio (winky) wrote :

- disabling the entire funcion setLEDAsusWireless() the result is that led works perfectly so I did a new test

 I enabled again the function but removed the just this line
# test -w /sys/devices/platform/asus-laptop/wlan && echo -n "$action" > /sys/devices/platform/asus-laptop/wlan
And led is ON.

there are no doubts that my installation have some troubles with that line.

Revision history for this message
Nicolò Chieffo (yelo3) wrote :

The problem with that line is that the parent function always calls setLEDAsusWireless 0. So the result is that the led is always off. I will investigate what happens. This bug can be marked as fix released now

Changed in acpi-support:
status: Triaged → Fix Released
Revision history for this message
Nicolò Chieffo (yelo3) wrote :

you can continue to follow this bug: https://bugs.launchpad.net/bugs/180598

Revision history for this message
Michał Gołębiowski-Owczarek (mgol) wrote :

Still an issue in fully updated Hardy (my laptop is ASUS A6B00U).

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.