Nuovo di Arch Linux? Nessun problema, fai qui le tue domande
-
plutus
- Arciere
- Messaggi: 203
- Iscritto il: 19 marzo 2010, 17:16
- Località: Paris
Messaggio
da plutus » 1 febbraio 2011, 19:15
ho un piccolo problema con il governor: se avvio il laptop sulla rete elettrica, avvia il governor performance per passare poi su ondemand se stacco la presa (e viceversa). Tutto ok quindi.
Se al contrario al boot sono su batteria, viene cmq avviato il governor performance invece che ondemand. Immagino sia un problema su /etc/acpi/handler.sh che posto di seguito ma...
grazie!
Codice: Seleziona tutto
#!/bin/sh
# Default acpi script that takes an entry for all actions
# NOTE: This is a 2.6-centric script. If you use 2.4.x, you'll have to
# modify it to not use /sys
minspeed0=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`
maxspeed0=`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`
setspeed0="/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"
minspeed1=`cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_min_freq`
maxspeed1=`cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq`
setspeed1="/sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed"
set $*
case "$1" in
button/power)
#echo "PowerButton pressed!">/dev/tty5
case "$2" in
PWRF) logger "PowerButton pressed: $2" ;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/sleep)
case "$2" in
SLPB) echo -n mem >/sys/power/state ;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
ac_adapter)
case "$2" in
AC)
case "$4" in
00000000)
echo "ondemand" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n $minspeed0 >$setspeed0
echo -n $minspeed1 >$setspeed1
#/etc/laptop-mode/laptop-mode start
;;
00000001)
echo "performance" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "performance" >/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo -n $maxspeed0 >$setspeed0
echo -n $maxspeed1 >$setspeed1
#/etc/laptop-mode/laptop-mode stop
;;
esac
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
battery)
case "$2" in
BAT0)
case "$4" in
00000000) #echo "offline" >/dev/tty5
;;
00000001) #echo "online" >/dev/tty5
;;
esac
;;
CPU0)
;;
*) logger "ACPI action undefined: $2" ;;
esac
;;
button/lid)
#echo "LID switched!">/dev/tty5
;;
*)
logger "ACPI group/action undefined: $1 / $2"
;;
esac
-
ilpianista
- Amministratore
- Messaggi: 2952
- Iscritto il: 6 ottobre 2007, 0:41
- Località: Lecce, Italy
-
Contatta:
Messaggio
da ilpianista » 1 febbraio 2011, 19:49
piuttosto che modificare quel file potresti installarti laptop-mode-tools e gestire tutto dai sui file di configurazione.
-
plutus
- Arciere
- Messaggi: 203
- Iscritto il: 19 marzo 2010, 17:16
- Località: Paris
Messaggio
da plutus » 1 febbraio 2011, 20:13
...se posso vorrei evitare di installare nuovi pacchetti (fanno casino con l'esistente?)
-
aleph
- Robin Hood
- Messaggi: 1530
- Iscritto il: 12 febbraio 2008, 16:30
-
Contatta:
Messaggio
da aleph » 1 febbraio 2011, 21:50
probabilmente dipende dal fatto che gli hook acpi vengono eseguiti solo quando lo stato cambia, quindi all'avvio parte sempre in performance (e' il default).
io ti consiglio di togliere le regole acpi e configurare il sistema perche' stia sempre su ondemand. La differenza in prestazioni dovrebbe essere irrilevante, mentre e' utile mantenere bassa la frequenza anche quando si e' collegati alla rete (temperatura piu' bassa, ventola piu' silenziosa, minore usura dei componenti, ecc)
in entrambi i casi ti basta aggiungere il demone cpufreq e configurare /etc/conf.d/cpufreq, contenuti in cpufrequtils (che probabilmente hai gia' installato). E' un falso demone, si limita ad impostare il governor preferito all'avvio. Oppure puoi aggiungere una riga in /etc/rc.local (script eseguito all'avvio, fatto apposta per essere modificato).

Outside of a dog, computers are a man's best friend, inside a dog it's too dark to type.
-
plutus
- Arciere
- Messaggi: 203
- Iscritto il: 19 marzo 2010, 17:16
- Località: Paris
Messaggio
da plutus » 2 febbraio 2011, 9:09
cpufreq dovrebbe già essere configurato correttamente...
quanto a rc.local, che stringa va usata?
Codice: Seleziona tutto
#configuration for cpufreq control
# valid governors:
# ondemand, performance, powersave,
# conservative, userspace
governor="ondemand"
# limit frequency range (optional)
# valid suffixes: Hz, kHz (default), MHz, GHz, THz
min_freq="800MHz"
max_freq="2.40GHz"
# use freq to set up the exact cpu frequency using it with userspace governor
#freq=
-
Nemesis90
- Newbie
- Messaggi: 3
- Iscritto il: 23 marzo 2010, 15:12
- Località: Alba
Messaggio
da Nemesis90 » 2 febbraio 2011, 23:02
Sono daccordo sul fatto di mantenere il governor ondemand anche se alimentato da rete elettrica per i motivi sopra detti.
Se configurato correttamente non devi settare nulla in rc.local, all'avvio il demone si occuperà di settare il governor.
Per configurarlo fai riferimento alla wiki:
https://wiki.archlinux.org/index.php/Cp ... (Italiano)
Se poi hai ancora problemi chiedi
-
plutus
- Arciere
- Messaggi: 203
- Iscritto il: 19 marzo 2010, 17:16
- Località: Paris
Messaggio
da plutus » 3 febbraio 2011, 11:17
posto anche rc.conf ...tutto é settato come indicato nella guida
Codice: Seleziona tutto
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Europe/Paris"
KEYMAP="fr-latin9"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(!ipaq !rndis_host !rndis_wlan !cdc_ether iwlagn iwlcore fuse acpi-cpufreq cpufreq_ondemand vboxdrv)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhost"
#SPLASH="splashy"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"
INTERFACES=(!eth0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng dbus hal networkmanager @netfs @samba @smbnetfs @cups @crond @alsa @avahi gdm)
-
aleph
- Robin Hood
- Messaggi: 1530
- Iscritto il: 12 febbraio 2008, 16:30
-
Contatta:
Messaggio
da aleph » 3 febbraio 2011, 17:18
devi aggiungere cpufreq in DAEMONS=()


Outside of a dog, computers are a man's best friend, inside a dog it's too dark to type.
-
plutus
- Arciere
- Messaggi: 203
- Iscritto il: 19 marzo 2010, 17:16
- Località: Paris
Messaggio
da plutus » 4 febbraio 2011, 2:47
funge
thanks