Monday, February 22, 2010

Grub2: terribly slow at boot

Karmic Koala comes with Grub2, on a fresh install (but it will keep grub legacy on upgrades).

Beside the scarcely comprehensible layer of complexity that grub2 has added to the great old grub, I was very disappointed by the long delay on boot.
After BIOS, the booting process just hanged with a "GRUB starting" message on black screen.
It stays like that for ~15-20 seconds.
Than grub menu shows up.
Amazing, since Karmic was said to be one of the fastest booting experiences one could have....

Now, poossibly the solution is here:

Grub 2 Hangs 10-30 Seconds between Grub 2 Loading and Menu Display.
This is a known bug that can be caused by GRUB 2 and /boot being loaded on different partitions. To fix the problem, run
Code:
sudo dpkg-reconfigure grub-pc
Select to load Grub 2 on the same device as the /boot partition. In your system BIOS, change the drive to boot from first to the drive with the /boot partition.

As it happens, my /boot partition and my /home are on two different disks.
I need to check, but it might actually be that grub got installed on the disk with the /home partition and not the one with /boot and / partitions (which is amazing, since I kept the insalling disk for grub suggested by the installation process....).

Friday, February 19, 2010

Sound issues on Karmic 64bit

Issue and possible solutions, just listed, very few comments.

=================
No sound problem:
=================
Live CD --> everything's fine
Install --> fine
Restart --> install nvidia proprietary --> restart --> no sound!
200+ updates --> restart --> continuous whistle
Disable on board Audio card --> crappy sound, but something, at least.
Movieplayer and Rythmbox ask for additional codecs (to play wma and mp3). I let them download their codecs and reboot.
Still crappy sound (with rythmbox and vlc, no sound at all with movieplayer). See below for sound problem description and possible solutions.

=================
Useful output commands for audio/video troubleshooting
=================
uname -a
aplay -l
arecord -l
amixer -c 0

to check if the system recognizes the soundcard:
aplay -l
lspci -v | less

sounds module installed?:
find /lib/modules/`uname -r` | grep snd


===========
Comprehensive Multimedia & Video Howto
===========
enable medibuntu:
sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update
install all multimedia stuff:
sudo apt-get remove gnash gnash-common libflashsupport mozilla-plugin-gnash swfdec-mozilla && sudo apt-get install alsa-oss faac faad flashplugin-nonfree gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse ia32-libs ia32-sun-java6-bin icedtea6-plugin libmp3lame0 non-free-codecs openjdk-6-jre unrar
install gecko (for audio/video streaming in web browser):
sudo apt-get remove kaffeine-mozilla mozilla-helix-player mozilla-mplayer mozilla-plugin-vlc totem-mozilla xine-plugin
sudo apt-get install gnome-mplayer gecko-mediaplayer
reboot

audio conversion:
sudo apt-get install soundconverter audacity oggconvert
tag editor:
sudo apt-get install exfalso
Video conversion:
sudo apt-get install avidemux ffmpeg winff
DVD playback:
sudo apt-get install libdvdcss2 libdvdread4 libdvdnav4 vlc
alternative to VLC: sudo apt-get install gxine libxine1-ffmpeg
DVD rip
sudo apt-get install dvdrip
alternative: sudo apt-get install k9copy

Firefox add-ons:
NoScript (tick the box entitled "Temporarily allow top-level sites by default");
Screen resolution:
sudo xrandr -s 1280x800 (to set at 1280x/800)
sudo xrandr -q
Use the first command again and set the highest resolution that RandR claims is supported. Once that is set, try setting the resolution you know is correct, as it may now accept that resolution
==============

==============
Possible solutions or approaches to solve the sound issue
==============

Here after, a list of solutions that are reported to have worked at least ones:

1. kernel
check that grub is really starting the latest kernel (2.6.31-14-generic reported to work)
dpkg --get-selections | grep linux-image
uname -r
Edit your menu.lst file so that the kernel version numbers are up to date:
sudo gedit /boot/grub/menu.lst

2. check volumes or mute
gnome-alsamixer
or
alsamixer -Dhw (hw device should be specified)

3. pulseaudio fixes
backup and delete
$ mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
$ rm -r ~/.pulse ~/.asound*
$ sudo rm /etc/asound.conf
install libreries and utilities
sudo apt-get install libasound2-plugins padevchooser libsdl1.2debian-pulseaudio
purge libflashsupport
sudo apt-get remove --purge libflashsupport flashplugin-nonfree-extrasound
config pulsaudio device chooser (choose default output and input card)
$ pulseaudio & pavucontrol
check alsa PCM volume or mute
alsamixer -Dhw
Note: When the PulseAudio ALSA plugins are active, you must explicitly specify your hardware device in alsamixer (marked in blue above), otherwise it will open the PulseAudio mixer
4. alsa reinstall
backup as in previous item:
mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf /etc/pulse -t ~/pulse-backup/
remove alsa:
sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils
shutdown and restart
reinstall alsa:
sudo apt-get install linux-sound-base alsa-base alsa-utils
sudo apt-get install gdm ubuntu-desktop
shutdown and restart
configure:
goto System > Preferences > Sound
goto Hardware tab and goto Profile:
Select "Analog Stereo Duplex"
5. upgrade alsa to 1.0.22
6. modem proprietario
(= switch it off from "Proprietary Driver" dialog)
answer to issued bug:
This problem has been temporarily resolved by disabling the proprietary Smart Link Software Modem driver available in Ubuntu's Hardware Drivers dialog (jockey-gtk).

7. remove pulseaudio
sudo apt-get remove pulseaudio


-----------------
EDIT: approach 4 made the trick and now sound works, even if not perfectly yet.
-----------------

Karmic Koala 64bit: almost fresh install

Fresh install of Karmic Koala, but keeping the previous /home partition unformatted.
Installation quite OK, but a few issues immediately arose.
Most important of which, several sound issues.

More detailed installation description in a later post.

As for now, the overall impression is that compared to 8.04 this Ubuntu release has several improvements, but it's missing loads details and functionalities which for sure would make at least a bad impression on new linux adepts, if not falling back on windows.

Thursday, December 17, 2009

O2Media HMR-600W

o2media HMR-600W

Ho appena comperato l'oggetto qui sopra, con l'idea di fare principalmente un lettore di file video, immagini e magari prepararsi al digitale terrestre.
Una delle caratteristiche interessanti per l'utente finale (genitori) e che lo rende teoricamente molto semplice da connettere, e' la presenza di due scart (in e out) per collegarsi alla televisione e per collegare magari il videoregistratore (e riversare le vecchie videocasssette) o un decoder.

Ieri mi e' arrivato, dalla Spagna, in soli 3gg dall'ordine....!

L'ho collegato alla TV (scart), al decoder sky (sempre scart) e all'antenna per il DVB-T.
Ho pure attaccato la chiavetta wifi allegata.

C'e' un forum interessante, forse l'unico dedicato ai prodotti O2Media. Sul sito e sul forum di 1e2.it ci sono molte informazioni utili e c'e' un'ottima recensione dell'amministratore, Galerio.

Cito velocemente le mie impressioni, magari possono tornare utili a potenziali nuovi utenti.
Orami ho una esperienza pluriennale con Mythtv, e ho recentemente aggiunto un po' di tentativi con VDR,, XBMC e VistaMediaCenter, quindi soprattutto Mythtv e' il mio metro di paragone per un MediaCenter.


L'HD incluso e' un Seagate Barracuda 7200.12 da 1TB.
La formattazione e' andata come preannunciato da Galerio in un altro thread: timeshift swap una grande partizione NTFS.

La qualita' di visione e di registrazione (sia DVB-T che scart) e' ottima, anche il cambio canali e' molto veloce.
Con Mythtv, lo zapping e' praticamente impossibile (a causa del timeshift permanente). Qui invece e' ottimo, anche con il timeshift attivo e' accettabile. Solo VDR forse e' piu' veloce.
Lo scan dei canali a Milano ha trovato circa 80 voci, molte inutili (come Rai Test, et similia)

Il telecomando ha una disposizione (e assegnazione) di tasti non esattamente intuitiva, ma si impara.
La ventola e' abbastanza silenziosa e non si sente l'hard disk "grattare", in registrazione.
Il software e' piuttosto brutto, esteticamente, e non del tutto funzionale. In compenso e' piuttosto intuitivo.
Trovo antipatico che non si possa settare l'avvio del mediacenter direttamente sulla trasmissione TV o sul browsing dei film o altro a scelta.
Anche il metodo di browsing dei file e' un po' poco pratico: le voci al top dello schermo fanno solo da filtro e non ho trovato modo di settare come minimo una directory di default (ad es. sarebbe naturale che il filtro "video" puntasse direttamente a una cartella di video, e non alla root o all'ultima visitata).

La visione delle foto e' veloce, gli effetti di transizione sono ridicoli e anche il tentativo di colonna sonora mi pare un po' poco curato.
Comunque le foto si guardano bene, si ruotano e si fa lo zoom con velocita' e facilita'.

Anche la gestione dei file musicali e' scarsa: non vedo possibilita' di ricerca o ordinamento per teg o creazione di playlist. In compenso legge formati di tutti i tipi e direi con buona resa.

Le registrazioni sono di ottima qualita', ma il fatto di non poter dare un nome alla registrazione in fase di programmazione e' una grave lacuna. Anche registrando dal DVB-T il nome automatico del file non viene preso dall'EPG, ma e' automatico, con data e ora. Non tiene neppure un database con informazioni tipo nome film, trama, attori, durata. Veramente un peccato.
Per altro, l'EPG trasmessa sul digitale terrestre e' davvero scarsa, non si puo' praticamente programmare niente. Se almeno mettessero la possibilita' di usare xmltv... Magari prossimamente lo segnalo nell'apposito thread sui suggerimenti di 1e2.it ....
E per restare in tema, altra pecca enorme e' l'assenza di possibilita' di un editing anche elementare della registrazione, ad esempio per eliminare le parti pre- e post-film oppure marcare e tagliare le pubblicita'.
Se poi mettessero una funzione di transcoding, anche solo per produrre un semplice Xvid senza troppe pretese...
Magari qualche nuova versione del firmware aggiungera' queste funzioni. Chissa'.
Ultimo difetto per la parte registratore e' che apparentemente la funzione OTR non e' ben implementata dato che scadenza del timer l'HMR non si spegne. Invece di 1h30 di registrazione OTR, ha registrato per 7 ore, prima che lo spegnessi.....!!!


Wireless: La gestione wireless e' piuttosto macchinosa, ma funzionale. Peccato che non serva a molto. Vedendo il wireless in bundle col sistema, ho scioccamente creduto che ci fosse un browser o anche solo che si collegasse a you tube, shoutcast e le previsioni meteo.... Invece niente, mi pare di capire che serva solo per collegarsi alla rete domestica, o ai torrent, ad amule testuale, etc. Magari si puo' installare links per fare del browsing testuale, ma bisognerebbe almeno poter aprire un terminale da telecomando, cosa che mi pare non si possa fare.

La connessione di un dispositivo USB, non fa partire automaticamente il browsing dei file.

La possibilita' di connettere una tastiera USB semplificherebbe molte delle operazioni di rename e trasferimento dei file. Anche l'indicazione della durata totale del film in visione sarebbe utile.

Ultima pecca, il manuale e' scarno e troppo essenziale. Ad esempio nulla si dice su come gestire le foto, la colonna sonora delle stesse, la rotazione etc. Bisogna andare per tentativi....
Anche la mancanza di un forum ufficiale in inglese o spagnolo, mi pare una lacuna che O2media dovrebbe colmare.

In generale, pero', l'HMR-600W mi pare funzionale anche se un po' di aspetti andrebbero curati di piu', a cominciare dal software e dalla mancanza di accesso diretto a internet collegato alla GUI.
Prossimamente magari provo a testare i nuovi firmware ufficiali e/o moddati (presente sempre su 1e2.it).


Devo fare ancora delle prova piu' estensive, in particolare con i diversi formati video.

Per finire, alcune questioni aperte che ho riproposte nel forum:

1. A HMR spento (HW, non col telecomando) e TV accesa sul canale AV, sento un sacco di interferenze (canale 5, per la cronaca). Appena accendo la corrente con il tasto HW le interferenze spariscono. Anche in modalita' stand-by non si sentono. Capita anche ad altri?

2. Esiste un modo per associare una particolare funzione a un tasto del telecomando? Ad esempio, vorrei con un tasto andare direttamente al browsing delle immagini in una particolare cartella.

3. C'e' un modo per aprire un browser? Per vedere you tube e meteo o cose simili....

Monday, May 18, 2009

Fix a Frozen System with the Magic SysRq Keys

http://fosswire.com/post/2007/09/fix-a-frozen-system-with-the-magic-sysrq-keys/
It says:
You finally got your Linux environment to crash. Ctrl+Alt+Backspace does nothing [...]
The Linux kernel includes a secret method of restarting your PC should it ever stop doing its job.
  1. Hold down the Alt and SysRq (Print Screen) keys.
  2. While holding those down, type the following in order. Nothing will appear to happen until the last letter is pressed: REISUB
  3. Watch your computer reboot magically.
What the individual keys do in that sequence are not as important as
what it does as a whole: stops all programs, unmounts all drives, and
reboots. A lot safer than just cutting the power.

Here it is again: REISUB. Remember that, as it
will save you a lot of time when you are configuring a system and
something gets messed up. Need a mnemonic? Try Raising Elephants Is So Utterly Boring.


nix's note (09 Dec 2008):
Just some other additional notes: alt+print screen + REISUB = reboot alt+print screen + REISUO = shutdown

---------

See also:
http://en.wikipedia.org/wiki/Magic_SysRq_key:
The AltGr key, if present, can be used in place of Alt key in order to avoid alternative uses of these combinations such as Screenshot for Alt+SysRq+s under Gnome. It also can be accessed from the serial console
[...]
unRaw      (take control of keyboard back from X), 
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes, forcing them to terminate immediately),
Sync (flush data to disk),
Unmount (remount all filesystems read-only),
reBoot.

This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work.

Another common version of this mnemonic device is "Raising Skinny Elephants Is Utterly Boring", which performs the same task, but in an alternate order. There is debate regarding whether the Sync command should come earlier or later.

Wait a few seconds between each command. For example, many applications will do an emergency save on receiving SIGTERM, but if SIGKILL is sent too soon, the application will not have time. Likewise, the Sync and Unmount processes need a few seconds before the system is rebooted.



ZyXel G-220 v2 on (Myth)Ubuntu 8.04 x86_64

Issue:
System hangs upon insertion; need several reboots before working.
It used to work fine with Mythbuntu 7.10 x86_64.
A friend tested it on its Ubuntu 8.10 x86 and it works --> is it a 64-bit issue?

Suggestions:
1. blacklist:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/74362
Tim Gardner wrote on 2007-03-27: (permalink)
Try a more current driver by blacklisting zd1211rw:
edit /etc/modprobe.d/blacklist and add zd1211rw
edit /etc/modules and add zd1211rw-mac80211
Either reboot or 'modprobe zd1211rw-mac80211', then insert the zd1211.
2. cardbus:
issue muight be related to cardbus and USB system (my pc seems to hang because both mouse and keyb are USB...)
http://communities.vmware.com/message/575305#575305
In short, the problem was Ubuntu not mounting USBFS to /proc/bus/usb.
Solution:
sudo mount -t usbfs none /proc/bus/usb
and add the following line in the /etc/fstab file:
usbfs /proc/bus/usb usbfs auto 0 0
Similar effect should be obtained if inserting a another USB dongle and AFTER that the USB wifi key: the first insertino should trigger the usbfs system, than the wifi key mounts with no issue.
3. kernel
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/74362
Mark Krapivner wrote on 2008-09-20:
i worked with alpha 6 a few days and i didn't encounter this bug (with Kernel 2.6.27), if any one else can confirm it's fixed too please do so :-)
BUT, this bug still exists on kernel 2.6.24 that comes with hardy, which is an LTS release.

SnowTDM wrote on 2008-05-09:
[...]
But if I start 8.04 version with 7.10 kernel (2.6.22) card connects perfectly, including with WAP encryption. It also connect if I boot with 7.10 desktop CD.
I think it is a problem with driver or module zd1211rw in conjunction with new kernel.
4. ndiswrapper
my try:
blaklist zd1211rw module and try ndiswrapper with the original windows driver

Monday, May 4, 2009

PVR-150 IRBlaster

Periodically, I spend some time on the internet looking for a "simple" and "working" method to let the IRBlaster of my Hauppauge PVR-150 pilot a SKY satellite receiver.
The system is now upgraded to a Mythbuntu 8.04.1 x64.

Recently I've found two interesting hints:

This last post here, and the raw codes for the SKY receiver here (only italian).

rkocher writes:


Remove lirc by running:

"sudo apt-get --purge remove lirc"

To ensure the driver is not still loaded run:

"modprobe -r lirc_i2c"

Then follow the instructions at http://www.blushingpenguin.com/mark/blog/?p=24

which links to the evergreen "Marks' Braindump" blog, which has recently been updated for the recent kernels.

I'll give it a try soon