disabilitare light sensor (sensore di luce) del notebook

Riconoscimento, installazione e configurazione delle periferiche.
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

Ho un notebook asus m51sn in dual boot Vista/Ubuntu.
Il mio problema è che all'avvio di Ubuntu, dopo aver usato Vista, averlo chiuso e aver riavviato in Ubuntu, la luminosità dell'LCD è al minimo. Posso aumentarla con Fn-F6, ma  il problema si ripresenta la prossima volta.

guardate qui per maggiori dettagli:

http://forum.ubuntu-it.org/viewtopic.php?t=287978

Dopo tantissimi ricerche, ho scoperto che questo problema è dovuto al light sensor del notebook, indi devo assolutamente disabilitarlo. Per farlo devo modificare i due file ls_level ed ls_switch. Ho dato il max dei permessi ai 2 files, poi su terminale da utente root:


echo 15  > /sys/devices/platform/asus-laptop/ls_level
bash: echo: errore di scrittura: Errore di I/O
echo 0  > /sys/devices/platform/asus-laptop/ls_switch
bash: echo: errore di scrittura: Errore di I/O

Che posso fare? Come risolvo??? Stò impazzendo! >:(
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

Re: disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

Nessuno sa aiutarmi?
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

Re: disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

in kern.log ho trovato questo (non sò se può essere utile):

Codice: Seleziona tutto

pippo-laptop kernel: [   13.969654] ACPI: Lid Switch [LID]
pippo-laptop kernel: [   13.992247] asus-laptop: Asus Laptop Support version 0.42
pippo-laptop kernel: [   13.996203] asus-laptop:   M51Sn model detected
pippo-laptop kernel: [   13.999070] Registered led device: asus::mail
pippo-laptop kernel: [   14.057525] ACPI: AC Adapter [AC0] (on-line)
pippo-laptop kernel: [   14.140346] ACPI: Battery Slot [BAT0] (battery present)
pippo-laptop kernel: [   14.336753] acpi device:20: registered as cooling_device2
pippo-laptop kernel: [   14.336898] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:1b/device:1c/input/input6
pippo-laptop kernel: [   14.357014] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
pippo-laptop kernel: [   14.381070] Linux agpgart interface v0.103
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

Re: disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

Aggiungo che in system information , ho trovato tra i kernel modules questo asus_laptop: (vedi img)
p.s.: ma voi la vedete l'immagine? Io la vedo solo se entro col mio login e pass, altrimenti no..
Allegati
Kernel Modules - System Information.png
Ultima modifica di Johnny75_ il venerdì 15 maggio 2009, 10:51, modificato 1 volta in totale.
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

Re: disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

>:(
Ultima modifica di Johnny75_ il venerdì 15 maggio 2009, 10:58, modificato 1 volta in totale.
Johnny75_
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 505
Iscrizione: giovedì 19 giugno 2008, 18:35

Re: disabilitare light sensor (sensore di luce) del notebook

Messaggio da Johnny75_ »

Ho segnalato questo problema in "launchpad Ubuntu --> bug, ai programmatori del modulo asus-laptop.. Credo che adesso la gestione del light sensor dei notebook asus risieda in un modulo del kernel (asus-laptop appunto):

Codice: Seleziona tutto

- asus-laptop.o or asus-laptop.ko (for 2.6.X kernel), a kernel module to handle
  hotkey events, LEDs, Backlight, etc...
 
- asus_acpid, a user-level daemon, based on acpid, to handle events generated
  by the kernel module. This daemon is only provided as an example, you can use
  any tool you want, as all events reported by the driver are inserted in the
  /proc/acpi/event queue. So, if you want, you can use the regular acpid. The
  advantage of this daemon is that it can be launched by any user, and so,
  interact directly with the X session opened by this user. You may then be
  able to launch X programs with this daemon, whereas with the classical ACPI
  daemon, this is not possible easily.
 
 
Table of contents :
 
--------------------------------------------------------------------------------
1. Requirements
 
2. Compilation
 2.1 Kernel module
 2.2 asus_acpid daemon
 
3. Installation
 3.1 Kernel module
 3.2 asus_acpid
 
4. Usage
 4.1 Kernel module
 4.1.1 Display switching
 4.1.2 LED display
 4.2 asus_acpid daemon
 
5. Kernel support
 
6. Unsupported models
 
7. Patches, Errors, Questions:
--------------------------------------------------------------------------------
 
 
 
 
--------------------------------------------------------------------------------
1. Requirements
 
  Kernel 2.4.X or 2.6.X sources, configured for you computer, with ACPI support.
  You also need CONFIG_LEDS_CLASS and CONFIG_BACKLIGHT_CLASS_DEVICE.
 
--------------------------------------------------------------------------------
2. Compilation
 
  For the impatient, simply type make in the top level directory of the
  package, everything should be compiled fine. If it's not the case, read on.
 
 2.1 Kernel module
 
  Go to the driver directory : cd driver
 
  If your kernel tree is not in /lib/modules/<kernel_version_you_use>/build,
  you will have to edit the Makefile to change the line s
	KDIR := /lib/modules/$(KVER)/build
  to reflect the path to your kernel tree :
        KDIR = </absolute_path_to_your_kernel_tree/>
 
  You can also create a link from /lib/modules/<kernel_version_you_use>/build
  to your kernel source tree.
 
  You can edit the Makefile if you wish to change the linker (ld by default)
  and the compiler (gcc by default), or any option defined there ...
 
  Type make, you are done.
 
  To use the backlight and LEDs, you need to activate
  $ make menuconfig
  Device Drivers -->
    Graphics support  --->
      [*] Backlight & LCD device support  --->
          --- Backlight & LCD device support
	      <*>   Lowlevel Backlight controls
    LED devices  --->
      [*] LED Support
      <*>   LED Class Support
 
 2.2 asus_acpid daemon
 
  Go to the asus_acpid directory
 
  Edit the Makefile if you wish to change the default install directories
  (/usr/local/bin and /usr/local/share/man/man8).
 
  Type make, you are done.
 
 
  You can compile both the daemon and the kernel module by typing make in the
  top directory.
 
 
--------------------------------------------------------------------------------
3. Installation
 
  For the impatient, simply type "make install" in the top level directory of
  the package. The kernel module will be installed in
  /lib/modules/2.X.XX/kernel/drivers/misc, and the daemon in /usr/local/bin. If
  it doesn't work, read on.
 
 
 3.1 Kernel module
 
  Go to the driver directory : cd driver
 
  Type "make install", you are done, module is in
  /lib/modules/2.X.XX/kernel/drivers/misc. If the path is wrong, edit the
  Makefile and correct it.
 
 3.2 asus_acpid
 
  Go to the asus_acpid directory
 
  Edit the Makefile if you wish to change the default install directories
  (/usr/local/bin and /usr/local/share/man/man8).
 
  Type "make install", you are done.
 
 
--------------------------------------------------------------------------------
4. Usage
 
 4.1 Kernel module
 
  Try "modprobe asus_acpi". Check your dmesg (simply type dmesg). You should
  see some lines like this :
 
      Asus Laptop Extras version 0.40
        L2D model detected.
 
  If it is not the output you have on your laptop, send it (and the laptop's
  DSDT) to me.
 
  That's all, now, all the events generated by the hotkeys of your laptop
  should be reported in your /proc/acpi/event entry. You can check it, if you
  are root, by doing a "cat /proc/acpi/event" and pressing those hotkeys, you
  should see them appear. You won't be able to open /proc/acpi/event if it is
  already opened by another program, so check if you haven't a daemon running
  (like acpid), before reporting a bug 
 
  You can modify LEDs be echoing values to /sys/class/leds/asus:*/brightness :
    echo 1 >  /sys/class/leds/asus:mail/brightness
  will switch the mail LED on ...
  You can as well know if they are on/off by reading their content and use
  kernel triggers like ide-disk or heartbeat.
 
  You can get informations on the version of your DSDT table by reading the
  /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
  bug report to do, please include the output of this entry.
 
  You can control lcd backlight power and brightness with
  /sys/class/backlight/asus-laptop/. Brightness Values are between 0 and 15.
 
  You can turn the internal Bluetooth adapter on/off with the bluetooth entry
  (only on models with Bluetooth). This usually controls the associated LED.
  Same for Wlan adapter.
 
 4.1.1 Display switching
 
  Note: the display switching code is currently considered EXPERIMENTAL.
 
  Switching works for the following models:
    L3800C
    A2500H
    L5800C
    M5200N
    W1000N (albeit with some glitches)
    M6700R
    A6JC
    F3J
 
  Switching doesn't work for the following:
    M3700N
    L2X00D (locks the laptop under certain conditions)
 
  To switch the displays, echo values from 0 to 15 to
  /sys/devices/platform/asus-laptop/display. The significance of those values
  is as follows:
 
  +-------+-----+-----+-----+-----+-----+
  | Bin   | Val | DVI | TV  | CRT | LCD |
  +-------+-----+-----+-----+-----+-----+
  + 0000  +   0 +     +     +     +     +
  +-------+-----+-----+-----+-----+-----+
  + 0001  +   1 +     +     +     +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 0010  +   2 +     +     +  X  +     +
  +-------+-----+-----+-----+-----+-----+
  + 0011  +   3 +     +     +  X  +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 0100  +   4 +     +  X  +     +     +
  +-------+-----+-----+-----+-----+-----+
  + 0101  +   5 +     +  X  +     + X   +
  +-------+-----+-----+-----+-----+-----+
  + 0110  +   6 +     +  X  +  X  +     +
  +-------+-----+-----+-----+-----+-----+
  + 0111  +   7 +     +  X  +  X  +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 1000  +   8 +  X  +     +     +     +
  +-------+-----+-----+-----+-----+-----+
  + 1001  +   9 +  X  +     +     +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 1010  +  10 +  X  +     +  X  +     +
  +-------+-----+-----+-----+-----+-----+
  + 1011  +  11 +  X  +     +  X  +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 1100  +  12 +  X  +  X  +     +     +
  +-------+-----+-----+-----+-----+-----+
  + 1101  +  13 +  X  +  X  +     +  X  +
  +-------+-----+-----+-----+-----+-----+
  + 1110  +  14 +  X  +  X  +  X  +     +
  +-------+-----+-----+-----+-----+-----+
  + 1111  +  15 +  X  +  X  +  X  +  X  +
  +-------+-----+-----+-----+-----+-----+
 
  In most cases, the appropriate displays must be plugged in for the above
  combinations to work. TV-Out may need to be initialized at boot time.
 
  Debugging:
  1) Check whether the Fn+F8 key:
     a) does not lock the laptop (try disabling CONFIG_X86_UP_APIC or boot with
        noapic / nolapic if it does)
     b) generates events (0x6n, where n is the value corresponding to the
        configuration above)
     c) actually works
     Record the disp value at every configuration.
  2) Echo values from 0 to 15 to /sys/devices/platform/asus-laptop/display.
     Record its value, note any change. If nothing changes, try a broader range,
     up to 65535.
  3) Send ANY output (both positive and negative reports are needed, unless your
     machine is already listed above) to the acpi4asus-user mailing list.
 
  Note: on some machines (e.g. L3C), after the module has been loaded, only 0x6n
  events are generated and no actual switching occurs. In such a case, a line
  like:
 
    echo $((10#$arg-60)) > /sys/devices/platform/asus-laptop/display
 
  will usually do the trick ($arg is the 0000006n-like event passed to acpid).
 
  Note: there is currently no reliable way to read display status on xxN
  (Centrino) models.
 
 4.1.2 LED display
 
  Some models like the W1N have a LED display that can be used to display
  several informations.
 
  LED display works for the following models:
    W1000N
    W1J
 
  To control the LED display, use the following :
 
    echo 0x0T000DDD > /sys/devices/platform/asus-laptop/
 
  where T control the 3 letters display, and DDD the 3 digits display,
  according to the tables below.
 
         DDD (digits)
         000 to 999 = display digits
         AAA        = ---
         BBB to FFF = turn-off
 
         T  (type)
         0 = off
         1 = dvd
         2 = vcd
         3 = mp3
         4 = cd
         5 = tv
         6 = cpu
         7 = vol
 
  For example "echo 0x01000001 >/sys/devices/platform/asus-laptop/ledd"
  would display "DVD001".
 
 4.2 asus_acpid daemon
 
  Now, you have to get a program than can handle events reported by the kernel
  module. The ACPID daemon is perfect for this, it is certainly packaged for
  your distribution, so I suggest you install it. Then you have two solutions:
  handle the events generated by hotkeys directly in the acpid configuration
  files (generally situated in /etc/acpid/), or with an alternate daemon. As I
  mentioned earlier, the advantage of the alternate daemon is that is can be
  launched by a non privileged user and interact directly with the environment
  of this user, that is you can bind one of your hotkeys to an Xterm if you
  wish, what is impossible with the acpid daemon without making dirty hacks...
 
  So, now that you are convinced the alternate daemon is better, we are going
  to install it :
   1) first create a directory .asus_acpi in your home directory
   2) copy everything in samples/ to that directory (cp -r samples/*
      ~/.asus_acpi)
   3) launch asus_acpid (asus_acpid)
   4) press hotkeys, enjoy
  Check the man page of asus_acpid (man asus_acpid) to know of to change the
  configuration.
 
  If you have a "connection refused" message when you try to launch asus_acpid,
  it means you must set a correct path to the socket open by acpid. For this
  check the config file of your acpid daemon. when you know the path to this
  socket, just launch the asus_acpid with "-e /path_to_socket" option.
 
  You can also check if the events are generated by using the small perl
  program included in the asus_acpid directory.
 
 
 
--------------------------------------------------------------------------------
5. Kernel Support
 
  Starting with kernel 2.4.22 and 2.6.X, the driver is included in the vanilla
  source tree. You can still compile the driver outside the kernel tree if you
  like it this way.
 
 
--------------------------------------------------------------------------------
6. Unsupported models
 
  These models will never be supported by this module, as they use a completely
  different mechanism to handle LEDs and extra stuff (meaning we have no clue
  how it works):
 
  - ASUS A1300 (A1B), A1370D
  - ASUS L7300G
  - ASUS L8400
 
 
--------------------------------------------------------------------------------
7. Patches, Errors, Questions:
 
  Please, include the output of /sys/devices/platform/asus-laptop/info and
  /proc/acpi/dsdt (binary file format is just fine) if you can.
 
  acpi4asus-user@lists.sourceforge.net
  http://sourceforge.net/projects/acpi4asus
 
Non ho però ricevuto risposta.. speriamo risolvano presto. Nessuna idea su come risolvere?
Scrivi risposta

Ritorna a “Driver e periferiche”

Chi c’è in linea

Visualizzano questa sezione: criceto45, tropie e 7 ospiti