You are not logged in.

#1 2007-10-22 22:04:12

Cilyan
Member
From: Toulouse (FR)
Registered: 2006-08-27
Posts: 97
Website

[Solved] Backlight too dark with ASUS Z71V

Hello.

Since last upgrade (2007-10-22) the backlight in my laptop is really too dark. I can barely see what is displayed on the screen and it is really annoying. I have an ASUS Z71V and the backlight is supposed to adjust to ambiant light. And in fact, if I place a light in front of the photosensible cell, the screen become brighter.

So I'd like to increase the brightness level, or to disable adjusting to ambiant light.

I tried to blacklist asus-laptop module, but it does nothing more, to set /proc/acpi/video/VGA/LCDD/brightness but it says the operation is unsupported, to increase /sys/class/backlight/asus-laptop/brigthness but it is set to 15 which is the maximum and I can't force it up.

So please help, it is really annoying !

Thanks,

Cilyan

Last edited by Cilyan (2007-10-23 14:53:43)

Offline

#2 2007-10-23 08:29:24

newgargamel
Member
From: PL, CZ
Registered: 2005-08-28
Posts: 156

Re: [Solved] Backlight too dark with ASUS Z71V

I have the same laptop and the same problem. To disable it I removed backlight from device drivers->graphics(?) and recompiled the kernel. Now is fine but I can't change brightness sad

Offline

#3 2007-10-23 14:53:23

Cilyan
Member
From: Toulouse (FR)
Registered: 2006-08-27
Posts: 97
Website

Re: [Solved] Backlight too dark with ASUS Z71V

Ok, I found a solution.

asus-laptop include for M7V laptops a light sensor control. You will find it in /sys/devices/platform/asus-laptop

The file ls_switch is the state of the light sensor. To disable it,

# echo 0 > ls_switch

The value can be 0 or 1

The file ls_level is the ratio used to adjust backlight. By default it is 0 which is too dark. The solution is

# echo 10 > ls_level

The value is between 0 and 15.

Maybe the file won't appear with only the stock kernel. You will have then to install acpi4asus-cvs at least the version 0.42-3 patched for 2.6.23 kernel. As I'm not the maintainer of the package, I sent the correction to Karol Maciaszek so it's not already available.

Cilyan

Offline

#4 2007-10-23 22:04:15

Cilyan
Member
From: Toulouse (FR)
Registered: 2006-08-27
Posts: 97
Website

Re: [Solved] Backlight too dark with ASUS Z71V

Another post to submit a little tool that avoid manually setting ls_level at each boot.

/etc/rc.d/asus-ls

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

. /etc/acpi/asus-ls.conf

case "$1" in
  start)
    stat_busy "Setting Light Sensor Level"
    echo $ASUS_LS_LEVEL > /sys/devices/platform/asus-laptop/ls_level
    echo $ASUS_LS_ENABLED > /sys/devices/platform/asus-laptop/ls_switch
    stat_done
    ;;
  stop)
    stat_busy "Saving Light Sensor Level"
    if [ $ASUS_SAVE_ENABLED = "1" ]; then
            NEW_ASUS_LEVEL=`cat /sys/devices/platform/asus-laptop/ls_level`
            NEW_ASUS_ENABLED=`cat /sys/devices/platform/asus-laptop/ls_switch`
            
            # Replace values in the configuration file by current values
            cat /etc/acpi/asus-ls.conf \
            | sed -r "s/(ASUS_LS_LEVEL=)([0-9][0-9]?)/\1$NEW_ASUS_LEVEL/" \
            | sed -r "s/(ASUS_LS_ENABLED=)([0-9][0-9]?)/\1$NEW_ASUS_ENABLED/" \
            > /etc/acpi/asus-ls.conf
    fi
    stat_done
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac
exit 0

The config file
/etc/acpi/asus-ls.conf

#!/bin/sh
# Configuration file for ASUS Light Sensor
# This file is used by asus-ls init script.

# Enable saving current level and state in this file
ASUS_SAVE_ENABLED=1

# Enable light sensor
# Value should be either 1 to enable or 0 to disable
ASUS_LS_ENABLED=1

# Light Sensor level
# Value should be between 0 (very dark) to 15 (very light)
ASUS_LS_LEVEL=8

Hope it will help !

Cilyan

Offline

#5 2007-10-28 09:17:33

newgargamel
Member
From: PL, CZ
Registered: 2005-08-28
Posts: 156

Re: [Solved] Backlight too dark with ASUS Z71V

Cilyan wrote:

Maybe the file won't appear with only the stock kernel. You will have then to install acpi4asus-cvs at least the version 0.42-3 patched for 2.6.23 kernel. As I'm not the maintainer of the package, I sent the correction to Karol Maciaszek so it's not already available.

I found a patch on the acpi4asus bug tracker:

--- driver/asus-laptop.c
+++ driver/asus-laptop.c
@@ -731,7 +731,7 @@
                lcd_blank(FB_BLANK_POWERDOWN);
        }
 
-       acpi_bus_generate_event(hotk->device, event,
+       acpi_bus_generate_proc_event(hotk->device, event,
                                hotk->event_count[event % 128]++);
 
        return;
@@ -1074,8 +1074,8 @@
 }
 
 #define  ASUS_LED_UNREGISTER(object)                           \
-       if(object##_led.class_dev                               \
-          && !IS_ERR(object##_led.class_dev))                  \
+       if(object##_led.dev                                     \
+          && !IS_ERR(object##_led.dev))                        \
                led_classdev_unregister(&object##_led)
 
 static void asus_led_exit(void)

but when I try to apply it "patch -i ../new_kernel.patch" I get an error:

can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- driver/asus-laptop.c
|+++ driver/asus-laptop.c
--------------------------
File to patch: driver/asus-laptop.c
patching file driver/asus-laptop.c
Hunk #1 FAILED at 731.
Hunk #2 FAILED at 1074.
2 out of 2 hunks FAILED -- saving rejects to file driver/asus-laptop.c.rej

how did you do it?

Offline

#6 2007-10-31 13:37:45

Cilyan
Member
From: Toulouse (FR)
Registered: 2006-08-27
Posts: 97
Website

Re: [Solved] Backlight too dark with ASUS Z71V

I did the changes by hand and then created a new patch. I just wonder why the patch is so big for 2 changes, but it does work.

I contacted kharg (maintainer of acpi4asus-cvs) to update the package but I didn't get any answer.

You will find the new package here : www.cilyan.org/misc/acpi4asus-cvs.tar.gz
The package contains the PKGBUILD and the patch. Just untar and run a makepkg.

Hope it will help.

Cilyan

Offline

#7 2007-11-11 14:00:36

newgargamel
Member
From: PL, CZ
Registered: 2005-08-28
Posts: 156

Re: [Solved] Backlight too dark with ASUS Z71V

Thanks a lot! I finally got it working big_smile

Offline

#8 2008-07-21 20:19:47

seeeker
Member
Registered: 2008-03-24
Posts: 2

Re: [Solved] Backlight too dark with ASUS Z71V

sorry to bring this from the dead... how do I install after makepkg has been run?

Offline

#9 2008-07-22 13:48:46

newgargamel
Member
From: PL, CZ
Registered: 2005-08-28
Posts: 156

Re: [Solved] Backlight too dark with ASUS Z71V

seeeker wrote:

sorry to bring this from the dead... how do I install after makepkg has been run?

pacman -A asus*

Offline

Board footer

Powered by FluxBB