Bug 13477

Summary: No laptop_panel and backlight information in /sys or lshal
Product: Drivers Reporter: schmirrwurst
Component: Video(Other)Assignee: drivers_video-other
Status: CLOSED OBSOLETE    
Severity: normal CC: akpm, alan, bistory, malattia, rui.zhang, yakui.zhao
Priority: P1    
Hardware: All   
OS: Linux   
URL: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/377353
Kernel Version: 2.6 Subsystem:
Regression: No Bisected commit-id:
Bug Depends on:    
Bug Blocks: 56331    
Attachments: acpidump (v20071116)
lspci -vxxx
dmesg with initcall_debug
config file I'm compiling with
ls /sys/bus/acpi/devices
ls /sys/bus/acpi/drivers/*
/sys/bus/acpi/devices/*/path
debug patch
dmesg after scan.c patch

Description schmirrwurst 2009-06-07 14:27:28 UTC
I've a sony vaio vgn-fz21E, and opened a couple of bug on launchpad because backlight management doesn't work...
It seems that the issue is coming from the kernel, that does not provide any information about my backlight....
/sys/class/backlight is empty

and I've no laptop_panel in lshal...
Comment 1 Andrew Morton 2009-06-09 21:16:22 UTC
umm, I guess this is sony-laptop.c.  I'll cc Mattia and
will attempt to recategorise it to something more appropriate.
Comment 2 Mattia Dongili 2009-06-09 22:44:26 UTC
(In reply to comment #0)
> I've a sony vaio vgn-fz21E, and opened a couple of bug on launchpad because
> backlight management doesn't work...
> It seems that the issue is coming from the kernel, that does not provide any
> information about my backlight....
> /sys/class/backlight is empty
> 
> and I've no laptop_panel in lshal...

Schmirrwurst,
we will need to see the DSDT dump from that laptop but usually the FZ series laptops have the display backlight controlled by the acpi_video driver.

I'll also Cc Zhang.

Thanks,
Mattia
Comment 3 Zhang Rui 2009-06-10 01:48:18 UTC
right,

schmirrwurst
please get the latest pmtools from http://www.lesswatts.org/projects/acpi/utilities.php
build and run "acpidump > acpidump.out"
then attach the acpidump.out file here.
Comment 4 schmirrwurst 2009-06-11 18:25:02 UTC
Created attachment 21856 [details]
acpidump (v20071116)
Comment 5 ykzhao 2009-06-12 08:17:34 UTC
From the acpidump it seems that there exists the _BCL/_BCM object. In such case video driver will register the generic ACPI backlight I/F.
    Will you please try the latest kernel and see whether the ACPI backlight I/F is registered after loading the i915 driver?
    It will be great if you can attach the output of dmesg with the boot option of "initcall_debug".
    Thanks.
Comment 6 ykzhao 2009-06-12 08:20:14 UTC
Will you please also attach the output of lspic -vxxx?
   Thanks.
Comment 7 schmirrwurst 2009-06-12 16:12:55 UTC
Created attachment 21882 [details]
lspci -vxxx
Comment 8 schmirrwurst 2009-06-14 18:09:13 UTC
Created attachment 21914 [details]
dmesg with initcall_debug
Comment 9 schmirrwurst 2009-06-14 18:12:11 UTC
Could you explain me how to do that ? :
" Will you please try the latest kernel and see whether the ACPI backlight
I/F is registered after loading the i915 driver?"

I'm now using 2.6.30-9-generic
Comment 10 Zhang Rui 2009-06-17 03:41:35 UTC
please set
CONFIG_DRM=y
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y
CONFIG_ACPI_VIDEO=m
and rebuild your kernel kernel,

can you see the backlight sysfs I/F after loading the ACPI video driver this time?
Comment 11 schmirrwurst 2009-06-18 16:48:31 UTC
Created attachment 21993 [details]
config file I'm compiling with

I've modified the 2.6.30-9-generic config file from ubuntu, and I'm currently compiling... and going to test it again...
Is that correct ?
Comment 12 schmirrwurst 2009-06-18 20:10:55 UTC
I've recompiled the kernel, and rebooted on it :
at start nothing in /sys/class/backlight
if search for an acpi video module, and there is one :  
/lib/modules/2.6.30sonyfix/kernel/drivers/acpi/video.ko

tried to rmmod video, and modprobe it, the output from dmesg : 
[  718.266226] calling  acpi_video_init+0x0/0x77 [video] @ 4440
[  718.266749] initcall acpi_video_init+0x0/0x77 [video] returned 0 after 494 usecs
Comment 13 schmirrwurst 2009-06-18 20:12:32 UTC
forgot... still nothing in /class/backlight after modprobe
Comment 14 Zhang Rui 2009-06-19 01:40:29 UTC
what's new in the dmesg output after you re-probing the ACPI video driver?
Comment 15 Zhang Rui 2009-06-19 01:42:50 UTC
after loading the video driver, please run "tree /proc/acpi/video" and "grep . /proc/acpi/video/GFX0/*/*" and attach the output.
Comment 16 Zhang Rui 2009-06-19 01:43:30 UTC
plus, you'd better do these test with a vanilla kernel.
Comment 17 Anonymous Emailer 2009-06-19 12:01:02 UTC
Reply-To: sebastien.brennion@googlemail.com

I've just realised there where some issue at kernel installing in the postinst 
file at : 
if (-d "/etc/kernel/postinst.d") {
  print STDERR "Examining /etc/kernel/postinst.d.\n";
  system ("run-parts --verbose --exit-on-error --arg=$version " .
          "--arg=$realimageloc$kimage-$version " .
          "/etc/kernel/postinst.d") &&
            die "Failed to process /etc/kernel/postinst.d";
}

and dkms has not worked properly also...

I'm going to search how to do that...

Le Friday 19 June 2009 03:42:51, vous avez écrit :
> http://bugzilla.kernel.org/show_bug.cgi?id=13477
>
>
>
>
>
> --- Comment #15 from Zhang Rui <rui.zhang@intel.com>  2009-06-19 01:42:50
> --- after loading the video driver, please run "tree /proc/acpi/video" and
> "grep . /proc/acpi/video/GFX0/*/*" and attach the output.
Comment 18 schmirrwurst 2009-06-22 17:01:12 UTC
Ok so I've recompiled 2.6.30 with :
CONFIG_DRM=y
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
CONFIG_ACPI_VIDEO=m

You wanted CONFIG_DRM_I915=y , but it seems to be available only as module...

/sys/class/backlight/ is still empty
/sys/class/graphics/ also...

tree /proc/acpi/video
/proc/acpi/video

0 directories, 0 files

/proc/acpi/video/ is also empty...
Comment 19 schmirrwurst 2009-06-22 17:03:16 UTC
launching video module manually give : 
[  473.566757] calling  acpi_video_init+0x0/0x77 [video] @ 4336
[  473.567288] initcall acpi_video_init+0x0/0x77 [video] returned 0 after 503 usecs
in dmesg...

the rest is unchanged after it..
Comment 20 Zhang Rui 2009-06-23 07:27:59 UTC
please attach your kernel config file.
Comment 21 Zhang Rui 2009-06-23 07:35:19 UTC
(In reply to comment #20)
> please attach your kernel config file.

Please ignore this comment.

please attach the output of
"ls /sys/bus/acpi/devices/" and "ls /sys/bus/acpi/drivers/*"
Comment 22 schmirrwurst 2009-06-23 11:38:26 UTC
Created attachment 22068 [details]
ls /sys/bus/acpi/devices
Comment 23 schmirrwurst 2009-06-23 11:39:10 UTC
Created attachment 22069 [details]
 ls /sys/bus/acpi/drivers/*
Comment 24 Zhang Rui 2009-06-24 01:39:42 UTC
No LNXVIDEO device? that's really weird.
please attach the output of " grep . /sys/bus/acpi/devices/*/path"
Comment 25 schmirrwurst 2009-06-24 20:22:50 UTC
Created attachment 22085 [details]
/sys/bus/acpi/devices/*/path
Comment 26 Zhang Rui 2009-06-25 02:27:35 UTC
Created attachment 22086 [details]
debug patch

please apply this patch and attach the dmesg output after system boot.
Comment 27 schmirrwurst 2009-06-25 17:35:27 UTC
Created attachment 22095 [details]
dmesg after scan.c patch
Comment 28 ykzhao 2009-07-02 09:28:23 UTC
Hi, Schmirrwurst
    From the dmesg it seems that this laptop is not based on intel integreated graphics. So it is not meaningful whether the CONFIG_I915 is enabled or not in kernel configuration.
    There exists the _BCL/_BCM object under the scope of GFX. But as there is no corresponding PCI device for the GFX ACPI object, OS can't register the generic ACPI backlight I/F.

    Then it will have to fall back to the platform driver. If the platform driver can't register the backlight I/F, there is no backlight I/F under the /sys/class/backlight/.

So IMO this is a BIOS bug or platform driver bug.

Thanks.
Comment 29 schmirrwurst 2009-07-02 11:11:48 UTC
Hi ykzhao,

What did you mean with platform driver bug ? 
You mean than the propriatary nvidia driver could provide that backlight I/F ?

In fact, the utility smartdimmer from the main repository of ubuntu, is already able to SET and GET backlight level... isn't it possible to use the same code in the kernel ??
Comment 30 schmirrwurst 2009-07-05 20:58:29 UTC
I've searched on the web, and found out that sony and some other (msi, samsung) are controlling the backlight through the nvidia chipset, what is not the usual way (?)...
But I though if a utility from the main repository is able set and get from the command line, it should also be possible to implement it in the kernel, so there would be a common interface also for sony-nvidia laptops ??
Comment 31 Zhang Rui 2009-07-06 01:06:00 UTC
(In reply to comment #29)

> In fact, the utility smartdimmer from the main repository of ubuntu, is
> already
> able to SET and GET backlight level...

good news is that the native nvidia driver works for you.

> isn't it possible to use the same code
> in the kernel ??

bad news is that we don't know how they works.

IMO, this is rather a nvidia video driver problem than an ACPI one, i.e. nvidia video driver can register a backlight sysfs class device and provide its own way to change the backlight.

Anyway, we (ACPI) can not help in this bug, re-assign it to DRIVER-VIDEO category.
Comment 32 schmirrwurst 2009-07-07 17:42:19 UTC
I've tried to search a way to have it fixed outside the kernel but :
* nvidia won't provide any support for backlight in his proprietary driver, because they say every manufacturer is managing it differently, so the manufacturer have to support it themeself ! 
* Sony is not supporting linux at all, so they won't do anything !

I though I could ask for a fix in hal or devicekit/udev
* but hal is deprieciated and doesn't add anything new
* devicekit won't add so device specific rules, because that's why the hal project is stopping, they need a common interface...

So I think the last chance for all those people like me, wainting for years for backlight support, would be that the backlight management made by nvclock/smartdimmer, would be integrated in the kernel to provide a common interface for powermanagement/ fnkeys ?? Is that possible (please say yes ;)
Comment 33 schmirrwurst 2009-07-22 17:31:51 UTC
Is there some work in progress ?
Comment 34 schmirrwurst 2009-08-22 18:29:29 UTC
Is there someone in the video team ? I found a bug from 2008, with similar problem and still new... ??

I've tried out the opensource driver nouveau for nvidia cards, it have backlight/acpi support that is working pretty well, but the driver itself is so instable that it is unusable at the moment, would it be possible to implement the backlight support code in the kernel, to have people there card supported ?!
Comment 35 Thomas LETE 2009-10-18 15:27:40 UTC
Is there any news ? I think some patches can be made for sony_laptop, it's not the best solution (owners of some other brands experience the same lack of backlight support) but it can solve some annoyance for sony owers.
Comment 36 schmirrwurst 2010-04-04 11:06:02 UTC
Still no support for many owner from laptop with nvidia cards... 

None from the concerned projects hal,devicekit, udev won't make anything, just like nvidia...

The only hope is that the kernel implement backlight support somehow...
A patch would be great !

Otherwise waiting a stable 3D support from nouveau could be long !
Comment 37 schmirrwurst 2010-04-04 11:30:36 UTC
The work seems already to have be done here 
http://www.nvnews.net/vbulletin/showthread.php?t=143025

There is only need to integrate it to the kernel...