* asus-wmi.ko should be loaded before video.ko
@ 2012-08-07 9:26 AceLan Kao
2012-08-07 9:32 ` Corentin Chary
0 siblings, 1 reply; 8+ messages in thread
From: AceLan Kao @ 2012-08-07 9:26 UTC (permalink / raw)
To: platform-driver-x86, Corentin Chary
Hi,
The new commit[1] will call acpi_video_dmi_promote_vendor() to add
the ACPI_VIDEO_BACKLIGHT_DMI_VENDOR flag to acpi_video_support.
So, asus-wmi.ko should be loaded before video.ko, or calling that
function is in vain.
Since loading video.ko will check those flags, we have to add the flag
before it's being checked.
I'm wondering is there a way to add this kind of dependency in the code, so that
depmod will help to build the dependency in modules.dep
1. 272c77d asus-wmi: control backlight power through WMI, not ACPI
Best regards,
AceLan Kao.
--
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-07 9:26 asus-wmi.ko should be loaded before video.ko AceLan Kao
@ 2012-08-07 9:32 ` Corentin Chary
2012-08-08 8:13 ` AceLan Kao
0 siblings, 1 reply; 8+ messages in thread
From: Corentin Chary @ 2012-08-07 9:32 UTC (permalink / raw)
To: AceLan Kao; +Cc: platform-driver-x86
On Tue, Aug 7, 2012 at 11:26 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
> Hi,
>
> The new commit[1] will call acpi_video_dmi_promote_vendor() to add
> the ACPI_VIDEO_BACKLIGHT_DMI_VENDOR flag to acpi_video_support.
> So, asus-wmi.ko should be loaded before video.ko, or calling that
> function is in vain.
> Since loading video.ko will check those flags, we have to add the flag
> before it's being checked.
>
> I'm wondering is there a way to add this kind of dependency in the code, so that
> depmod will help to build the dependency in modules.dep
>
> 1. 272c77d asus-wmi: control backlight power through WMI, not ACPI
>
> Best regards,
> AceLan Kao.
Hi,
I don't really understand what you mean.
Currently:
- acpi_video_dmi_promote_vendor() is called to set the flags
- video.ko flags are checked to find which backlight should be used
(in order to respect acpi_video="" parameters if user specified them)
- if necessary, acpi_video_unregister() is called
So yes, the acpi backlight will be register, and then un-registered,
but there is no way to fix that (or with a big blacklist in video.ko,
and we don't want that).
Thanks,
--
Corentin Chary
http://xf.iksaif.net
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-07 9:32 ` Corentin Chary
@ 2012-08-08 8:13 ` AceLan Kao
2012-08-08 9:34 ` Corentin Chary
0 siblings, 1 reply; 8+ messages in thread
From: AceLan Kao @ 2012-08-08 8:13 UTC (permalink / raw)
To: Corentin Chary; +Cc: platform-driver-x86
Dear Corentin,
2012/8/7 Corentin Chary <corentincj@iksaif.net>:
> On Tue, Aug 7, 2012 at 11:26 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
>> Hi,
>>
>> The new commit[1] will call acpi_video_dmi_promote_vendor() to add
>> the ACPI_VIDEO_BACKLIGHT_DMI_VENDOR flag to acpi_video_support.
>> So, asus-wmi.ko should be loaded before video.ko, or calling that
>> function is in vain.
>> Since loading video.ko will check those flags, we have to add the flag
>> before it's being checked.
>>
>> I'm wondering is there a way to add this kind of dependency in the code, so that
>> depmod will help to build the dependency in modules.dep
>>
>> 1. 272c77d asus-wmi: control backlight power through WMI, not ACPI
>>
>> Best regards,
>> AceLan Kao.
>
> Hi,
>
> I don't really understand what you mean.
> Currently:
> - acpi_video_dmi_promote_vendor() is called to set the flags
> - video.ko flags are checked to find which backlight should be used
> (in order to respect acpi_video="" parameters if user specified them)
> - if necessary, acpi_video_unregister() is called
>
> So yes, the acpi backlight will be register, and then un-registered,
> but there is no way to fix that (or with a big blacklist in video.ko,
> and we don't want that).
I saw asus-wmi will call acpi_video_unregister(),
but it looks like it doesn't call backlight_device_unregister() as well.
The problem is that the /sys/class/backlight/acpi_video0 directory still exists
and the gnome-settings-daemon will choose acpi_video0 for the
brightness functions
But, if asus-wmi is loaded before video, then video won't call
backlight_device_register(),
since the flag is already be set.
>
> Thanks,
>
> --
> Corentin Chary
> http://xf.iksaif.net
--
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-08 8:13 ` AceLan Kao
@ 2012-08-08 9:34 ` Corentin Chary
2012-08-08 20:17 ` Carlos Alberto Lopez Perez
0 siblings, 1 reply; 8+ messages in thread
From: Corentin Chary @ 2012-08-08 9:34 UTC (permalink / raw)
To: AceLan Kao; +Cc: platform-driver-x86
On Wed, Aug 8, 2012 at 10:13 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
> Dear Corentin,
>
> 2012/8/7 Corentin Chary <corentincj@iksaif.net>:
>> On Tue, Aug 7, 2012 at 11:26 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
>>> Hi,
>>>
>>> The new commit[1] will call acpi_video_dmi_promote_vendor() to add
>>> the ACPI_VIDEO_BACKLIGHT_DMI_VENDOR flag to acpi_video_support.
>>> So, asus-wmi.ko should be loaded before video.ko, or calling that
>>> function is in vain.
>>> Since loading video.ko will check those flags, we have to add the flag
>>> before it's being checked.
>>>
>>> I'm wondering is there a way to add this kind of dependency in the code, so that
>>> depmod will help to build the dependency in modules.dep
>>>
>>> 1. 272c77d asus-wmi: control backlight power through WMI, not ACPI
>>>
>>> Best regards,
>>> AceLan Kao.
>>
>> Hi,
>>
>> I don't really understand what you mean.
>> Currently:
>> - acpi_video_dmi_promote_vendor() is called to set the flags
>> - video.ko flags are checked to find which backlight should be used
>> (in order to respect acpi_video="" parameters if user specified them)
>> - if necessary, acpi_video_unregister() is called
>>
>> So yes, the acpi backlight will be register, and then un-registered,
>> but there is no way to fix that (or with a big blacklist in video.ko,
>> and we don't want that).
> I saw asus-wmi will call acpi_video_unregister(),
> but it looks like it doesn't call backlight_device_unregister() as well.
backlight_device_unregister() should be called by video.ko when
calling acpi_video_unregister()
> The problem is that the /sys/class/backlight/acpi_video0 directory still exists
> and the gnome-settings-daemon will choose acpi_video0 for the
> brightness functions
Are you sure acpi_video_unregister() was called in this case ? can you
add some traces to video.c to see what happened and why
backlight_device_unregister() wasn't called ?
> But, if asus-wmi is loaded before video, then video won't call
> backlight_device_register(),
> since the flag is already be set.
Honestly, I don't know if there is a way to do that, and asus-wmi
should be loadable and working at any time, not only on boot.
--
Corentin Chary
http://xf.iksaif.net
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-08 9:34 ` Corentin Chary
@ 2012-08-08 20:17 ` Carlos Alberto Lopez Perez
2012-08-09 3:29 ` AceLan Kao
0 siblings, 1 reply; 8+ messages in thread
From: Carlos Alberto Lopez Perez @ 2012-08-08 20:17 UTC (permalink / raw)
To: Corentin Chary; +Cc: AceLan Kao, platform-driver-x86
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
On 08/08/12 11:34, Corentin Chary wrote:
>> The problem is that the /sys/class/backlight/acpi_video0 directory still exists
>> > and the gnome-settings-daemon will choose acpi_video0 for the
>> > brightness functions
> Are you sure acpi_video_unregister() was called in this case ? can you
> add some traces to video.c to see what happened and why
> backlight_device_unregister() wasn't called ?
>
>> > But, if asus-wmi is loaded before video, then video won't call
>> > backlight_device_register(),
>> > since the flag is already be set.
> Honestly, I don't know if there is a way to do that, and asus-wmi
> should be loadable and working at any time, not only on boot.
What about writing an udev rule to force using acpi_video0 for asus-wmi?
Use udevadm to get the attributes for building the rule
udevadm info --attribute-walk --path=/sys/class/backlight/acpi_video0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-08 20:17 ` Carlos Alberto Lopez Perez
@ 2012-08-09 3:29 ` AceLan Kao
2012-08-09 7:15 ` Corentin Chary
0 siblings, 1 reply; 8+ messages in thread
From: AceLan Kao @ 2012-08-09 3:29 UTC (permalink / raw)
To: Corentin Chary; +Cc: platform-driver-x86, Carlos Alberto Lopez Perez
Dear Corentin,
2012/8/9 Carlos Alberto Lopez Perez <clopez@igalia.com>:
> On 08/08/12 11:34, Corentin Chary wrote:
>>> The problem is that the /sys/class/backlight/acpi_video0 directory still exists
>>> > and the gnome-settings-daemon will choose acpi_video0 for the
>>> > brightness functions
>> Are you sure acpi_video_unregister() was called in this case ? can you
>> add some traces to video.c to see what happened and why
>> backlight_device_unregister() wasn't called ?
Yes, you are right, acpi_video_unregister() is not be called.
#ifdef CONFIG_ACPI_VIDEO doesn't work as expected.
In ubuntu kernel, it's config as module, CONFIG_ACPI_VIDEO=m.
I will try to figure out what happened.
>>> > But, if asus-wmi is loaded before video, then video won't call
>>> > backlight_device_register(),
>>> > since the flag is already be set.
>> Honestly, I don't know if there is a way to do that, and asus-wmi
>> should be loadable and working at any time, not only on boot.
>
> What about writing an udev rule to force using acpi_video0 for asus-wmi?
>
> Use udevadm to get the attributes for building the rule
>
> udevadm info --attribute-walk --path=/sys/class/backlight/acpi_video0
>
--
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-09 3:29 ` AceLan Kao
@ 2012-08-09 7:15 ` Corentin Chary
2012-08-09 7:39 ` AceLan Kao
0 siblings, 1 reply; 8+ messages in thread
From: Corentin Chary @ 2012-08-09 7:15 UTC (permalink / raw)
To: AceLan Kao; +Cc: platform-driver-x86, Carlos Alberto Lopez Perez
On Thu, Aug 9, 2012 at 5:29 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
> Dear Corentin,
>
> 2012/8/9 Carlos Alberto Lopez Perez <clopez@igalia.com>:
>> On 08/08/12 11:34, Corentin Chary wrote:
>>>> The problem is that the /sys/class/backlight/acpi_video0 directory still exists
>>>> > and the gnome-settings-daemon will choose acpi_video0 for the
>>>> > brightness functions
>>> Are you sure acpi_video_unregister() was called in this case ? can you
>>> add some traces to video.c to see what happened and why
>>> backlight_device_unregister() wasn't called ?
> Yes, you are right, acpi_video_unregister() is not be called.
> #ifdef CONFIG_ACPI_VIDEO doesn't work as expected.
> In ubuntu kernel, it's config as module, CONFIG_ACPI_VIDEO=m.
> I will try to figure out what happened.
>
>>>> > But, if asus-wmi is loaded before video, then video won't call
>>>> > backlight_device_register(),
>>>> > since the flag is already be set.
>>> Honestly, I don't know if there is a way to do that, and asus-wmi
>>> should be loadable and working at any time, not only on boot.
>>
>> What about writing an udev rule to force using acpi_video0 for asus-wmi?
>>
>> Use udevadm to get the attributes for building the rule
>>
>> udevadm info --attribute-walk --path=/sys/class/backlight/acpi_video0
>>
Should be fixed by
https://github.com/iksaif/platform-drivers-x86/commit/3a00b9fd44ac59f5ded116478e750e883c869bb2
(not yet in tree, was waiting for next merge window but will send it
in an RC if it fixes the issue)
--
Corentin Chary
http://xf.iksaif.net
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: asus-wmi.ko should be loaded before video.ko
2012-08-09 7:15 ` Corentin Chary
@ 2012-08-09 7:39 ` AceLan Kao
0 siblings, 0 replies; 8+ messages in thread
From: AceLan Kao @ 2012-08-09 7:39 UTC (permalink / raw)
To: Corentin Chary; +Cc: platform-driver-x86, Carlos Alberto Lopez Perez
Dear Corentin,
2012/8/9 Corentin Chary <corentincj@iksaif.net>:
> On Thu, Aug 9, 2012 at 5:29 AM, AceLan Kao <acelan.kao@canonical.com> wrote:
>> Dear Corentin,
>>
>> 2012/8/9 Carlos Alberto Lopez Perez <clopez@igalia.com>:
>>> On 08/08/12 11:34, Corentin Chary wrote:
>>>>> The problem is that the /sys/class/backlight/acpi_video0 directory still exists
>>>>> > and the gnome-settings-daemon will choose acpi_video0 for the
>>>>> > brightness functions
>>>> Are you sure acpi_video_unregister() was called in this case ? can you
>>>> add some traces to video.c to see what happened and why
>>>> backlight_device_unregister() wasn't called ?
>> Yes, you are right, acpi_video_unregister() is not be called.
>> #ifdef CONFIG_ACPI_VIDEO doesn't work as expected.
>> In ubuntu kernel, it's config as module, CONFIG_ACPI_VIDEO=m.
>> I will try to figure out what happened.
>>
>>>>> > But, if asus-wmi is loaded before video, then video won't call
>>>>> > backlight_device_register(),
>>>>> > since the flag is already be set.
>>>> Honestly, I don't know if there is a way to do that, and asus-wmi
>>>> should be loadable and working at any time, not only on boot.
>>>
>>> What about writing an udev rule to force using acpi_video0 for asus-wmi?
>>>
>>> Use udevadm to get the attributes for building the rule
>>>
>>> udevadm info --attribute-walk --path=/sys/class/backlight/acpi_video0
>>>
>
> Should be fixed by
> https://github.com/iksaif/platform-drivers-x86/commit/3a00b9fd44ac59f5ded116478e750e883c869bb2
> (not yet in tree, was waiting for next merge window but will send it
> in an RC if it fixes the issue)
Great, thanks a lot.
>
> --
> Corentin Chary
> http://xf.iksaif.net
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Chia-Lin Kao(AceLan)
http://blog.acelan.idv.tw/
E-Mail: acelan.kaoATcanonical.com (s/AT/@/)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-08-09 7:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-07 9:26 asus-wmi.ko should be loaded before video.ko AceLan Kao
2012-08-07 9:32 ` Corentin Chary
2012-08-08 8:13 ` AceLan Kao
2012-08-08 9:34 ` Corentin Chary
2012-08-08 20:17 ` Carlos Alberto Lopez Perez
2012-08-09 3:29 ` AceLan Kao
2012-08-09 7:15 ` Corentin Chary
2012-08-09 7:39 ` AceLan Kao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.