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.