Bonjour à tous,
Je possède un portable Toshiba Satelitte M40-331 (dont je suis très content) avec lequel je n'avais qu'un seul problème : je ne pouvais pas utiliser les touches Fn (Fn keys), ni changer la luminosité de l'écran.
Etant donné que ce modèle est équipé d'un bios Phoenix et non d'un bios Toshiba, le module toshiba_acpi qui permet de gérer l'acpi et le paquetage fnfx (dépôt fedora) ne fonctionnent pas.
J'aivais précédement trouvé un moyen de régler la luminosité grâce à un programme écrit par un particulier à partir de doc toshiba : s1bl
Mais ce programme avait la désagréable habitude de geler mon portable (reboot par bouton power).
Je me suis donc tourné vers le module omnibook disponible chez sourceforge :
http://omnibook.sourceforge.net/doku.php
Here you can find a linux kernel module for some Toshiba and HP laptops.
This package is intended to provide Linux kernel support for HP OmniBook, HP Pavilion, Toshiba Satellite, Tecra, Equium and Compal laptops.
This code was written using technical documentation provided by Toshiba about some Toshiba Satellites (M40 ...) and Toshiba Tecra S1. But without any documentation about other laptop models.
WARNING The state of this code is experimental. It is provided as is without any warranty. Use at your own risk.
Il y a la liste des portables supportés.
Malheureusement, la compilation de ce module échoue sur des erreurs (sous F7 avec le noyau 2.6.22.5-76.fc7 i686, gcc-c++ 4.1.2-12).
Je me suis donc attelé à corriger les sources (erreurs dans le fichier lcd.c) et j'ai réussi à compiler le module.
Il reste un warning concernant un autre fichier que je n'ai pas encore regardé ("omnibook-2.20070211/nbsmi.c:396: attention : initialization from incompatible pointer type" pour ceux que ça intéresse).
Le résultat n'est pas parfait, peut être à cause du warning ci-dessus, mais le principal (pour moi) est que je peux régler la luminosité de l'écran.
Ce qui marche :
- les touches FnFx clavier numérique
- le réglage de la luminosité par écriture dans /proc/omnibook/lcd
- l'activation/désactivation du wifi par écriture dans /proc/omnibook/wifi
Ce qui ne marche pas :
- le réglage de la luminosité par touches Fn+F6 et Fn+F7
- l'activation/désactivation du wifi par touche Fn+F8
- l'activation/désactivation du son par touche Fn+Esc
Le reste, je n'ai pas testé (faut dire que ça ne m'intéresse pas plus que ça !)
Pour ceux qui voudrait utiliser le module omnibook et qui se heurtent au même problème de compilation que moi, voici le fichier lcd.c modifié pour remplacer celui fourni par l'archive "omnibook-2.20070211.tar.gz" :
lcd.c :
/*
* Backlight Lowlevel Control Abstraction
*
* Copyright (C) 2003,2004 Hewlett-Packard Company
*
*/
#ifndef _LINUX_BACKLIGHT_H
#define _LINUX_BACKLIGHT_H
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/notifier.h>
/* Notes on locking:
*
* backlight_device->ops_lock is an internal backlight lock protecting the
* ops pointer and no code outside the core should need to touch it.
*
* Access to update_status() is serialised by the update_lock mutex since
* most drivers seem to need this and historically get it wrong.
*
* Most drivers don't need locking on their get_brightness() method.
* If yours does, you need to implement it in the driver. You can use the
* update_lock mutex if appropriate.
*
* Any other use of the locks below is probably wrong.
*/
struct backlight_device;
struct fb_info;
struct backlight_ops {
/* Notify the backlight driver some property has changed */
int (*update_status)(struct backlight_device *);
/* Return the current backlight brightness (accounting for power,
fb_blank etc.) */
int (*get_brightness)(struct backlight_device *);
/* Check if given framebuffer device is the one bound to this backlight;
return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */
int (*check_fb)(struct fb_info *);
};
/* This structure defines all the properties of a backlight */
struct backlight_properties {
/* Current User requested brightness (0 - max_brightness) */
int brightness;
/* Maximal value for brightness (read-only) */
int max_brightness;
/* Current FB Power mode (0: full on, 1..3: power saving
modes; 4: full off), see FB_BLANK_XXX */
int power;
/* FB Blanking active? (values as for power) */
int fb_blank;
};
struct backlight_device {
/* Backlight properties */
struct backlight_properties props;
/* Serialise access to update_status method */
struct mutex update_lock;
/* This protects the 'ops' field. If 'ops' is NULL, the driver that
registered this device has been unloaded, and if class_get_devdata()
points to something in the body of that driver, it is also invalid. */
struct mutex ops_lock;
struct backlight_ops *ops;
/* The framebuffer notifier block */
struct notifier_block fb_notif;
/* The class device structure */
struct class_device class_dev;
};
static inline void backlight_update_status(struct backlight_device *bd)
{
mutex_lock(&bd->update_lock);
if (bd->ops && bd->ops->update_status)
bd->ops->update_status(bd);
mutex_unlock(&bd->update_lock);
}
extern struct backlight_device *backlight_device_register(const char *name,
struct device *dev, void *devdata, struct backlight_ops *ops);
extern void backlight_device_unregister(struct backlight_device *bd);
#define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev)
#endif
Quand j'aurai le temps, je compte essayer de corriger le warning cité plus haut (peut être que les touches FnFx qui ne marchent pas actuellement marcheront alors), et faire une interface graphique (glade3) pour régler la luminosité et activer/désactiver le wifi.
N'hésitez pas à me contacter par MP si besoin.
Pour télécharger les sources du module, voir les portables supportés, le how-to pour les réglages, ..., voir sur :
http://omnibook.sourceforge.net/doku.php
Je précise au cas où, que je n'engage pas ma resposabilité sur l'utilisation de ce module et de la correction que j'ai faite (qui marche très bien chez moi). A utiliser à vos propres risques, donc (use at your own risk).
EDIT : J'ai fait l'interface graphique pour gérer la luminosité et le wifi, si quelqu'un est intéressé, me joindre par MP en me donnant une adresse mail, j'enverrai l'exécutable.