Re: ACPI for Asus Notebook N50Vc
Tue, Feb 21, 2012 at 01:57:13PM -0500, John Baldwin wrote: Can you try this? BTW, someone should port the asus-laptop.c driver from Linux over to replace acpi_asus.c. I was toying with such port some years ago. I will stick together my old patches and will try to push that WIP into the proper shape (unless someone will beat me at it). -- Eygene Ryabinkin,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] pgpdiIZRZvatG.pgp Description: PGP signature
Re: ACPI for Asus Notebook N50Vc
On Tuesday, February 21, 2012 7:43:37 pm simplicissimus wrote: Thanks again for your time and the patch; unfortunately it gives me an error message: http://paste.pocoo.org/show/554781/ This is my modified acpi_asus.c : http://paste.pocoo.org/show/554783/ I hope I got the changes to the file right. Regards Simplicissimus Oops, try this: Index: acpi_asus.c === --- acpi_asus.c (revision 231983) +++ acpi_asus.c (working copy) @@ -379,6 +379,18 @@ static struct acpi_asus_model acpi_asus_models[] = .disp_set = SDSP }, { + .name = N50Vc, + .bled_set = BLED, + .wled_set = WLED, + .brn_get= GPLV, + .brn_set= SPLV, +#if 0 + .lcd_set= \\_SB.PCI0.SBRG.EC0._Q10, +#endif + .disp_get = \\_SB.PCI0.P0P1.VGA.GETD, + .disp_set = SDSP + }, + { .name = S1x, .mled_set = MLED, .wled_set = WLED, @@ -509,6 +521,9 @@ static struct { ACPI_SERIAL_DECL(asus, ACPI ASUS extras); +static int acpi_asus_wapf = 1; +TUNABLE_INT(hw.acpi.asus.wapf, acpi_asus_wapf); + /* Function prototypes */ static int acpi_asus_probe(device_t dev); static int acpi_asus_attach(device_t dev); @@ -735,6 +750,9 @@ acpi_asus_attach(device_t dev) sc-sysctl_tree = SYSCTL_ADD_NODE(sc-sysctl_ctx, SYSCTL_CHILDREN(acpi_sc-acpi_sysctl_tree), OID_AUTO, asus, CTLFLAG_RD, 0, ); + SYSCTL_ADD_INT(sc-sysctl_ctx, SYSCTL_CHILDREN(sc-sysctl_tree), + OID_AUTO, wapf, CTLFLAG_RD, acpi_asus_wapf, 0, + Argument to pass WAPF method during initialization); /* Hook up nodes */ for (int i = 0; acpi_asus_sysctls[i].name != NULL; i++) { @@ -804,6 +822,9 @@ acpi_asus_attach(device_t dev) /* Activate hotkeys */ AcpiEvaluateObject(sc-handle, BSTS, NULL, NULL); + /* Configure wlan key. */ + acpi_SetInteger(sc-handle, WAPF, acpi_asus_wapf); + /* Handle notifies */ if (sc-model-n_func == NULL) sc-model-n_func = acpi_asus_notify; -- John Baldwin ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org
Re: ACPI for Asus Notebook N50Vc
On Monday, February 13, 2012 6:38:26 pm simplicissimus wrote: Hello John, Thank you very much for your patch. This is how my laptop’s behaviour changed: % sysctl -a | grep -i asus hw.acpi.asus.lcd_brightness: 4 dev.acpi.0.%desc: _ASUS_ Notebook dev.acpi_asus.0.%desc: Asus N50Vc Laptop Extras dev.acpi_asus.0.%driver: acpi_asus dev.acpi_asus.0.%location: handle=\_SB_.ATKD dev.acpi_asus.0.%pnpinfo: _HID=ATK0100 _UID=16843008 dev.acpi_asus.0.%parent: acpi0 hw.acpi.asus.lcd_brightness shows the correct brightness (with acpi_video loaded). My notebook has a combined switch for wifi/bluetooth. Without (the modified) acpi_asus the Wifi LED would be always off, although wifi worked. By pressing the button, bluetooth was toggled on/off with the corresponding LED going on/off. Now the button cycles through these LED statuses: both on both off wifi only bluetooth only Wifi stays on all the time, bluetooth works as it is supposed to (like it did before). Is there a chance to get ATK0110 events working? I tried xev, but had no output there. Thanks in advance Can you try this? BTW, someone should port the asus-laptop.c driver from Linux over to replace acpi_asus.c. Index: acpi_asus.c === --- acpi_asus.c (revision 231973) +++ acpi_asus.c (working copy) @@ -379,6 +379,18 @@ static struct acpi_asus_model acpi_asus_models[] = .disp_set = SDSP }, { + .name = N50Vc, + .bled_set = BLED, + .wled_set = WLED, + .brn_get= GPLV, + .brn_set= SPLV, +#if 0 + .lcd_set= \\_SB.PCI0.SBRG.EC0._Q10, +#endif + .disp_get = \\_SB.PCI0.P0P1.VGA.GETD, + .disp_set = SDSP + }, + { .name = S1x, .mled_set = MLED, .wled_set = WLED, @@ -509,6 +521,9 @@ static struct { ACPI_SERIAL_DECL(asus, ACPI ASUS extras); +static int acpi_asus_wapf = 1; +TUNABLE_INT_FETCH(hw.acpi.asus.wapf acpi_asus_wapf); + /* Function prototypes */ static int acpi_asus_probe(device_t dev); static int acpi_asus_attach(device_t dev); @@ -724,6 +739,8 @@ acpi_asus_attach(device_t dev) { struct acpi_asus_softc *sc; struct acpi_softc *acpi_sc; + ACPI_OBJECT Arg; + ACPI_OBJECT_LISTArgs; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -735,6 +752,9 @@ acpi_asus_attach(device_t dev) sc-sysctl_tree = SYSCTL_ADD_NODE(sc-sysctl_ctx, SYSCTL_CHILDREN(acpi_sc-acpi_sysctl_tree), OID_AUTO, asus, CTLFLAG_RD, 0, ); + SYSCTL_ADD_INT(sc-sysctl_ctx, SYSCTL_CHILDREN(sc-sysctl_tree), + OID_AUTO, wapf, CTLFLAG_RD, acpi_asus_wapf, 0, + Argument to pass WAPF method during initialization); /* Hook up nodes */ for (int i = 0; acpi_asus_sysctls[i].name != NULL; i++) { @@ -804,6 +824,9 @@ acpi_asus_attach(device_t dev) /* Activate hotkeys */ AcpiEvaluateObject(sc-handle, BSTS, NULL, NULL); + /* Configure wlan key. */ + acpi_SetInteger(sc-handle, WAPF, acpi_asus_wapf); + /* Handle notifies */ if (sc-model-n_func == NULL) sc-model-n_func = acpi_asus_notify; -- John Baldwin ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org
Re: ACPI for Asus Notebook N50Vc
Thanks again for your time and the patch; unfortunately it gives me an error message: http://paste.pocoo.org/show/554781/ This is my modified acpi_asus.c : http://paste.pocoo.org/show/554783/ I hope I got the changes to the file right. Regards Simplicissimus -- View this message in context: http://freebsd.1045724.n5.nabble.com/ACPI-for-Asus-Notebook-N50Vc-tp5467015p5503811.html Sent from the freebsd-acpi mailing list archive at Nabble.com. ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org
Re: ACPI for Asus Notebook N50Vc
On Wed, Feb 15, 2012 at 4:05 AM, simplicissimus hans-wurs...@web.de wrote: I forgot to mention that the volume control keys now also work. I tried this utility to find out the scancodes of the multimedia keys, but unfortunately the Fn+something keys didn’t generate any output. http://hack.org/mc/hacks/kbdscan/ You might try xev. It's been a standard X11 app since the earliest days of X11and reports all X events (mouse move, mouse click, key pres, key release. If you did a standard xorg install, you should already have it. -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org
Re: ACPI for Asus Notebook N50Vc
On Wednesday, February 08, 2012 11:50:07 am simplicissimus wrote: Hello everybody, I have just installed FreeBSD 9 on my Asus Notebook. When I load the acpi_asus module, I get the message acpi_asus0: Unsupported Asus laptop: N50Vc This is the output of #acpidump -dt acpidump.aml http://paste.pocoo.org/show/547876/ It says: acpidump: RSDT entry 10 (sig ATKG) is corrupt Is there any chance to get this model working by some simple patch to acpi_asus.c ? Try this. It may be possible to get some more things working on your machine as well (e.g. dsp_get/set and lcd_get/set), but I'm not sure which methods to use. Index: acpi_asus.c === --- acpi_asus.c (revision 231586) +++ acpi_asus.c (working copy) @@ -379,6 +379,13 @@ static struct acpi_asus_model acpi_asus_models[] = .disp_set = SDSP }, { + .name = N50Vc, + .bled_set = BLED, + .wled_set = WLED, + .brn_get= GPLV, + .brn_set= SPLV, + }, + { .name = S1x, .mled_set = MLED, .wled_set = WLED, -- John Baldwin ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org
Re: ACPI for Asus Notebook N50Vc
Hello John, Thank you very much for your patch. This is how my laptop’s behaviour changed: % sysctl -a | grep -i asus hw.acpi.asus.lcd_brightness: 4 dev.acpi.0.%desc: _ASUS_ Notebook dev.acpi_asus.0.%desc: Asus N50Vc Laptop Extras dev.acpi_asus.0.%driver: acpi_asus dev.acpi_asus.0.%location: handle=\_SB_.ATKD dev.acpi_asus.0.%pnpinfo: _HID=ATK0100 _UID=16843008 dev.acpi_asus.0.%parent: acpi0 hw.acpi.asus.lcd_brightness shows the correct brightness (with acpi_video loaded). My notebook has a combined switch for wifi/bluetooth. Without (the modified) acpi_asus the Wifi LED would be always off, although wifi worked. By pressing the button, bluetooth was toggled on/off with the corresponding LED going on/off. Now the button cycles through these LED statuses: both on both off wifi only bluetooth only Wifi stays on all the time, bluetooth works as it is supposed to (like it did before). Is there a chance to get ATK0110 events working? I tried xev, but had no output there. Thanks in advance Simplicissimus -- View this message in context: http://freebsd.1045724.n5.nabble.com/ACPI-for-Asus-Notebook-N50Vc-tp5467015p5480937.html Sent from the freebsd-acpi mailing list archive at Nabble.com. ___ freebsd-acpi@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org