Feeds:
Posts
Comments

Posts Tagged ‘Ubuntu’

[Rant]
Deja vu. When Ubuntu first introduced PulseAudio, it was one hell of a plight for the end-user. And now it is Plymouth turn to make life an uphill struggle for user with recent ATI or NVIDIA card and proprietary drivers (as well as people having examination like me >.<). Here is an interesting article by Scott James Remnant on why your expensive card doesn’t play nice with Plymouth in Lucid. I also grow tired and wary of all the copy-n-paste instructions lying on the Internet which are out-dated and untested yet considered as panacea. My most hated one is ‘set gfxpayload=keep’ originated from Arch forum and now spreading like fire. It makes your the Virtual Terminal (VT) useless, ‘keep’ is not the working option in Ubuntu, last and not least, in Lucid, there is a more graceful way to do it. And I hope my guide below will not suffer the same fate as them. It was quite comprehensive after days of manual grinding and testing during exam period.


[Problems/Symptoms/Why-Are-You-Here]
Plymouth splash screen…

  • is in low res mode.
  • has corrupted graphic
  • is decent but can’t switch to virtual terminal or VT is horribly in low res mode
  • is decent but the splash screen only appears for a brief 1-2 second ( you are missing the dots moving :P), before that you only see a black/blank screen

[Environment]
Use Synaptic or ‘apt-cache policy ‘ or common-sense to find out.

  • GRUB >= 1.98-1ubuntu5
  • Plymouth >= 0.8.2-2
  • ATI cards with FGLRX >= 8.723.1-0ubuntu3
  • NVIDIA cards with nvidia-glx-1*
  • A clean without other tweaks to plymouth & grub, please revert them before proceeding. Really, it will not work if you insisted on apply other tweaks. !!! IMPORTANT !!!
  • Common-sense and google searching skill
  • A bit of risk taking spirit and confidence

[Caveats and Limitations]
I will use the uvesafb to fix all the problems mentioned above but I have to warn you about certain limitations first. They don’t affected me much though (widescreen works on mine). I think problem will come when you want to use solar theme or any complex theme as uvesafb doesn’t have acceleration -> slow. Extract from documentation for uvesafb

uvesafb is a _generic_ driver which supports a wide variety of video cards, but which is ultimately limited by the Video BIOS interface. The most important limitations are:
– Lack of any type of acceleration.
– A strict and limited set of supported video modes. Often the native or most optimal resolution/refresh rate for your setup will not work with uvesafb, simply because the Video BIOS doesn’t support the video mode you want to use. This can be especially painful with widescreen panels, where native video modes don’t have the 4:3 aspect ratio, which is what most BIOS-es are limited to.
– Adjusting the refresh rate is only possible with a VBE 3.0 compliant Video BIOS. Note that many nVidia Video BIOS-es claim to be VBE 3.0 compliant, while they simply ignore any refresh rate settings.

Also, uvesafb replaces vesafb in Ubuntu, in case you are wondering.


[Fix/Workaround]
* uvesafb required v86d package to be installed. Hwinfo package is required for the next step as well.
sudo apt-get install v86d hwinfo

 

 

* Find out the supported resolution by using hwinfo.
sudo hwinfo --framebuffer

Sample output :

02: None 00.0: 11001 VESA Framebuffer
[Created at bios.464]
...
Hardware Class: framebuffer
Model: "(C) 1988-2005, ATI Technologies Inc. M92"
Vendor: "(C) 1988-2005, ATI Technologies Inc. "
Device: "M92"
SubVendor: "ATI ATOMBIOS"
...
Mode 0x0321: 640x480 (+2560), 24 bits
Mode 0x0322: 800x600 (+3200), 24 bits
Mode 0x0323: 1024x768 (+4096), 24 bits
Mode 0x03ee: 1366x768 (+1408), 8 bits
Mode 0x03ef: 1366x768 (+2752), 16 bits
Mode 0x03f0: 1366x768 (+5504), 24 bits
Config Status: cfg=new, avail=yes, need=no, active=unknown

 

 

* Edit /etc/default/grub to make sure we boot with uvesafb framebuffer. For the mode_option parameter change to your native screen resolution you see from running the above comment (if not just set to 1024×768-24 which is safest. Oh, Netbook user – please exercise some common-sense here) Non relevant lines are omitted for clarity.

...
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1366x768-24,mtrr=3,scroll=ywrap"
...
GRUB_GFXMODE=1366x768

 

 

* Edit /etc/initramfs-tools/modules to include uvesafb by adding the following line.

uvesafb mode_option=1366x768-24 mtrr=3 scroll=ywrap

 

 

* Force the use of framebuffer:
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash

 

 

* Update and we are done πŸ™‚

sudo update-grub2
sudo update-initramfs -u

 

* Now reboot and enjoy the high resolution sensation πŸ™‚ (my first reboot hangs, but 2nd time onward it works flawlessly). If it works correctly, you should be able to have moving dots with the splash screen; lesser time of blank screen and much more time with splash screen.

* And contrary to popular belief, my laptop resume and suspend works with uvesafb! πŸ™‚

* Thing you probably will see in dmesg if succeed:

[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic-pae root=UUID=44c7c661-1f5e-49e6-a14e-7a35f1ec3f9f ro quiet splash nomodeset video=uvesafb:mode_option=1366x768-24,mtrr=3,scroll=ywrap
[ 6.684235] uvesafb: (C) 1988-2005, ATI Technologies Inc. , M92, 01.00, OEM: ATI ATOMBIOS, VBE v3.0
[ 6.783693] uvesafb: protected mode interface info at c000:a2d4
[ 6.783695] uvesafb: pmi: set display start = c00ca376, set palette = c00ca434
[ 6.783727] uvesafb: VBIOS/hardware supports DDC2 transfers
[ 6.845060] uvesafb: monitor limits: vf = 61 Hz, hf = 48 kHz, clk = 69 MHz
[ 6.845110] uvesafb: scrolling: ywrap using protected mode interface, yres_virtual=1536
[ 6.847159] uvesafb: framebuffer at 0xc0000000, mapped to 0xf8380000, using 8256k, total 16384k
[ 6.854259] uvesafb: mode switch failed (eax=0x34f, err=0). Trying again with default timings.


[Other Alternatives]
* Rog131’s ‘Making a low resolution low color plymouth theme’ is an ingenious workaround. Here

* No splash screen but high resolution virutal terminal using EFI framebuffer. Edit /etc/default/grub, remove ‘splash’ option and replace the two entries below with your native resolution. Seriously, this is way better than setting the payload to keep and in 00_header. GRUB_GFXPAYLOAD_LINUX is only available from grub 1.98 in lucid.

...
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
...
GRUB_GFXMODE=1366x768
GRUB_GFXPAYLOAD_LINUX=1366x768
...


[Last Words]
– Comments are welcome and appreciated.
– Testers are welcome.
– I will try to respond to you ASAP but spare me some thoughts cos the poor guy here is having his final exams at his university life πŸ™‚

Advertisements

Read Full Post »

If you are upgrading to Amarok 2.3 Clear Light and experiencing crashes, weird behaviour in layout, CD can’t be played. Then you can take few bold steps as I suggested below.

Note to self: once there is a major update, wipe clean the previous version completely.

Wipe out your config and application layout and database.


mv .kde/share/apps/amarok/ ~
mv .kde/share/config/amarok* ~

You lose all your playlist, cover arts, etc… but Amarok works amazingly well again. You can try putting the config/database back one by one. Though I don’t bet on that. Wipe config alone will not give you a functional Amarok you have to kill apps/amarok as well, like in my case, layout isn’t remembered and new scanned tracks got weird random tag from random existing track.

Cheers,

Read Full Post »

Me == High in Lethargy and Excuses. Diligence Free.

I have always been a fan of Thunar’s neat icon view where items with different dimension will have a same icon height in contrast to the peak and valley icon view of Nautilus.

Quick illustration of the hideous default icon view in Nautilus:

nautilusdefault

Now, we shall tweak the thumbnail of Nautilus icon view to make icons align in a more presentable way. The default thumbnail size is 96, to achieve a more consistent thumbnail, we use 50 as the value.

% gconftool-2 -s -t integer /apps/nautilus/icon_view/thumbnail_size 50

And if you prefer the GUI way, then Alt+F2, type in “gconf-editor”, navigate to the option as shown in the screenshot below, and set the thumbnail_size to 50.

configuration-editor-icon_view1

Voila. The final Nautilus icon view will be as below. Not a 100% neat like Thunar but at least more consistent and presentable. I found this very useful especially for icons on Desktop.

nautiluschangedthumbOkay, that’s another nifty trick for you. And I am back indulging myself into studying for my last 2 papers.

Read Full Post »

After upgraded to Intrepid RC, I once again fiddled with Ubuntu sound system to use ALSA instead of Pulseaudio in a non-destructive way (a.k.a no removable of Pulseaudio packages and configuration which in turn not remove ubuntu-desktop package which is needed for future distribution upgrade). It was a bit trickier to do compare to Hardy, but I managed to locate all the culpirt that plague my sound system eventually and came up with this comprehensive guide. Without further ado, let the game begin!

1. Preparation! Install the follow packages if you haven’t had them yet. First one is alsa wrapper for oss, 2nd one alsa library and 3rd one is alsa library plugins. The last one is to configure the runlevel of pulseaudio (just for a total overkill)

% sudo apt-get install alsa-oss
% sudo apt-get install libasound2
% sudo apt-get install libasound2-plugins
% sudo apt-get install sysv-rc-conf

2. Removal Procedure! Remove pulseaudio from Xsession by moving it somewhere safe just in case you want to use back Pulseaudio again. The 1st command will move it to your home folder (~/).

% sudo mv /etc/X11/Xsession.d/70pulseaudio ~/

Remove pulseaudio (sound plugin) from gnome-settings-daemon

% gconftool-2 -s -t bool /apps/gnome_settings_daemon/plugins/sound/active false

Well you can always open a UI to do this if you feel unconfortable, Alt+F2, then type “gconf-editor”, navigate to /apps/gnome_settings_daemon/plugins/sound/ then untick the active box.

Unset Pulseaudio

% asoundconf unset-pulseaudio

Remove from runlevel [Overkill, just to make sure]

% sudo sysv-rc-conf

Page down till you see “pulseaudio” entry, then untick all the box []. Save and exit.
CAUTION: I dare not ask you guys to do this oneliner “sudo update-rc.d -f pulseaudio remove” or “sudo update-rc.d pulseaudio kill 15 2 3 4 5 .” cos I think it is dangerous. If someone can update me on this then I am deeply appreciated. Just stick to sysv-rc-conf for a safe journey.

3. Configuration for ALSA! Now time to configure alsa to use the main sound card

% asoundconf list
Names of available sound cards:
Intel
% asoundconf set-default-card Intel

Make sure the libao.conf is using alsa. You can use gedit if you want to.

% sudo nano /etc/libao.conf
default_driver=alsa

Navigate from the menu: System – Preferences – Sound, make sure yours looks like the one in the screenshots below:

ALSA

non-pulse-daemon

You will have no login sound from now on 😦 . Workaround is you create your own autostart event, use “aplay” or “mpg123-alsa” or “mplayer” and path to the your log in sound.

To further overkill pulseaudio, edit your .bashrc at your home folder and put this in:

% export SDL_audiodriver=alsa
Use this line if you want alsa wrapper for OSS: % export SDL_audiodriver=aoss

Ubuntu 8.10 has flash 10 package [adobe-flashplugin] so multiple sounds and flash sound work perfectly without libflashsupport (no longer in the repository) πŸ™‚

Still with me? Haha. Give yourself a pat on the shoulder. Reboot and enjoy ALSA. Self-check, type in the terminal “pgrep pulseaudio”. If no number return, pulseaudio is disabled πŸ™‚

Future tips will come as I explore the system more πŸ˜› Till then.

TROUBLESHOOTING: 10 second time out solution below in the comment πŸ˜›

I finally figure out the 10second lag. Those applications will first look for Pulseaudio, but it is gone, so the 10 second time out before alsa kicks in.

=======
Solution:
=======

+ Edit /etc/mplayer/mplayer.conf, line 74, change the order to the order below (original pulse,alsa)
# Specify default audio driver (see -ao help for a list).
ao=alsa,pulse

+ Totem-gstreamer i can’t find the config for it yet, so work around is use totem-xine, then check that ~/.config/totem/xine_config , pulseaudio is comment out.

+ System-wide config (so far I only tested with mpg123-alsa, aplay, moc). Backup your /usr/share/alsa/alsa.conf. Then on the very top. Chage it to the following: (alternatively you can comment out /usr/share/alsa/pulse.conf or move it down the list, I prefer remove it anyway since we got a backup)

# pre-load the configuration files

@hooks [
{
func load
files [
“/usr/share/alsa/bluetooth.conf”
“/etc/asound.conf”
“~/.asoundrc”
]
errors false
}
]

=>>>>>>> Exam time!

Read Full Post »

After so much procrastination, I finally spent some effort finishing up a script for easy installation and access to NUS SoC-VPN. 2 years of painful experience without much help (NOC documentation / helpdeskΒ  is Fedora-centric and the linuxNUS wiki / manual isn’t that Debian/Ubuntu-friendly either) and frustration from frequent disconnection from SoC server, the suffering has finally ended. Self-help seems to be the best companion.

My SoC-VPN script provides a seamless installation and easy connect / disconnect to NUS SoC network as well as simplify the process to be as less obstructive as possible. It is a refined version of what I have been using for the past year.

Features include: dependencies checking, ready-to-run anywhere, easy to use, unobtrusive (no NOC netlogon screen), no additional packages required (like curl or lynx), root-usage checking, helpful usage, ubuntu-friendly

1 – Download my script in tar.gz format here

MediaFire | Mirror 1

md5sum: 02096667f7d3c85a6029a44414e49bea
crc32 : 4d73de35

2 – Untar it to Desktop by using Ubuntu Archive Manager or run the following command at the directory where you downloaded my script:

tar -xvzf socVPN_idyllic.tar.gz -C ~/Desktop/

3 – A folder name “socVPN_idyllic” will be created on your desktop. Run the following commands to proceed

cd ~/Desktop/socVPN_idyllic
chmod +x install_socvpn.sh
./install_socvpn.sh

4 – The script will prompt you for sudo password when it needed to copy configuration file to /etc/openvpn/ directory.

5 – Installation Completed πŸ™‚ You can now delete the folder “socvpn_idyllic”

6 – Quick start : Remember to run at sudoer level!

To connect
sudo socvpn --start

To disconnect
sudo socvpn --stop

For a complete list of command, run “socvpn” or “sudo socvpn –help”.

I am open to suggestion πŸ™‚ Feel free to contact me for constructive criticism. I am still a n00b. Cheers.

EDIT:
After download and extract files from the archive, edit socvpn.conf. Insert this line before the last line (route-up line) without the quote : ` mssfix 1460 `

Also change the last line to
route-up “sleep 5; wget https://noc.comp.nus.edu.sg/netlogon -O /tmp/netlogon 1>/dev/null 2>&1 &”

If there is still frequent disconnection, re-run the script the go to this page in your browser
https://noc.comp.nus.edu.sg/netlogon

Read Full Post »