Sei sulla pagina 1di 28

Diario di installazione

Linux Feisty Fawn

16 agosto 2007

Abilitare il Bluetooth

Il modulo BT integrato del Vaio VGN-S2XP è di vecchia generazione ed è


piuttosto inaffidabile (meglio sostituirlo con una qualsiasi chiavetta Usb,
magari 2.0 con Edr). Non è comunque tutta colpa del modulo, uno script di
Feisty è infatti sbagliato.
Per prima cosa occorre installare con synaptic il pacchetto “bluetooth” che
dovrebbe attivare come dipendenze anche bluez-cups, bluez-gnome, bluez-pin
e bluez-utils (questi sono i pacchetti attivati di default nella mia installazione).
A questo punto occorre modificare il file hcid.conf (il file di configurazione di
riferimento per il bluetooth, molto semplice e breve)

sudo gedit /etc/bluetooth/hcid.conf

sostituendo

security user;

con

security auto;

meglio annotare anche il pin o modificarlo

passkey "1234";

quindi riavviamo lo stack Bluetooth

sudo /etc/init.d/bluetooth restart

o ancora meglio riavviamo il sistema, per essere sicuri che i pacchetti siano
tutti attivati.
Nel menu System/Preferences dovremmo trovare Bluetooth preferences.
Controlliamo che nella finestra sia seleziona “Only display when adapter
present”. Collegando una chiavetta Usb-BT o attivando il modulo interno, nel
tray deve apparire l’icona del bluetooth di Gnome, che a differenza di quella di
Windows è solo un segnale, non serve a molto, ma almeno ci dice che tutto sta
andando bene.

Siccome con i sistemi Windows Mobile 5 il modo più comodo per collegare a
internet il notebook è usare la PAN, prima di procedere dobbiamo creare una
nuova interfaccia, editando il file

sudo gedit /etc/network/interfaces

dove in coda è necessario aggiungere:

auto bnep0
iface bnep0 inet static
address 192.168.0.103
netmask 255.255.255.0
gateway 192.168.0.1

o in alternativa:

auto bnep0
iface bnep0 inet dhcp

L’interfaccia bnep0 sarà attivata solo quando avremo stabilito la connessione


PAN con il terminale WM5, ma quando è attiva può essere modificata
(indirizzo statico o dhcp) anche da System/Administration/Network.

A questo punto attiviamo il bluetooth sul palmare e apriamo nuovamente il


terminale, dove digiteremo

hcitool scan
Il comando rileva il terminale remoto di cui indica anche l’indirizzo MAC e il
nome.

Per effettuare il collegamento in una guida suggerivano di definire prima i Pin


in entrata e in uscita con il comando bluez-pin, come qui sotto:

bluez-pin in WINDOWSMOBILE20
bluez-pin out WINDOWSMOBILE20

Dove WINDOWSMOBILE20 è il nome rilevato da hcitool scan, ma di fatto


avendo modificato il file di configurazione del bluetooth hcid.conf, questo
passaggio sembra del tutto superfluo.

Ora siamo pronti per gli ultimi due passi, che dovranno essere ripetuti tutte le
volte che vogliamo effettuare il collegamento. Per prima cosa attiviamo
l’applicazione Condivisione internet sul terminale WM5, quindi selezioniamo
la connessione Dati e il collegamento PAN Bluetooth. Quando il cellulare è
connesso digitiamo:

sudo modprobe bnep


sudo pand -–connect 00:17:83:01:3B:39

La prima volta il sistema remoto dovrebbe visualizzare una finestra che chiede
di inserire il Pin. Se la procedura non funziona occorre provare a effettuare
l’accoppiamento dal terminale WM5, lasciando attivo il bluetooth sul Pc.

Per controllare se il collegamento è stato stabilito possiamo utilizzare

sudo pand -l

ma la vera prova del nove è un bel ping su , per vedere se Ubuntu riesce a
contattare i server dns ed è effettivamente collegato a internet. Ogni tanto,
con la configurazione Dhcp, il terminale WM5 non riesce ad assegnare un
indirizzo a Ubuntu, impedendo il collegamento a internet. Il problema è
risolvibile utilizzando un indirizzo statico come indicato più sopra.

A questo punto l’ideale sarebbe preparare un script da richiamare


velocemente ogni volta che si desidera effettuare il collegamento.

Per ulteriori verifiche di seguito riporto il risultato di ifconfig relativo alla


connessione bnep0, quando tutto va bene

bnep0 Link encap:Ethernet HWaddr 00:16:93:01:03:B2

inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: 2002:d9ca:c53c:f:216:93ff:fe01:3b2/64 Scope:Global

inet6 addr: fec0::f:216:93ff:fe01:3b2/64 Scope:Site

inet6 addr: fe80::216:93ff:fe01:3b2/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:267 errors:0 dropped:0 overruns:0 frame:0

TX packets:407 errors:0 dropped:0 overruns:0 carrier:0


collisions:0 txqueuelen:1000

RX bytes:117986 (115.2 KiB) TX bytes:44985 (43.9 KiB)

Se la connessione non va a buon fine sono presenti solo gli indirizzi inet6, ma
non inet (Ipv4):

gianluca@ubu:~$ ifconfig
bnep0 Link encap:Ethernet HWaddr 00:01:4A:13:D4:F4

inet6 addr: fe80::201:4aff:fe13:d4f4/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:4 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:24 (24.0 b) TX bytes:124 (124.0 b)

Spegnimento dello schermo

Nonostante lo schermo diventi scuro, non si spegne la lampada di


retroilluminazione. Questo comando permette di spegnerlo, per controllare se
è possibile farlo almeno a mano:

xset dpms force off

Per riaccendere la lampada basta muovere il puntatore o premere un tasto.


Ora occorre modificare il file xorg.conf

sudo gedit /etc/X11/xorg.conf

Controllando che nella sezione monitor sia attivato il DPMS come qui sotto:

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS" "true"
EndSection

Riavviare Xorg per ricaricare il file di configurazione se è stato cambiato


qualcosa e inviare il comando seguente per controllare che il DPMS sia attivo:
grep DPMS /var/log/Xorg.0.log

Anche cambiando i driver da quelli open a quelli proprietari e utilizzando XGL


non ci sono problemi a spegnere il monitor.

Abilitare il risparmio energetico della scheda grafica

Nello stesso file /etc/X11/xorg.conf è possibile abilitare anche il risparmio


energetico delle Gpu Ati e probabilmente anche di altri modelli

Section "Device"

Identifier "ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]"

Driver "fglrx"

Busid "PCI:1:0:0"

Option "DynamicClocks" "on"

EndSection

Per controllare se PowerPlay è attivo digitare:

grep Dynamic /var/log/Xorg.0.log

Il problema è la gestione del risparmio energetico che con i driver fglrx 8.34.8
della Feisty non sembra essere disponibile. Il problema riguarda in realtà il
settaggio DynamicClocks nel file xorg.conf. A quanto pare infatti non è
possibile attivarlo. E’ probabile che in alternativa sia possibile utilizzare
atieventsd ma non sono riuscito ad attivarlo. E’ invece possibile accedere alle
informazioni sugli stati di risparmio energetico con:

DISPLAY:0 aticonfig --lsp

E modificare lo stato utilizzando

DISPLAY=:0 aticonfig –set-powerstate=1

utilizzando i valori indicati da list-powerstates. La dicitura DISPLAY:0 serve


solo nel caso sia attivo XGL. Così anche per attivare fireglcontrol è necessario
utilizzare:
DISPLAY:0 fireglcontrol

Non riesco ad attivare uno script automatico dalla directory /etc/acpi/ac.d o


battery.d, nonostante abbia inserito due script che dovrebbero cambiare lo
stato in base all’alimentazione. Non è molto chiaro lo script power.sh che
dovrebbe essere richiamato.

Il demone atieventsd deve essere lanciato anch’esso indicando il display 0, ma


non funziona se non viene attivato come root, quindi:

DISPLAY:0 sudo atieventsd

Il risultato positivo è riscontrabile nel registro di sistema, ma non si capisce


cosa faccia questo demone, visto che passando dall’alimentazione a batteria a
quella elettrica e viceversa non cambia niente. In più, visto che ha bisogno dei
privilegi di root non sono riuscito ad avviarlo al boot.

Registrare gli eventi Acpi

Utile anche per i tasti speciali:


sudo tail -f /var/log/acpid

Per ricaricare il demone:

/etc/init.d/acpid restart

Attivare i driver video proprietari e mantenere gli effetti

I driver proprietari non sono compatibili con gli effetti desktop di Compiz, che
quindi viene automaticamente disabilitato. Per evitare questo problema per
prima cosa occorre abilitare i driver restricted
(System/Amministrazione/Restricted Drivers Manager). A questo punto
dobbiamo installare XGL, perché i driver proprietari non sono compatibili con
Aiglx:

sudo apt-get install xserver-xgl

e creare uno script per avviarlo (con sudo gedit /usr/local/bin/startxgl.sh) che
contiene queste righe:
#!/bin/sh

Xgl :1 -fullscreen -ac -br -accel xv:pbuffer -accel glx:pbuffer &

DISPLAY=:1

cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"

xauth -i add :1 . "$cookie"

exec dbus-launch --exit-with-session gnome-session

Occorre anche modificare i permessi e renderlo eseguibile con:

sudo chmod a+x /usr/local/bin/startxgl.sh

Poi dobbiamo creare una nuova voce nell’elenco delle sessioni nella finestra di
login (sudo gedit /usr/share/xsessions/xgl.desktop) inserendo:

[Desktop Entry]

Encoding=UTF-8

Name=GNOME with XGL

Comment=

Exec=/usr/local/bin/startxgl.sh

Icon=

Type=Application

Anche in questo caso cambiamo i permessi:

sudo chmod a+x /usr/share/xsessions/xgl.desktop

A questo punto usciamo dalla sessione utente (logout) e rientriamo nella


nuova sessione Gnome with XGL. Se tutto va bene siamo pronti per attivare gli
effetti dal classico controllo System/Preferenze/Effetti desktop, oppure
possiamo attivare con Synaptic il pacchetto gnome-compiz-manager, che
aggiunge alle preferenze il controllo GL desktop.

E’ possibile anche aggiungere gli effetti inserendo una serie di comandi sul
terminale, che non ho provato ma dovrebbero garantire un maggiore
controllo:

sudo wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O-


| sudo apt-key add -
sudo gedit /etc/apt/sources.list

Quindi aggiungiamo nel file appena aperto questa riga:


deb http://download.tuxfamily.org/3v1deb feisty eyecandy

Salviamo, usciamo e digitiamo:

sudo apt-get update


sudo apt-get install compiz compizconfig-settings-manager
compiz-plugins compiz-gnome compiz-fusion-plugins-extra emerald
emerald-themes

Per attivare Compiz occorre creare due nuove voce in


System/Preferenze/Sessioni:

1- compiz –replace
2 - emerald-replace

Per controllare lo stato del driver:

DISPLAY=:0 glxinfo | grep render

Ci sono guide in giro per aggiornare i driver all’ultima versione fornita dalla
Ati, ma hanno un effetto negativo su Xgl. Per tornare ai driver precedenti
basta rimuovere quelli nuovi (tutti quelli che hanno fglrx nel nome,
dovrebbero essere 4 pacchetti) anche utilizzando Synaptic e quindi
reinstallare quelli vecchi con i comandi:

sudo apt-get update


sudo apt-get install linux-restricted-modules-$(uname -r)
sudo apt-get install xorg-driver-fglrx
sudo depmod -a

Se ci sono problemi con la directory /etc/ati che non è vuota (passo a riga 3),
basta eliminarla con sudo mv /etc/ati /etc/ati.bak . La procedura che non ha
funzionatp è disponibile su
http://wiki.cchtml.com/index.php/Ubuntu_Feisty_Installation_Guide .

Attivare l’indicizzazione e controllare lo stato

Su Ubuntu non conviene installare Beagle, visto che il supporto al ben più
veloce Tracker è già operativo e sarà ancor meglio in futuro. Per abilitare
l’indicizzazione è sufficiente aprire Synaptic e installare i pacchetti tracker,
tracker-search-tool e tracker-utils, con le dipendenze del caso.
Per attivare il demone trackerd, cliccare su System/Preferenze/Sessioni,
quindi su New e inserire Name:Tracker, Command: trackerd
Utilizzando il pannello della barra delle applicazioni, potrebbe verificarsi un
errore all’apertura. Per un certo periodo mi è bastato disabilitare trackerd dal
pannello Sessioni, ma dopo un po’ in modo inspiegabile l’errore è ritornato. A
quanto pare la cosa sarà risolta con la versione 0.6 di Tracker (quella presente
in Synaptic è la 0.5.4).
Per visualizzare lo stato dell’indicizzazione basta digitare tracker-stats in un
terminale, ecco un esempio:

gianluca@ubu:~$ tracker-stats
-------fetching index stats---------
Development Files : 4
Videos : 34
Text Files : 1131
Documents : 1737
Folders : 2514
Other Files : 2759
Images : 3910
Music : 10830
Total entities indexed : 22919
------------------------------------

Le configurazioni per controllare il demone (come le cartelle da indicizzare)


sono in:

/home/UTENTE/.Tracker/tracker.cfg

Qui è possibile abilitare anche l’indicizzazione delle mail, e soprattutto


controllare se l’indicizzazione è effettivamente abilitata
(EnableIndexing=true).

Abilitare il touchpad e configurare le opzioni

Subito dopo l’installazione il touchpad integrato funziona abbastanza bene,


con tanto di tapping e scrolling, ma è molto sensibile e non ha un sistema di
configurazione a interfaccia grafica. Per installarlo basta aprire Synaptic e
selezionare gsynaptics, anche se il touchpad è prodotto da ALPS. Ora in
System/Preferenze c’è la nuova voce touchpad, con la quale è possibile
regolare la sensibilità, la velocità del tocco e altri parametri, a parte la
disabilitazione del tap quando si digita, purtroppo.

Per evitare che il touchpad venga attivato mentre si utilizza la tastiera oppure
durante lo scrolling è necessario avviare questo script a ogni sessione:

#!/bin/bash
# Disable touchpad for 2 seconds after last key press
# to prevent accidental touchpad activation while typing.
/usr/bin/syndaemon -d -t -i 2

L’opzione SHMConfig deve essere su "on" nel file /etc/X11/xorg.conf. Secondo


quanto specificato su ubuntuforums.org:

the -d flag tells syndaemon to run all the time and monitor the
keyboard presses
the -t flag tells it to only disable tapping and scrolling, not
pointer movement
the -i flag is how long (in seconds) to disable the touchpad
*after* the last keypress

There are a few other options available to fine-tune which


keypresses count, ie Fn combos etc.

Le altre opzioni sono fondamentali, perché il pannello di controllo non è


sufficiente. In particolare è necessario aumentare la velocità altrimenti è
impossibile non tappare continuamente, per spostare continuamente il dito.
Ecco un esempio:

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
Option "MinSpeed" "0.8"
Option "MaxSpeed" "0.8"
Option "SHMConfig" "on"
EndSection

Sospensione e ibernazione

La procedura predefinita per la sospensione funziona bene con i driver grafici


open, ma non è un granché con quelli proprietari. In particolare lo standby
sembra funzionare ancora, mentre l'ibernazione no. Ho provato a installare il
pacchetto uswsusp, che permette di utilizzare i comandi s2ram, s2disk e
s2both.
Per sostituire i vecchi comandi di swsusp con quelli nuovi, è necessario
sostituire due script per dare la priorità al nuovo metodo, senza disinstallare il
vecchio pacchetto, anche se certi tutorial dicono che basta inviare questo
comando, per "nascondere" i pacchetti originali.

sudo dpkg-divert --rename --divert /usr/sbin/pmi-disabled


/usr/sbin/pmi

Per tornare alla configurazione precedente:

sudo dpkg-divert --rename --remove /usr/sbin/pmi

Con me non ha funzionato finché non ho modificato gli script originali con
questi:

tar xjvf hal-system-power-hibernate-linux.tar.bz2


tar xjvf hal-system-power-suspend-linux.tar.bz2

Entrambi gli script sostituiscono gli originali nella cartella


/usr/lib/hal/scripts/linux/ . Qualsiasi update dell'hal riporterà gli script allo
stato precedente, quindi è importante salvarli.

L'ibernazione con uswsusp quando viene utilizzata molta memoria Ram può
essere difficoltosa. Il sistema rimane acceso, con la spia dell'Hd in funzione,
ma non succede niente. Secondo alcuni basta modificare il file
/etc/uswsusp.conf, modificando la dimensione dell'immagine in modo che sia
uguale alla Ram fisica disponibile (1 GB = 1073741824, 512 MB =
536870912). Qualcuno sostiene che nella Feisty i GB si misurano in decimale
quindi 1 GB = 1000000. Il file di ibernazione dovrebbe essere
automaticamente aggiornato ma nel caso è necessario inviare il comando echo
xxx > /sys/power/image_size dalla console di root (sudo su).
Secondo altre guide può essere utile modificare /etc/acpi/hibernate.sh,
sostituendo:

if [ -x /sbin/s2disk ]; then
DEVICE="/dev/disk/by-uuid/`awk -F= '{print $3}'
</etc/initramfs-tools/conf.d/resume`"
if [ -f /etc/usplash.conf ]; then
. /etc/usplash.conf
/sbin/s2disk -x "$xres" -y "$yres" $DEVICE
else
/sbin/s2disk $DEVICE
fi
else
echo -n "disk" >/sys/power/state
fi

con:

if [ -x /sbin/s2disk ]; then
DEVICE="/dev/disk/by-uuid/`awk -F= '{print $3}'
</etc/initramfs-tools/conf.d/resume`"
/sbin/s2disk $DEVICE
else
echo -n "disk" >/sys/power/state
fi

Nel caso è anche possibile creare un file di swap aggiuntivo alla partizione di
swap, che può essere utilizzato quando lo spazio nella partizione si esaurisce
(v. http://www.pluto.it/files/ildp/guide/GuidaSysadm/x1509.html).

Il problema è che l’ibernazione di fatto non spegne del tutto il sistema.


Qualcosa resta in attesa e consuma la batteria, anche se il led è spento. Se
stacco la batteria completamente al ripristino si possono verificare problemi.

C’è anche un altro modo per effettuare la sospensione (Suspend2), ma


richiede la ricompilazione del kernel. Una comparazione fra swsusp, uswsusp
e Suspend2 è disponibile presso http://www.tuxonice.net/features.

Alla fine ho comunque deciso di tornare al predefinito swsusp, che sembra


decisamente piùs tabile anche se l’ibernazione non funziona ancora

Per evitare problemi al ripristino voglio provare a rimuovere lo splash da una


voce del menu di boot di grub (/boot/grub/menus.lst), ma il blocco avviene
prima del ripristino quindi devo trovare la configurazione di swsusp.

Alla fine ho scoperto che il problema non è il driver della scheda grafica, ma il
fatto che quando è attivo Xgl swsusp dice di non avere abbastanza memoria
per salvare l’immagine sul disco. Per aggirare il problema è sufficiente
inserire un nuovo script con:

sudo gedit /etc/acpi/suspend.d/95-set-image-size.sh

che contiene:

#/bin/bash
echo 485864570 > /sys/power/image_size

Con una dimensione dell’immagine così elevata la sospensione viene


effettuata in pochi secondi, mentre riducendola a 1048576 la procedura
rallenta molto, ma comunque viene effettuata.

Nel mio sistema l’ibernazione non spegneva completamente tutti i


componenti. Per evitare che la batteria si scaricasse anche a computer spento
ho dovuto modificare il file /etc/default/acpi-support :

HIBERNATE_MODE=platform
(DOUBLE_CONSOLE_SWITCH=true)

Perché il predefinito shutdown non spegne completamente il notebook. In


questo modo l’ibernazione consuma meno energia, ma non è a 0. Per ridurre
ulteriormente i consumi occorre disabilitare la funzione wake on lan della
scheda Ethernet, modificando il file /etc/init.d/bootmisc.sh , con l’aggiunta
della riga:

/usr/sbin/ethtool -s eth0 wol d

Non funziona il parametro del kernel (modificando il file /boot/grub/menu.lst


nella voce corrispondente al kernel che verrà caricato):

video=radeonfb:force_sleep

Né il modulo seguente nel file /etc/modules :


radeonfb force_sleep=1

Per verificare il funzionamento dmesg | grep radeonfb. Con questa funzione


attivata però lo standby non effettua il resume e dopo l’ibernazione ci possono
essere artefatti sullo schermo, che poi spariscono.

Per evitare invece i problemi con il driver Usb (che in realtà non sembrano
avere effetti concreti, ma solo una visualizzazione di errori durante le
operazioni di spegnimento), ho inserito, in modo probabilmente non consono,
ho fatto le seguenti modifiche:

File /etc/acpi/suspend.d/70-modules-unload.sh – aggiungere

# remove USB for external mouse before sleeping


if lsmod | grep '^usbhid' >/dev/null ; then
/sbin/modprobe -r -s usbhid
fi
if lsmod | grep '^uhci_hcd' >/dev/null ; then
/sbin/modprobe -r -s uhci_hcd
fi
if lsmod | grep '^ehci_hcd' >/dev/null ; then
/sbin/modprobe -r -s ehci_hcd
fi

File /etc/acpi/resume.d/35-modules-load.sh - aggiungere

# restore USB support


if !(lsmod | grep '^ehci_hcd') >/dev/null ; then
/sbin/modprobe -s ehci_hcd
fi
if !(lsmod | grep '^uhci_hcd') >/dev/null ; then
/sbin/modprobe -s uhci_hcd
fi
if !(lsmod | grep '^usbhid') >/dev/null ; then
/sbin/modprobe -s usbhid
fi
E’ decisamente più veloce modificare il file /etc/default/acpi-support

MODULES="usbhid uhci_hcd ehci_hcd ohci1394 yenta_cardbus e100"

Che provvede autonomamente a scaricare e caricare i moduli indicati.

Nonostante questo con l’ibernazione la batteria continua a scaricarsi.


Provando con Fn+F12 sembra che le cose vadano decisamente meglio, anche
se devo provare ancora.

Spegnere la luce del lettore integrato di Memory Stick

Il metodo è un po’ drastico, ma visto che il lettore serve a poco o niente basta
eliminare il driver. Per prima cosa verifichiamo se il driver è caricato con:

lsmod | grep tifm

quindi ho aggiornato il file dei driver blacklisted

sudo gedit /etc/modprobe.d/blacklist

aggiungendo in fondo:

# Lettore memory stick del Vaio


blacklist tifm_sd
blacklist tifm_7xx1
blacklist tifm_core
blacklist mmc_core

Quali applicazioni scegliere

Truecrypt - è disponibile da riga di comando, ma c'è anche un front end


chiamato Forcefield, che una volta isntallato si trova nel menu Accessori.

Skype - è disponibile anche per Linux, purtroppo per ora non manda gli Sms

Keepass - si chiama keepassx ma è del tutto identico a quello di Windows. Non


ne ho testato l'integrazione.

Firefox - funziona da dio

Thunderbird - idem come sopra. Per attivare l'indicizzazione dei messaggi v.


sezione dedicata a tracker.
Evolution - meglio di Outlook, ma per non incasinarmi con i messaggi ho
comunque preferito delegare la posta a Thunderbird. Per importare i contatti
è necessario esportarli in formato Vcard, anche in un solo file, mentre per il
calendario bisogna correggere i file ics esportati da Windows Vista perché non
sono pienamente compatibili.

Tomboy - non può sostituire OneNote, ma è veramente ottimo per salvare note
rapide, molto più di OneNote. Opto per i classici file di testo per evitare future
sorprese, utilizzando Abiword e utilizzando una cartella con i file di
riferimento.

OpenOffice - sostituisce tutti i programmi Office a parte Outlook e OneNote in


modo egregio. Non si spiega perché l'antialiasing non è affidato al sistema
operativo.

Risparmiare energia

Alcuni comandi da eseguire per provare a risparmiare energia:

sudo iwpriv eth1 set_power 5

(5 maggiore risparmio energetico, 1 migliori prestazioni, si può usare anche 7


forse)

cd /sys/devices/system/cpu/cpu0/cpufreq
cat ondemand/sampling_rate_max > ondemand/sampling_rate

Da sudo su, permette di ridurre la frequenza di campionamento dello stato di


idle della Cpu (problema risolto dal kernel 2.6.22-rc1

echo 5 > /proc/sys/vm/laptop_mode

La modalità laptop mode riduce l’utilizzo del disco in scrittura

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

Riduce la frequenza di writeback del kernel.

echo 1 > /sys/bus/pci/drivers/ipw*/*/rf_kill

Interrompe l’utilizzo della scheda wifi.

ethtool -s eth0 wol d

Disabilita il wake-on-lan. Per disabilitarlo definitivamente inserire la stessa


riga nel file /etc/init.d/bootmisc.sh .

Per capire dove sono i problemi:

• strace -p $(pidof yourapp) # for all your running


applications
• powertop
• sysctl vm.block_dump=1 # and look at dmesg
• ps aux | awk '{print$10,$11}' | sort -n # will list all
running softs sorted by used cpu time

Per l’undervolting un buon twiki è


http://www.thinkwiki.org/wiki/Pentium_M_undervolting_and_underclocking

Per ridurre l’accesso al disco è possibile attivare la modalità laptop-mode solo


quando il computer è alimentato a batteria, basta modificare il file acpi-
support:

sudo gedit /etc/default/acpi-support

controllando che sia presente la voce:

ENABLE_LAPTOP_MODE=true

Nello stesso file controllare che:

HIBERNATE_MODE=platform

Perché il predefinito “shutdown” non spegne completamente il notebook.


Nonostante il miglioramento c’è ancora qualche componente che resta acceso,
per ulteriori informazioni v. voce corrispondente.

Tastiera

A un certo punto il tasto alt non risultava disponibile, ma invertendolo


all’interno di Sistema/Preferenze/GL desktop con il tasto Windows era
possibile recuperarlo. Il problema però non era qui. Per qualche strano motivo
il tasto Alt era stato disabilitato da Preferenze/Tastiera, in concomitanza con il
passaggio a Xgl.

Inviare Sms

Installa gnome-phone-manager. Collega il telefono con il cavo Usb (gnome-


phone-manager per qualche strano motivo non rileva il telefono via BT anche
se Hcitool lo trova e anche se sul terminale sembra trovarlo) quindi invia il
comando:

ls -l /dev/ttyACM*

Per trovare la porta a cui è collegato. Copia il valore dentro al campo Other
port nelle preferenze di Phone Manager (è nel menu Applicazioni/Accessori).

Modifiche a Gnome

Per applicare alcune modifiche al comportamento di Gnome ho installato


gtwekui, che va a finire con 4 nuove icone nel menu Sistema/Preferenze.
Attenzione all'opzione per salvare le sessioni. Meglio utilizzare il controllo
Sistema/Preferenze/Sessioni. Inoltre applicazioni come OpenOffice continuano
ad aprirsi ma non recuperano il file su cui stavo lavorando.

Salvare le sessioni

Abilitando il salvataggio delle sessioni con gtweakui mi è capitato di perdere i


temi delle finestre (ovvero ho perso i temi) e di prolungare il caricamento di
parecchio, prima ancora di poter avere a disposizione la rete. Per eliminare il
problema ho dovuto riabilitare gli effetti desktop in
Sistema/Preferenze/Gldesktop e cancellare il file session nella directory
/home/.../.gnome2/

Condividere le cartelle

Dopo aver installato i pacchetti richiesti da Sistema/Amministrazione/Cartelle


condivise, visto che non c'è modo di far accedere alle cartelle di Ubuntu un
utente che non sia registrato sullo stesso Ubuntu, ho modificato il file
/etc/samba/smb.conf sostituendo security = user con security = share. Per
riavviare Samba il comando è:

sudo /etc/init.d/samba restart

Altre guide

How to improve sub-pixel font rendering for Feisty


• This will improve the appearance of fonts.
• The patched libraries are built against Freetype 2.3.x (not currently in
Feisty) and include David Turner's sub-pixel rendering patches.
• For i386, read #How to add extra repositories and add the following to
the repository list (or directly to /etc/apt/sources.list using gedit):
deb http://www.telemail.fi/mlind/ubuntu feisty fonts
deb-src http://www.telemail.fi/mlind/ubuntu feisty fonts

Add the repository keys: gpg --keyserver subkeys.pgp.net --recv-keys


937215FF
gpg --keyserver subkeys.pgp.net --recv-keys 937215FF
gpg --export --armor 937215FF | sudo apt-key add -

• For AMD64/EMT read #How to add extra repositories and add the
following to the repository list (or directly to /etc/apt/sources.list using
gedit):
deb http://ubuntu.moshen.de feisty experimental
deb-src http://ubuntu.moshen.de feisty experimental

Add the repository keys:


wget http://ubuntu.moshen.de/2F306651.gpg -O- | sudo apt-key add -

Note: 25th July 2007 - This repository doesn't work.


• Install the font packages
gksudo apt-get update
gksudo apt-get install libfreetype6 libcairo2 libxft2

• Reconfigure font settings. The following settings work well: Native,


Automatic, No bitmapped fonts.
gksudo dpkg-reconfigure fontconfig-config
gksudo dpkg-reconfigure fontconfig

• Reboot your computer or restart X-Windows to see the changes take


effect.
Note: If you later decide to go back to Ubuntu packages, you must downgrade
all three installed packages. For more info: see here.

There are various locations in GNU/Linux in which fonts can be kept. These
locations are defined in /etc/fonts/fonts.conf; standard ones include
/usr/share/fonts, /usr/local/share/fonts, and
/home/<username>/.fonts (where <username> is your user name).
The easiest way to install a truetype font is to press alt-F2 and enter the
following code (this will open nautilus in the right directory):
gksu nautilus /usr/share/fonts/truetype

Then create a new directory, name the directory whatever you like (choose a
name that you remember if you ever need to backup your fonts personal
fonts). Copy the fonts into that directory and finally rebuild the font
information files by pressing alt-F2, mark 'run in terminal' so you can see the
progress and entering the following code:
sudo fc-cache -f -v

Note: After you install a new font, you will need to make sure that programs
in which you want to use the new fonts can recognize them. In most cases this
is done by closing and reopening the programs; however, some programs may
require you to log out and log back in.
The easiest place for people to put their fonts is /home/<username>/.fonts. If
you have not already done so, create this folder:
• Open your home folder in Nautilus (GNOME) or Konqueror (KDE).
• Since dot-folders are really hidden folders, you need to choose "Show
Hidden Files" from the View menu.
• Go to File -> Create Folder (GNOME), or right-click and choose
Create New -> Folder (KDE).
• Name the new folder ".fonts".
Now double click on the folder to open it, and drag and drop your fonts into
the folder.
On GNOME, you can also directly open the virtual folder fonts:/ (within a
Nautilus window, choose Go -> Location or press Ctrl+L) and drag and drop
fonts into this folder.
However, fonts that are added by either of the ways above will only be
available for one user. To make them available system-wide, drag and drop
them to the directory /usr/share/fonts. (Note: If you're on Kubuntu you may
have to cd to /usr/share/fonts and run mkfontscale, mkfontdir, fc-cache
after this. See the instructions below.)
As in the last method, on GNOME you can also add fonts directly to fonts:/.
However, you must open the virtual folder as root. You can do this by opening
a terminal window and running
gksudo nautilus fonts:

My computer with Xubuntu feisty had a problem with getting an ip-

adress after waking from hibernation. I´ve solved this problem by

changing /etc/default/acpi-support

Editing this file, look for the line below, where to add

[networking] after that no problems anymore:

# Add services to this list to stop them before suspend and

restart them in
# the resume process.

STOP_SERVICES="networking"

Hope this will work for you to,

Thomas.

The wireless network starts working again if I run


sudo modprobe -r ipw3945
sudo modprobe ipw3945
Giampiero

I can't connect to the wireless network.


After some testing I noticed that if i manually do:
iwconfig eth1 essid myessid
iwconfig eth1 key myhexkey
iwconfig eth1 mode Managed
The problem is when getting an IP, if I do dhclient eth1 it works if it is the first
time I connect to any network (wired or wireless), but if I disconnect and I
want to connect to another network then the only way is to reboot.
It's weird that no one else has this problem since this seems something that
every user does, so i will keep investingating if the error is on my side.
Thanks for the reply

i found a workaround, after the hibernate i have to do:


ifconfig eth1 down (bring down wireless interface)
then:
ifconfig eth0 or eth1 up (and dhclient that interface)

Giuseppe, il suo blog » Ubuntu Feisty CK Kernel


www.iuculano.it/linux/ubuntu-feisty-ck-kernel
Nota creata: 29 agosto 2007

Ubuntu Feisty CK Kernel


Pubblicato il 22 Aprile 2007 in Ubuntu, Linux.
Nelle mie workstation non può mancare un kernel patchato con le CK patch.
Cosa sono le CK patch?
Cito l’ autore:
“These are patches designed to improve system responsiveness with specific
emphasis on the desktop, but suitable to any workload.”
A pochi giorni dal rilascio di Ubuntu Feisty , ecco il kernel patchato con CK e
ottimizzato per 686 (i386) e core2 (i386)
Ricapitolando, installando questo kernel avrete:
1) Compilazione ottimizzata per 686 o core2
2) Ck patch http://members.optusnet.com.au/ckolivas/kernel/
Come installarlo?
wget http://ubuntu.iuculano.it/AE3BE9AA.gpg -O- | sudo apt-key add -
aggiungete al vostro sources.list:
deb http://ubuntu.iuculano.it feisty all
deb-src http://ubuntu.iuculano.it feisty all
Per 686 (Pentium4):
sudo apt-get update && sudo apt-get install linux-686-ck linux-
headers-686-ck
Per core2:
sudo apt-get update && sudo apt-get install linux-core2-ck linux-
headers-core2-ck
Diamo un nuce -10 al server X:
sudo dpkg-reconfigure -plow x11-common
Alla richiesta ” Valore di nice per il server X. ” digitiamo -10
Feedback molto graditi

SyncML con Evolution

http://sourceforge.net/project/downl...ar.gz&49083195

Unpack it and cd into the unpacked directory (syncevolution-0.5).

Then do

Code:
./configure --prefix=/usr
make
Now I use checkinstall to create a deb file because it is easy to uninstall
later via synaptic. If you have checkinstall installed you can then do
Code:
sudo checkinstall
Or if you do not do
Code:
sudo make install
There are a number of dev packages you need to install but I can't
remember what they are. I believe they were libcurl3-dev, evolution-
data-server-dev and libdb3-dev. If you get errors during the ./configure
stage, see what it is saying is missing. Then open synaptic and look for
that package (sometimes ubuntu lists the packaged as libwhatever).
Install the whatever-dev package and reconfigure. If you have trouble
finding something let me know.

As far as configuring syncevolution, you need to create the following


directory structure renaming what's iin italics:
/home/your_home/.sync4j/evolution/whatever/spds

Then in the spds directory, create two more directories. One named
"sources" and the other "syncml."

In the sources directory create three more directories: "addressbook,"


"calendar," and "todo."

Now for the config files. In each of those three directories you need a
config.txt file.

Here are mine:

addressbook/config.txt
Code:
# name of the source, must match the <source> in
# spds/sources/<source>/config.txt
name = addressbook

# requests a certain synchronization mode:


# two-way = only send/receive changes since last sync
# slow = exchange all items
# refresh-from-client = discard all local items and replace with
# the items on the server
# refresh-from-server = discard all remote items and replace with
# the items on the client
# none = synchronization disabled
sync = two-way

# overrides the supported synchronization modes


syncModes = two-way,slow,refresh-from-client,refresh-from-server

# specifies the format of the data


#
# text/calendar = Evolution calender data (in iCalendar 2.0 format)
# text/x-todo = Evolution task data (iCalendar 2.0)
# text/x-vcard = Evolution contact data in vCard 2.1 format
# (works with most servers)
# test/vcard = Evolution contact data in vCard 3.0 (RFC 2425)
format
# (internal format of Evolution, preferred with
servers
# that support it and thus recommended for
ScheduleWorld
# together with the "card3" uri)
#
# Sending and receiving items in the same format as used by the server
for
# the uri selected below is essential. Errors while parsing and/or
storing
# items one either client or server can be caused by a mismatch between
# type and uri.
type = text/vcard
# picks one of Evolution's data sources:
# enter either the name or the full URL
#
# To get a full list of available data sources,
# run syncevolution without parameters. The name
# is printed in front of the colon, followed by
# the URL. Usually the name is unique and can be
# used to reference the data source.
evolutionsource = Personal

# this is appended to the server's URL to identify the


# server's database
uri = card3

# authentication for Evolution source


evolutionuser =
evolutionpassword =

# used by the SyncML library internally; do not modify


last = 0
Couple notes: the evolutionsource should be the name of your calendar,
addressbook or todo in evolution. If you have a username and password
for evolution, then you need to add them under authentication for
Evolution source. Otherwise leave the username and password blank as I
have.

Here are the other two:

calendar/config.txt
Code:
# name of the source, must match the <source> in
# spds/sources/<source>/config.txt
name = calendar

# requests a certain synchronization mode:


# two-way = only send/receive changes since last sync
# slow = exchange all items
# refresh-from-client = discard all local items and replace with
# the items on the server
# refresh-from-server = discard all remote items and replace with
# the items on the client
# none = synchronization disabled
sync = two-way

# overrides the supported synchronization modes


syncModes = slow,two-way,refresh-from-client,refresh-from-server

# specifies the format of the data


#
# text/calendar = Evolution calender data (in iCalendar 2.0 format)
# text/x-todo = Evolution task data (iCalendar 2.0)
# text/x-vcard = Evolution contact data in vCard 2.1 format
# (works with most servers)
# test/vcard = Evolution contact data in vCard 3.0 (RFC 2425)
format
# (internal format of Evolution, preferred with
servers
# that support it and thus recommended for
ScheduleWorld
# together with the "card3" uri)
#
# Sending and receiving items in the same format as used by the server
for
# the uri selected below is essential. Errors while parsing and/or
storing
# items one either client or server can be caused by a mismatch between
# type and uri.
type = text/calendar

# picks one of Evolution's data sources:


# enter either the name or the full URL
#
# To get a full list of available data sources,
# run syncevolution without parameters. The name
# is printed in front of the colon, followed by
# the URL. Usually the name is unique and can be
# used to reference the data source.
evolutionsource = Personal

# this is appended to the server's URL to identify the


# server's database
uri = cal2

# authentication for Evolution source


evolutionuser =
evolutionpassword =

# used by the SyncML library internally; do not modify


last = 0
todo/config.txt
Code:
# name of the source, must match the <source> in
# spds/sources/<source>/config.txt
name = todo

# requests a certain synchronization mode:


# two-way = only send/receive changes since last sync
# slow = exchange all items
# refresh-from-client = discard all local items and replace with
# the items on the server
# refresh-from-server = discard all remote items and replace with
# the items on the client
# none = synchronization disabled
sync = two-way

# overrides the supported synchronization modes


syncModes = slow,two-way,refresh-from-client,refresh-from-server

# specifies the format of the data


#
# text/calendar = Evolution calender data (in iCalendar 2.0 format)
# text/x-todo = Evolution task data (iCalendar 2.0)
# text/x-vcard = Evolution contact data in vCard 2.1 format
# (works with most servers)
# test/vcard = Evolution contact data in vCard 3.0 (RFC 2425)
format
# (internal format of Evolution, preferred with
servers
# that support it and thus recommended for
ScheduleWorld
# together with the "card3" uri)
#
# Sending and receiving items in the same format as used by the server
for
# the uri selected below is essential. Errors while parsing and/or
storing
# items one either client or server can be caused by a mismatch between
# type and uri.
type = text/x-todo

# picks one of Evolution's data sources:


# enter either the name or the full URL
#
# To get a full list of available data sources,
# run syncevolution without parameters. The name
# is printed in front of the colon, followed by
# the URL. Usually the name is unique and can be
# used to reference the data source.
evolutionsource = Personal

# this is appended to the server's URL to identify the


# server's database
uri = task2

# authentication for Evolution source


evolutionuser =
evolutionpassword =

# used by the SyncML library internally; do not modify


last = 0
Finally, you need to create a config.txt in the
/home/your_home/.sync4j/evolution/whatever/spds/syncml directory.

Here is mine:
Code:
# the base URL of the SyncML server:
# - Sync4j 2.3
#syncURL = http://hartys.org:1972/egroupware/rpc.php
# - Funambol >= 3.0
#syncURL = http://localhost:8080/funambol/ds
# - sync.scheduleworld.com
syncURL = http://sync.scheduleworld.com/funambol/ds

# the SyncML server gets this string and will use it to keep track of
# changes that still need to be synchronized with this particular
# client; it must be set to something unique if SyncEvolution is used
# to synchronize data between different computers
deviceId = sc-api-nat-hartysdesktop

# authorization for the SyncML server


username =
password =

# set to T to enable an HTTP proxy


useProxy = 0
# proxy URL (http://<host>:<port>)
proxyHost =
# user agent string used for HTTP
userAgent = SyncEvolution

# full path to directory where automatic backups and logs


# are stored for all synchronizations; if empty, the temporary
# directory "$TMPDIR/SyncEvolution-<username>-<server>" will
# be used to keep the data of just the latest synchronization run
logdir =

# Unless this option is set, SyncEvolution will never delete


# anything in the "logdir". If set, the oldest directories and
# all their content will be removed after a successful sync
# to prevent the number of log directories from growing beyond
# the given limit.
maxlogdirs =

# This value is the number of changes which are sent to the


# server at once. It is set to a very large number to work around
# problems in either client library or server when items are
# actually sent in multiple chunks during a slow sync - do not edit!
maxModPerMsg = 100000

# used by the SyncML library internally; do not modify


begin =0
end =0
firstTimeSyncMode = 0

serverID =
serverPWD =
serverNonce =
clientNonce =
clientAuthType =
serverAuthType =
isServerAuthRequired = 0
proxyPort = 0
proxyUsername =
proxyPassword =
checkConn = 0
responseTimeout = 0
readBufferSize = 0
maxMsgSize = 0
encryption = 0
Fill in the username and password with what is given to you by
scheduleworld. Customize the device name.

Now to run, do
Code:
syncevolution whatever
with the whatever being what you named
/home/your_home/.sync4j/evolution/whatever
That should do it. Let me know if you have any problems.

Potrebbero piacerti anche