Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Howto] Config. degli hotkey di laptop Asus della serie M2
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Wed Feb 02, 2005 3:12 pm    Post subject: [Howto] Config. degli hotkey di laptop Asus della serie M2 Reply with quote

Configurazione degli hotkey di laptop Asus della serie M2


0 - Scopo dell'howto

Lo scopo di questo howto è la configurazione degli hotkey dei
portatili Asus della serie M2.
Non ho avuto modo di testare tutto ciò su altri modelli, quindi
nell'eventualità che qualcuno abbia la possibilità di provare quanto
descritto, su altri modelli Asus, potrebbe fornirmi feedback per
l'ampliamento di questo documento.

1 - Requisiti software
Code:
   
    * Un kernel della serie 2.6.x
    * sys-apps/speedfreq
    * sys-apps/acpid
    * app-laptop/acpi4asus
    * x11-libs/xosd
    * media-sound/aumix


2 - Configurazione di ACPI

Iniziamo con la configurazione della sezione ACPI del kernel:

Code:
 Power management options (ACPI, APM)  --->
    [*] Power Management support
    ACPI (Advanced Configuration and Power Interface) Support  --->
       [*] ACPI Support
       [ ]   Sleep States (EXPERIMENTAL)
       <*>   AC Adapter
       <*>   Battery
       <*>   Button
       <*>   Video
       <*>   Fan
       <*>   Processor
             <*>   Thermal Zone
       <*> ASUS/Medion Laptop Extras
    CPU Frequency scaling  --->
       [*] CPU Frequency scaling
          Default CPUFreq governor
        <*>  performance
          <*>   'userspace' governor for userspace frequency scaling
             [*]     /proc/sys/cpu/ interface (2.4. / OLD)
          <*>   CPU frequency table helpers
          <*> ACPI Processor P-States driver
     <*> /proc/acpi/processor/../performance interface (deprecated)


La configurazione precedente abiliterà i moduli necessari per il
corretto funzionamento delle applicazioni che ci apprestiamo ad
installare.

3 - Installazione e di acpid

Code:
$ emerge sys-apps/acpid
$ rc-update add acpid boot
$ /etc/init.d/acpid start

4 - Installazione e configurazione di speedfreq

Code:

# emerge speedfreq
# rc-update add speedfreq boot


Code:
# <vostro_editor_preferito> /etc/conf.d/speedfreq

#       powersave       maximise power savings
#       performance     maximise performance
#       dynamic         adjust speed according to CPU load (default)
#       NNN             set CPU to a fixed speed of NNN MHz
#       auto            let the init script detect current battery status
SPEEDFREQ_SPEED="dynamic"
# For more options refer to `speedfreqd -h`
SPEEDFREQ_OPTS="-u"

# /etc/init.d/speedfreq start


Con il comando (dato anche da utente):

Code:
$ speedfreq -m

è possibile monitorare la frequenza della CPU.

5 - Installazione e configurazione di acpi4asus

Code:
# emerge  app-laptop/acpi4asus x11-libs/xosd media-sound/aumix


Adesso scarichiamo i file di configurazione per acpi4asus. Questi
file sono la versione adattata a questo modello, dei file contenuti nel
pacchetto acpi4asus.

Code:
$ cd ~
$ wget http://gutter.altervista.org/otherstuff/acpi4asusM2.tgz
$ tar xvzf acpi4asusM2.tgz
$ mv asus_acpi .asus_acpi
$ asus_acpid

Provate gli hotKey ;)

Il programma asus_acpid deve essere lanciato ad ogni sessione grafica.
Trovate il metodo utilizzaro dal vostro WM/DE per fare ciò.
In ogni caso è sempre possibile usare un .xinitrc ;)

Nota
Nel caso in cui si usi sys-power/cpufreqd al posto di speedfreq, basta sostituire lo script performance.sh che trovate nel tarball acpi4asusM2.tgz con questo:

Code:

#!/bin/sh

# This button cycles speedfreq's policy between: dyn ==> pe ==> ps

function xosdecho() {
    echo "CPU Frequency Policy: $1" | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=2 --pos=top --align=center --colour=red --delay=4
}

if [ -e ~/.asus_acpi/perf_status ]
    then
    if [ `cat ~/.asus_acpi/perf_status` == pe ]
        then
        cpufreq-set -f 600000
        echo ps >  ~/.asus_acpi/perf_status
        xosdecho "Powersave"
    elif [ `cat ~/.asus_acpi/perf_status` == ps ]
        then
        if [ `cat /proc/acpi/ac_adapter/AC0/state | grep "on-line" | cut -d":" -f2 | sed -e "s/ //g"` == "on-line" ]
            then
            cpufreq-set -g ondemand
        else
            cpufreq-set -g conservative
        fi
        rm ~/.asus_acpi/perf_status
        xosdecho "Dynamic"
    fi
else
    cpufreq-set -f 1600000
    echo pe >  ~/.asus_acpi/perf_status
    xosdecho "Performance"
fi


ed utilizzare il file /etc/cpufreqd.conf che segue:

Code:

[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
pm_type=acpi #(acpi, apm or pmu)
# Uncomment the following line to enable ACPI workaround (see cpufreqd.conf(5))
# acpi_workaround=1
verbosity=4 #(if you want a minimal logging set to 5)

[Profile]
name=ondemand_battery_on
minfreq=600000
maxfreq=1600000
policy=ondemand

[Profile]
name=hight_conservative_battery_off
minfreq=600000
maxfreq=1600000
policy=conservative

[Profile]
name=low_conservative_battery_off
minfreq=600000
maxfreq=1000000
policy=conservative

#
# Battery On
# Default governor: ondemand
#

[Rule]
name=battery_on
ac=on
profile=ondemand_battery_on

#
# Battery Off                   
# Default governor: conservative
# Battery capacity : hight       
#

[Rule]
name=battery_off_hight_capacity
ac=off
battery_interval=60-100
profile=hight_conservative_battery_off

#
# Battery Off 
# Default governor: conservative
# Battery capacity : low
#

[Rule]
name=battery_off_low_capacity
ac=off
battery_interval=0-60
profile=low_conservative_battery_off


ricordandovi di settare i limiti corretti delle frequenze del vostro processore.

Update
Thu Oct 27 21:07:38 CEST 2005: Aggiunta la possibilità di usare cpufreqd
_________________
Registered as User #281564 and Machines #163761


Last edited by gutter on Thu Oct 27, 2005 7:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Feb 02, 2005 3:15 pm    Post subject: Reply with quote

Aggiunto ai post utilissimi sezione howto
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum