DEBIAN PRO

DEBIAN PRO
DEBIAN

domingo, 19 de febrero de 2017

Linux CPU speed y ahorro de energia



En estas últimas semanas en modo paranoico, estoy tratando de reducir el consumo eléctrico de mi portátil y al mismo tiempo hacer durar la batería todo lo posible.

Primero instalar los "CPU FREQ Utils", luego definir a mano la velocidad o el modo en el que quiero que trabaje el equipo (CPUs).

# apt install cpufrequtils

# Info sobre las velocidades del CPU que están soportadas.
cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: intel_pstate
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 0.97 ms.
hardware limits: 800 MHz - 1.80 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 1.80 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency is 1.80 GHz (asserted by call to hardware).


# Cambio a una determinada velocidad.
cpufreq-set -f 1000

# Cambio a un modo de funcionamiento. (powersave, performance)
aunque en otros equipos dice ondemand, powersave, conservative.

cpufreq-set -g powersave

lunes, 13 de febrero de 2017

Debian Tactiles


En estos dias configuré un display táctil y touchpad para un equipo "transformer", donde el display se gira y parece una tablet.
Un excelente equipo y ahora demás bastante bueno para leer y manejarlo de manera táctil.

El script que usé debajo, y programé el botón de "giro" para que lo invoque y gire a la izquierda o vuelva al modo normal.
En XFCE, dentro del APP "Keyboard", luego "Application shorcut" y agregar una entrada que invoque al script.



#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
#

if [ -f /tmp/pantalla.txt ]
then
xrandr --output eDP-1 --rotate normal
xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
xinput set-prop 'Atmel' "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1

killall florence

rm /tmp/pantalla.txt

else
xrandr --output eDP-1 --rotate right
xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
xinput set-prop 'Atmel' "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

florence &

echo " " > /tmp/pantalla.txt
chmod 777 /tmp/pantalla.txt

fi

exit 0
#
# fin
#