Laptop: Sony Vaio VGN-FW235J Graphics: Intel GM45 - 4500MHD The commit 74a365b3f354fafc537efa5867deb7a9fadbfe27 broken my /sys/class/backlight/acpi_video0/* commit 74a365b3f354fafc537efa5867deb7a9fadbfe27 Author: Matthew Garrett <mjg59@srcf.ucam.org> Date: Thu Mar 19 21:35:39 2009 +0000 ACPI: Populate DIDL before registering ACPI video device on Intel Intel graphics hardware that implements the ACPI IGD OpRegion spec requires that the list of display devices be populated before any ACPI video methods are called. Detect when this is the case and defer registration until the opregion code calls it. Fixes crashes on HP laptops. http://bugzilla.kernel.org/show_bug.cgi?id=11259 Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Len Brown <len.brown@intel.com> Reverting the patch I see the files again (actual_brightness, brightness, max_brightness..) Note: On boot, I see: [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function
Created attachment 20893 [details] lspci -vv
Will you please attach the output of acpidump? Will you please confirm whether the i915 driver is loaded when the issue happens? If not, please try to load the i915 driver and see whether the /sys/class/backlight/* will appear. Thanks.
please re-load the ACPI video driver after loading i915 driver and see if it helps.
Created attachment 20905 [details] acpidump
I tried to load i915 (video module is loaded automatically) and with no success. And when I load the video module without i915, I have the same issue.
(In reply to comment #5) > I tried to load i915 (video module is loaded automatically) and with no > success. > what do you mean by no success? is there any error message when inserting the i915 driver? then how about build it the drm & i915 driver? > And when I load the video module without i915, I have the same issue. right.
Hi, Rodrigo Will you please enable the "CONFIG_DRM_I915_KMS" in kernel configuration and see whether the issue still exists? Thanks.
(In reply to comment #6) > what do you mean by no success? > is there any error message when inserting the i915 driver? No errors. I just don't see the brightness files in /sys/class/backlight/ > then how about build it the drm & i915 driver? > All drivers are build as modules.
(In reply to comment #7) > Hi, Rodrigo > Will you please enable the "CONFIG_DRM_I915_KMS" in kernel configuration > and see whether the issue still exists? > Thanks. Hi! Enable the CONFIG_DRM_I915_KMS works! So, now I see the brightness files when I loading the i915. When loading just the video module, the issue still exists.
Thanks for the test. Now it seems that it will can work well again after enabling the KMS feature. If only the video driver is loaded, it will be deferred on the laptops on which the ACPI opregion is supported. Only after the I915 driver is loaded, the video driver will be initialized fully. And this will depend on the KMS feature. thanks.
From the test the issue is gone if KMS feature is enabled in kernel configuration and I915 driver is loaded. So IMO this is not a bug. Hi, Rui How about reject this bug?
Can we make any Kconfig changes which will protect other users from encountering this problem?
Anyway, it is necessary to make changes in Kconfig to solve build problems. When i915 is set as builtin and video as module, acpi_video_register() is undefined. GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 drivers/built-in.o: In function `intel_opregion_init': (.text+0x98db7): undefined reference to `acpi_video_register' make: *** [.tmp_vmlinux1] Error 1
Now it seems that there exist two problems about this bug. a. whether the backlight I/F is registered is related with the KMS (It is too strict. Maybe when KMS is not set in kernel configuration, the backlight I/F should be registered.) b. the tight dependency between the ACPI video driver and the I915 driver. If the I915 is compiled as builtin and video is compiled as module, it will fail in the kernel compilation. Thanks.
Created attachment 20958 [details] [Patch 1/2]: weaken the dependency between acpi video driver and I915 driver
Created attachment 20959 [details] [Patch 2/2]: check whether the acpi video driver is deferrable only when KMS is enabled.
Hi, Rodrigo Will you please try the attached two patches in comment #15/#16 and see whether the problem can be fixed? The patch in comment #15 is to weaken the dependency between acpi video driver and i915 driver. And it is to fix the issue B mentioned in comment #14. The patch in comment #16 is to check whether acpi video driver is deferrable only KMS is enabled. It means that if KMS is not enabled in kernel configuration, the acpi video driver won't be deferrable. It is to fix the issue A mentioned in comment #14. Thanks.
THe second patch looks sufficient. I don't see any benefit in the first patch - if the hardware supports opregion then we have to use the i915 code. The level of dependency between the drivers is entirely fine.
Hi Yakui. The second patch works for me! Now, with and without KMS, I have the directory /sys/class/backlight/*. With the first patch, I have issues with building: LD drivers/acpi/acpi.o CC drivers/acpi/video.o drivers/acpi/video.c:91: error: 'ACPI_VIDEO_CLASS' undeclared here (not in a function) drivers/acpi/video.c: In function 'acpi_video_init': drivers/acpi/video.c:2280: error: implicit declaration of function 'acpi_video_register' drivers/acpi/video.c: In function 'acpi_video_exit': drivers/acpi/video.c:2292: error: implicit declaration of function 'acpi_video_unregister' make[2]: *** [drivers/acpi/video.o] Error 1 make[1]: *** [drivers/acpi] Error 2 make: *** [drivers] Error 2
moving to RESOLVED sincen patch is proposed
Created attachment 20967 [details] [Patch 1/2]: weaken the dependency between ACPI video driver and i915 driver
Hi, Rodrigo Sorry for my fault. The header file of acpi/video.h is not include. Will you please try it again? Thanks.
Hi, Matthew The patch in comment #16 will be enough to fix this issue. But the dependency is too tight. We must assure that both two drivers are compiled as built-in or modules. When the I915 is compiled as built-in and video is a module, we will fail in kernel compilation. The first patch is only to weaken the dependency. In fact it still do what we wanted. And every driver can be loaded independently. Thanks.
We can express that level of dependency in kbuild. It makes more sense to do so than to add extra code.
(In reply to comment #22) > Hi, Rodrigo > Sorry for my fault. The header file of acpi/video.h is not include. > Will you please try it again? > Thanks. Hi! The second version of patch 1/2 works for me. There is no more issues. Thanks Yakui.
Handled-By : "yakui_zhao" <yakui.zhao@intel.com> Patch : http://bugzilla.kernel.org/attachment.cgi?id=20967 Patch : http://bugzilla.kernel.org/attachment.cgi?id=20959
*** Bug 13095 has been marked as a duplicate of this bug. ***
The patch from Matthew is better to fix the brightness issue. >http://marc.info/?l=linux-kernel&m=123982845406021&w=2 Thanks.
Hi, All The main issue of this bug is that ACPI baclight I/F is gone. The patch in comment #16 can fix the issue. But the patch in comment #28 is better to fix this issue. So please ignore the patch in comment #16. At the same timer there exists another issue that is related with the commit 74a365b3f354fafc537efa5867deb7a9fadbfe27. >If the i915 is compiled as built-in modules and the acpi video driver is compiled as modules, we will fail in kernel compilation. But how to fix it is still under discussion. So please also ignore the patch in comment #15/#21. Thanks.
I've seen this bug on 2.6.30-rc2-git7 on fujitsu siemens amilo XI 3650. Will test today if the fix in commen 28 resolves the problem also for this hardwareand report. I also have the message [Firmware Bug]: ACPI: ACPI brightness control misses _BQC function Note that with 29.1, during boot the brightness was set to low and stayed that way until somehow acpi brightness capable daemon like kpowersave was launched.
I updated to 30-rc3 and applied the fix in comment #28. It fixes the problem and even better, the brightness is correct during boot. I get brighness again via ACPI and button. Well done.
Created attachment 21101 [details] patch vs 2.6.30-rc3 as applied to acpi tree
shipping in 2.6.30-rc4 closed
With a plain 2.6.30-rc4, I'm getting this: drivers/built-in.o: In function `intel_opregion_free': (.text+0xb78ea): undefined reference to `acpi_video_exit' drivers/built-in.o: In function `intel_opregion_init': (.text+0xb7d3c): undefined reference to `acpi_video_register' So, I'm not sure this is fixed.
Mike, for the build, please try this patch: http://patchwork.kernel.org/patch/19821
(In reply to comment #35) > Mike, > for the build, please try this patch: > http://patchwork.kernel.org/patch/19821 Yep, that seems to fix my build. Thanks. (Needed to have CONFIG_ACPI_VIDEO and CONFIG_BACKLIGHT_CLASS_DEVICE built in, not as modules).
*** This bug has been marked as a duplicate of bug 13165 ***