micheleciona / aceracpi

Automatically exported from code.google.com/p/aceracpi
0 stars 0 forks source link

brightness via /proc & EC gives error, segfault on <= 2.6.20 backlight class #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Writing to brightness in /proc (when controlled via EC) gives:

bash: echo: write error: Invalid argument

Using backlight subsystem works fine.

Original issue reported on code.google.com by cathec...@gmail.com on 2 Sep 2007 at 4:10

GoogleCodeExporter commented 8 years ago
trying to:
cat actual_brightness
in
/sys/class/backlight/acer_acpi
gives:
Segmentation fault
and:
[  166.040000] BUG: unable to handle kernel NULL pointer dereference at virtual
address 0000000d
[  166.040000]  printing eip:
[  166.040000] 0000000d
[  166.040000] *pde = 00000000
[  166.040000] Oops: 0000 [#1]
[  166.040000] SMP
[  166.040000] Modules linked in: acer_acpi led_class rfcomm hidp l2cap ppdev
powernow_k8 cpufreq_userspace cpufreq_ondemand cpufreq_powersave 
cpufreq_conservative
cpufreq_stats freq_table dev_acpi pcc_acpi sony_acpi tc1100_wmi asus_acpi dock 
sbs
i2c_ec button battery ac video backlight container ipv6 ndiswrapper parport_pc 
lp
parport fuse serial_cs snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss 
joydev
snd_pcm snd_seq_dummy snd_seq_oss pcmcia hci_usb fglrx(P) bluetooth snd_seq_midi
snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device yenta_socket
rsrc_nonstatic pcmcia_core pcspkr i2c_piix4 serio_raw psmouse snd soundcore 
i2c_core
k8temp shpchp pci_hotplug snd_page_alloc ati_agp af_packet agpgart tsdev evdev 
ext3
jbd mbcache usbhid hid ide_cd cdrom ide_disk generic atiixp r8169 ata_generic 
libata
scsi_mod ehci_hcd ohci_hcd usbcore thermal processor fan capability commoncap 
vesafb
fbcon tileblit font bitblit softcursor
[  166.040000] CPU:    0
[  166.040000] EIP:    0060:[<0000000d>]    Tainted: P      VLI
[  166.040000] EFLAGS: 00210202   (2.6.20-16-generic #2)
[  166.040000] EIP is at 0xd
[  166.040000] eax: ed74ac80   ebx: ed74aca4   ecx: 0000000d   edx: f8e28480
[  166.040000] esi: ed74ac80   edi: d8149000   ebp: ed74acac   esp: e11a1f28
[  166.040000] ds: 007b   es: 007b   ss: 0068
[  166.040000] Process cat (pid: 5912, ti=e11a0000 task=dd24e560 
task.ti=e11a0000)
[  166.040000] Stack: f8d5953c 00000010 c1302920 d81d8080 d8149000 ed74acac 
c03ba06c
c025924e
[  166.040000]        e9187c00 ed7af784 c01b7af9 00001000 08054000 0804a000 
f8d595c8
e9187c14
[  166.040000]        d89d9440 08054000 e11a1fa0 00001000 c0176dcc e11a1fa0 
e11a1fb8
c01b7a90
[  166.040000] Call Trace:
[  166.040000]  [<f8d5953c>] backlight_show_actual_brightness+0x3c/0x80 
[backlight]
[  166.040000]  [<c025924e>] class_device_attr_show+0x1e/0x30
[  166.040000]  [<c01b7af9>] sysfs_read_file+0x69/0x130
[  166.040000]  [<c0176dcc>] vfs_read+0xbc/0x190
[  166.040000]  [<c01b7a90>] sysfs_read_file+0x0/0x130
[  166.040000]  [<c0177351>] sys_read+0x41/0x70
[  166.040000]  [<c01031f0>] sysenter_past_esp+0x69/0xa9
[  166.040000]  =======================
[  166.040000] Code:  Bad EIP value.
[  166.040000] EIP: [<0000000d>] 0xd SS:ESP 0068:e11a1f28
[  166.040000]

Original comment by gef...@gmail.com on 2 Sep 2007 at 5:30

GoogleCodeExporter commented 8 years ago
to clarify:
i use Acer Aspire 5045
the mode is: AMW0

Original comment by gef...@gmail.com on 2 Sep 2007 at 5:33

GoogleCodeExporter commented 8 years ago
Did you get any warnings when compiling acer_acpi?

Original comment by cathec...@gmail.com on 3 Sep 2007 at 9:33

GoogleCodeExporter commented 8 years ago
still exist with version 0.8.1
when compiling:
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-generic'
  CC [M]  /root/acer_acpi-0.8.1/acer_acpi.o
/root/acer_acpi-0.8.1/acer_acpi.c: In function ‘acer_backlight_init’:
/root/acer_acpi-0.8.1/acer_acpi.c:1248: warning: assignment makes pointer from
integer without a cast
/root/acer_acpi-0.8.1/acer_acpi.c: At top level:
/root/acer_acpi-0.8.1/acer_acpi.c:1519: warning: initialization from 
incompatible
pointer type
/root/acer_acpi-0.8.1/acer_acpi.c:1520: warning: initialization from 
incompatible
pointer type
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/acer_acpi-0.8.1/acer_acpi.mod.o
  LD [M]  /root/acer_acpi-0.8.1/acer_acpi.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-generic'

dmesg:
[16184.852000] acer_acpi: Acer Laptop ACPI Extras version 0.8
[16184.852000] acer_acpi: Detected Acer AMW0 interface
[16184.852000] Registered led device: acer_acpi:mail
[16285.376000] BUG: unable to handle kernel NULL pointer dereference at virtual
address 0000000f
[16285.376000]  printing eip:
[16285.376000] 0000000f
[16285.376000] *pde = 00000000
[16285.376000] Oops: 0000 [#1]
[16285.376000] SMP
[16285.376000] Modules linked in: acer_acpi led_class snd_rtctimer usbhid 
rfcomm hidp
hid l2cap ppdev powernow_k8 cpufreq_userspace cpufreq_ondemand cpufreq_powersave
cpufreq_conservative cpufreq_stats freq_table dev_acpi pcc_acpi sony_acpi 
tc1100_wmi
asus_acpi dock sbs i2c_ec button battery ac video backlight container ipv6
ndiswrapper parport_pc lp parport fuse serial_cs joydev snd_hda_intel 
snd_hda_codec
snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi 
snd_rawmidi
snd_seq_midi_event snd_seq snd_timer hci_usb snd_seq_device bluetooth pcmcia 
fglrx(P)
i2c_piix4 pcspkr snd soundcore snd_page_alloc serio_raw psmouse yenta_socket
rsrc_nonstatic pcmcia_core k8temp i2c_core ati_agp agpgart af_packet shpchp
pci_hotplug tsdev evdev ext3 jbd mbcache ide_cd cdrom ide_disk generic atiixp 
r8169
ehci_hcd ata_generic libata scsi_mod ohci_hcd usbcore thermal processor fan
capability commoncap vesafb fbcon tileblit font bitblit softcursor
[16285.376000] CPU:    0
[16285.376000] EIP:    0060:[<0000000f>]    Tainted: P      VLI
[16285.376000] EFLAGS: 00210206   (2.6.20-16-generic #2)
[16285.376000] EIP is at 0xf
[16285.376000] eax: d49d92c0   ebx: d49d92e4   ecx: 0000000f   edx: f905b480
[16285.376000] esi: d49d92c0   edi: c4b0c000   ebp: d49d92ec   esp: dde27f28
[16285.376000] ds: 007b   es: 007b   ss: 0068
[16285.376000] Process cat (pid: 7901, ti=dde26000 task=f784c030 
task.ti=dde26000)
[16285.376000] Stack: f884553c 00000010 c1096180 d7597080 c4b0c000 d49d92ec 
c03ba06c
c025924e
[16285.376000]        d6d6f6c0 d79b94e4 c01b7af9 00001000 08054000 0804a000 
f88455c8
d6d6f6d4
[16285.376000]        e70c8cc0 08054000 dde27fa0 00001000 c0176dcc dde27fa0 
dde27fb8
c01b7a90
[16285.376000] Call Trace:
[16285.376000]  [<f884553c>] backlight_show_actual_brightness+0x3c/0x80 
[backlight]
[16285.376000]  [<c025924e>] class_device_attr_show+0x1e/0x30
[16285.376000]  [<c01b7af9>] sysfs_read_file+0x69/0x130
[16285.376000]  [<c0176dcc>] vfs_read+0xbc/0x190
[16285.376000]  [<c01b7a90>] sysfs_read_file+0x0/0x130
[16285.376000]  [<c0177351>] sys_read+0x41/0x70
[16285.376000]  [<c01031f0>] sysenter_past_esp+0x69/0xa9
[16285.376000]  =======================
[16285.376000] Code:  Bad EIP value.
[16285.376000] EIP: [<0000000f>] 0xf SS:ESP 0068:dde27f28
[16285.376000]

Original comment by gef...@gmail.com on 3 Sep 2007 at 11:40

GoogleCodeExporter commented 8 years ago
Please try commenting out line 1248:

bd->props->get_brightness = read_brightness(NULL);

Original comment by cathec...@gmail.com on 3 Sep 2007 at 11:47

GoogleCodeExporter commented 8 years ago
it fixed the problem.
now everything works.
also the brightness is detected by kpowermanager and adjusted 

Original comment by gef...@gmail.com on 3 Sep 2007 at 1:15

GoogleCodeExporter commented 8 years ago
Thanks - fixed in SVN (will add to 0.8.2 release later).

Original comment by cathec...@gmail.com on 3 Sep 2007 at 1:41

GoogleCodeExporter commented 8 years ago
Original issue (/proc errors) is now also "fixed" and will be in 0.8.2

Original comment by cathec...@gmail.com on 3 Sep 2007 at 2:07