Tuesday, November 2, 2010

How to fix ugly plymouth logo on ubuntu 10.10 maverick meerkat for nvidia and ATI drivers

After installing ubuntu 10.10 and installing the graphic drivers I noticed that the ubuntu plymouth logo was looking real ugly. Well here's a good,simple guide to fix it.

First you need to install the v86d package for that open up your terminal and type:

sudo apt-get update && sudo apt-get install v86d

After installing the package we need to edit our grub loader for including the rite graphic resolution. For that copy the command below on your terminal:

sudo gedit /etc/default/grub

Your grub config file will now open. Find the line "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and
replace it with:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap"
Now find the line #GRUB_GFXMODE=640x480 and change it to GRUB_GFXMODE=1280x1024

Save the file and close it.

Now open your initramfs module file by issuing command:

sudo gedit /etc/initramfs-tools/modules

At the end of the file add the line:
uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap
Save and close the file.

Now in your terminal type the command:

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash

and finally the command: sudo update-grub2 && sudo update-initramfs -u
That's it now you can reboot your machine with the new good looking plymouth.

Note: You can play a little with the resolution, as 1280x1024 may not work for everyone! Just make sure that you change it in all three locations as indicated above.

How To Fix Video Tearing With ATI Proprietary Drivers

If you have ATI card and installed proprietary drivers you may notice that drivers are so "awesome" that you need to search for fixes all day ;)

One of the problem that you may get is video tearing, even you tried some things to fix it, it is still here.

This is because ATI Proprietary Drivers.
To fix this once for all do next, open terminal and typing.



First make a backup of xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf-backup

If something goes wrong you can any time use backup of xorg.conf
sudo cp /etc/X11/xorg.conf-backup /etc/X11/xorg.conf
Now delete xorg.conf
sudo rm /etc/X11/xorg.conf

Now you need to generate new xorg.conf, you can do this by typing:
sudo aticonfig --initial
This will generate new xorg.conf.

Now type:
sudo aticonfig --sync-video=on
This will enable vsync.

Restart computer so it can load new setting from new xorg.conf.

After restart open Catalyst Control Center.
In CCC go to 3D > Anti-Aliasing
Here check "Override application setting" and set "Level" to 4X

Now go to 3D > More Settings
Here set slider under "Wait for vertical refresh" to "Always On"

How to Install FGLRX in Ubuntu 10.10

FGLRX - FireGL and Radeon for X (x stands for X.org)

The perfect 10 has just been released and some people are having troubles installing the ATI proprietary drivers, called FGLRX. Like any other package, there are several ways to install it. Some are better and safer, some are not. Here is a list of ways you can install FGLRX in order from safest to least safest as of October 10th.


1. Repositories

This may or may not work for you, but this is the easiest to install and uninstall. First we need to open up the ol' Synaptic Package Manager by going to System->Administration->Synaptic Package Manager. Enter you Admin password and search for FGLRX. Check the box "fglrx" for installation, as well as the other packages that you'll be prompted to install.

Once everything is downloaded and installed, paste this in a terminal:

sudo aticonfig --initial

Reboot, and you should see compiz enabled. If you just see a black screen, reboot into recovery mode, coose to run in low graphics mode and paste the code above.

If that didn't work, then you need to uninstall FGLRX by going back into Synaptic Package Manager, search for the FGLRX package, mark it for complete removal an if prompted, all of the other packages that were installed along with it.

2. Manually Download and Install ATI Drivers

Although this is still relatively easy, it is the most difficult way to install FGLRX. You will have to download the drivers from ATI's website and do a bit of terminal work. First, go to ATI's website and enter the your graphics card's information and download the drivers.

Next, go to where you downloaded your drivers (usually the downloads folder), right click on the file, select "Properties." Under Permissions, check the box that says, "Allow executing the file as a program."

Close that window, click on the file again and choose to run in terminal. You'll be prompted to enter the admin password. Now the installer should appear. The default selections should be fine unless you're using a different distro than Ubuntu.

Once the installation is done, open up a terminal and enter this:

sudo aticonfig --initial

This should configure the drivers to your computer's specifications. Reboot and you will notice a prettier Ubuntu. If you just see a black screen, restart into recovery mode in low graphics mode and enter the above code once more. If that fails again, this method didn't work for you and you need to restart once more into recovery mode in low graphics mode and paste this into a terminal:

cd /usr/share/ati

sudo sh ./fglrx-uninstall.sh

3. Additional Drivers

This is an easy way to install or uninstall proprietary drivers, however, this has not worked for me in the past. Go to System->Administration->Additional Drivers and select ATI/AMD proprietary FGLRX graphics driver for installation. Reboot for the effects to take place. If this didn't work for you, then reboot into recovery mode in low graphics and go back to Additional Drivers and mark the installed drivers for removal.

Those are the three ways I know how to install FGLRX. If this tutorial didn't help you, you can leave a comment and I'll try my best to get it working for you. You can also ask the community at ubuntuforums.org, as they have communities more than willing to help the novice and expert Ubuntu users.

Monday, August 31, 2009

Linux

/ is where everything goes. It is like C:

/home is user files. It is like C:\Documents and Settings

/tmp is temporary files. This is sometimes mounted as a virtual filesystem in RAM. It is like C:\WINDOWS\Temp

/var is files that change a lot. This is sometimes mounted as a virtual filesystem in RAM. There isn't really a Windows equivalent.

/usr is for non-essential programs and libraries. It is like C:\Program Files

/boot is Linux itself, as well as the bootloader.

/bin is essential programs

/lib is essential libraries

/dev gives files for most of the devices plugged into your computer. It is like the special Windows files NUL, COM0, COM1, etc.

/etc is system-wide configuration.

/media is for storage media. It is like "My Computer".

/mnt is used as a temporary mount moint where putting in it /media will clutter things up.

/opt is for third-party binary packages. It is like C:\Program Files

/root is the Administator (root)'s home directory

/proc is a virtual filesystem with files detailing the operation of the system, some of which you can change.

/sbin is for essential administration programs

/sys is like proc but newer (and different).

Friday, August 21, 2009

Linux系统下Mp3标签乱码问题

相信很多朋友在Linux里 播放mp3的时候,不论使用何种mp3播放器,或多或少都会遇到mp3标签乱码的问题。我一般在遇到mp3标签显示乱码的时候都是使用Ex Falso(Quod Libet自带的一个mp3标签编辑器)来编辑一下标签,使我的播放器Quod Libet能够正常识别mp3标签。遇到转换歌曲少的时候,这样做没有什么问题,但是很多刚从Windows转到Linux上来的朋友就头大了,很多在 Windows下显示正常的mp3标签在Linux下全都乱套了。

我们先来看看一些关于mp3的标签和编码的概念再来解决这个问题,大家就会比较清晰一些了。

mp3的标签类型和编码,现在主要存在这几种标准,ID3v1、ID3v2 2.3、ID3v2 2.4、APEv2。它们分别支持的编码为

ID3v1:只支持ISO--8859-1

ID3v2 2.3:ISO--8859-1、UTF-16

ID3v2 2.4:ISO--8859-1、UTF-16、UTF-8

APEv2:UTF-8

我们可以从上面的列表看出,mp3的标签类型和编码是多种多样,没有任何的规范可言的。ID3v1只支持ISO-8859-1这一种编码,它是不支持中文的,所以一般来说只有ID3v1标签的mp3在Linux上 基本上也都是乱码的命,而ID3v2 2.3支持的格式增加了UTF-16,直到ID3v2 2.4版才开始支持UTF-8,但是 ID3v2的两个版本标准并没有统一标签内容的编码。这里值得一提的是APEv2,它拥有最好的扩展性,它把编码格式统一为UTF-8,这样一来只要支持 APEv2读取的播放器播放带有APEv2标签的mp3就不会存在乱码问题。可惜的是现在在国内的网站上下载的mp3基本上都没有APEv2标签,而且 Linux下也没有几个播放器支持APEv2标签的读取。(目前Gnome里的Rhythmbox是支持APEv2标签读取的,包括Quod Libet都不可以。)

一首mp3的标签是可以包含多种类型的,当一首mp3同时含有ID3v1、 ID3v2 2.3、ID3v2 2.4、APEv2这4种类型中两种以上的时候,播放器对mp3标签的读取顺序一般是由上往下的,APEv2(前提是播放器支持此编码的读 取)---ID3v2---ID3v1。所以有时候会出现同一文件Rhythmbox显示标签正常(读取APEv2标签),其他播放器不正常的情况(读取 了ID3的标签)。

接着我们说说在Linux系 统里,为什么所有的mp3播放器都会有乱码的问题,这是因为这些mp3播放器都是依赖系统内的libid3tag库完全按照ID3的标准来读取标签内容 的。它不论mp3是采取何种的标准的标签(ID3v1、ID3v2、APEv2),只要mp3的标签的内容是Unicode编码存储的,那么显示肯定是正 常的 (ID3v1的ISO-8859-1严格说是不支持中文,但是并不是代表它不能存储中文)。如果遇到是以gbk、gb18030、big5等编码的中文内 容时,它还是会把它当成ISO-8859-1来读取,乱码就成了必然。

说了这么多,现在问题就变得简单了,似乎我们只需要把mp3标签里面用gbk、gb18030、big5等编码存储的中文内容修改为Unicode编码,那么基本上所有Linux下的播放器都能正常识别mp3标签了。

关于mp3编码的转换,这里介绍一个工具----Mutagen,假如你安装了Quod Libet,那么这个包已经安装上去了。如果没有,执行下列命令就可以了。

sudo apt-get install python-mutagen

工具的使用方法

mid3iconv -e gbk *.mp3 #转换当前目录的mp3文件

mid3iconv -e GBK */*.mp3 #转换当前目录下所有mp3文件(包括子目录)

find . -iname "*.mp3" -execdir mid3iconv -e gbk {} ; #转换当前目录下所有mp3文件(包括子目录)

因为现在在网上下载的mp3绝大多数采用的都是gbk/gb18030编码,-e gbk 参数是代表把gbk编码的标签转换为Unicode编码,假如mp3标签本身是Unicode编码的就不转换。如果需要转换其他编码的文件可以自行修改 gbk参数,比如改为gb18030、big5。转换后为的mp3标签类型为ID3v2 2.4,编码格式为UTF-16。

到了这一步之后,在Linux下使用所有播放器估计都没有什么问题了。

Thursday, March 26, 2009

傻瓜式安装ATI 显卡官方驱动

转自:http://bbs.pcbeta.com/viewthread.php?tid=273220

Envy可以傻瓜式安装ATI 和NVIDIA显卡官方驱动
网址http://www.albertomilone.com/nvidia_scripts1.html
以下是我在8。04的安装ATI的体验
如果已经装过XGL则
1,sudo apt-get remove xserver-xgl
2,sudo apt-get remove xorg-driver-fglrx
3,sudo rm -f /usr/src/fglrx-kernel*.deb
之后重启电脑,如果重启电脑之后无法进入图形界面,则修改/etc/X11/xorg.conf,将Device的Driver这一行删掉或注视掉。

要是刚刚安装好的ubuntu就可以直接安装envy,不要作以上的命令

安装envy
1,sudo apt-get install envyng-gtk
2,sudo apt-get install envyng-qt
3,sudo apt-get install envyng-core

等envy安装好了,进入应用程序-系统工具-EnvyNG
打开程序,这里要你输入管理员密码,输入之后打开程序
我用的是ATI,选Install the ATI driver (Automatic Hardware Detection)
自动安装,安装好了之后不要点是那样会重新启动,
注意不要让系统重启
这时打开终端,输入
sudo gedit /etc/X11/xorg.conf

要确定在"Device"部分有Driver"fglrx",并对照下面进行修改

Section "Device"
Identifier "ATI Technologies Inc R480 [Radeon X850XT Platinum (PCIE)]"
Driver "fglrx"
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "AIGLX" "true"
BusID "PCI:1:0:0"
EndSection
在如下其他的setion要是没有的话就添加代码,要是Sction "Module"没有的话,就整个添加,


Section "Module"
Load "dri"
Load "v4l"
Load "dbe"
Load "glx"
EndSection


Section "Extensions"
Option "Composite" "Enable"
EndSection


Section "DRI"
Mode 0666
EndSection
修改好,就保存退出,重启电脑
看看是安装好了。打开 系统-首选项-外观-视觉效果,选扩展,保存退出。
可以试试效果,按住win+tab看看是不是跟vista一样的立体感
要是安装好了输入


sudo gedit /etc/xdg/compiz/compiz-manager
添加红色的代码要是没有的话


# Ubuntu specifc compiz-manager configuration file
# goes into /etc/xdg/compiz/compiz-manager
# works with git://anongit.compiz-fusion.org/fusion/misc/compiz-manager
COMPIZ_BIN_PATH="/usr/bin/"
PLUGIN_PATH="/usr/lib/compiz/"
COMPIZ_NAME="compiz.real"
SKIP_CHECKS="yes"
保存退出,重启,就可以使用了。

最后更新和安装Compiz及Compiz fusion
代码:
sudo apt-get install compiz compiz-gnome
sudo apt-get install compizconfig-settings-manager
sudo apt-get install compiz-fusion-*

这样就可以在打开compiz来设置更多的立体效果:系统-首选项-Advanced Desktop D S

Wednesday, March 25, 2009

COMMAND AND CONQUER

Ever had a video clip you
wanted to reduce in size
and add to a slideshow for a
presentation? Or, maybe convert
into another format so that you
could play it? Today, I will show
you how to do both of those
things using the command-line
tool 'ffmpeg'. I will also introduce
you to the 'mogrify' command,
which is an image-editing tool
contained in the imagemagick
package. It allows you to do many
things, but I will cover the basics –
mostly the resizing of images (e.g.
for thumbnails or other small
images).
To use these tools, you will need
to install ffmpeg and
imagemagick through either
Synaptic Package Manager or
Add/Remove Applications, or, in
the spirit of this article, through
the command-line with:

sudo apt-get install ffmpeg
imagemagick

It's safe to run the install
command – if you're unsure whether
or not you've already installed it –
since apt-get will not overwrite the
existing program, but merely inform
you that it's already installed. Also, it
will ask you for your password (since
you're using sudo), and, if you're new
to this, you may be surprised that it
does not show anything when you
enter your password. This is normal,
just type your password and hit the
enter key.
For this article I will be converting
a short clip from "Freedom
Downtime" which I used in a
presentation. ffmpeg offers a lot of
options (which you can read about in
detail in the roughly 13-page-long
manpage – by using the command
"man ffmpeg"), but the option I use
most frequently is the option to
convert files. The format for such a
command is:

ffmpeg -i inputfile.filetype
outputfile.filetype

That command would just convert
the input file to whatever output file
you specified in 'output.filetype'
– without changing the size
(since, if the size is not specified,
ffmpeg defaults to the size of the
source). However, to convert
"Freedom Downtime" (starting
size of 640x480) to a smaller clip
(say 320x240), the command
would look like this:

ffmpeg -i freedom\
downtime.mpg -s 320x240
freedom\ downtime\ resized.mpg

Of course, you could also
change the format of the file at
the same time by changing the
file extension. This shouldn't
take too long (obviously
depending on the size of the
clip). My clip was a few minutes
long, and took maybe 30
seconds to convert on my laptop.
Mogrify is a very handy tool,
especially if you find yourself
posting a lot of pictures on web
forums that don't allow uploads
of images exceeding a certain
size, or do not allow linking to
large images for previews in
posts. I use mogrify mainly for
making thumbnails of images,
but it can do many more things,
such as adding text, adding
effects (charcoal, colorized, etc.)
and much more (it's all outlined,
once again, in the manpage,
reached with "man mogrify").
Mogrify supports resize
arguments in either percentages
or pixel values. So, for example, if
you have a 1280x800 pixel image
which you want to resize to
640x400, you can do so with
either:

mogrify -resize 50 in.jpg
out.jpg

or:

mogrify -resize 640x400 in.jpg
out.jpg

or even just:

mogrify -resize 50% in.jpg
out.jpg

However, if the pixel
measurements and the aspectratio
you supply are different, it
could result in a smaller image
than expected, as it will scale to
the nearest values that are still in
proportion. Mogrify also has a
thumbnail argument, which does
roughly the same as the resize
option, yet it removes any
unnecessary comments, etc. from
the file header to reduce image size.
So using that tool the command
would be:

mogrify -thumbnail 50 in.jpg
out.jpg

You can also use it to convert
images using the “-format”
argument. So,

mogrify -format jpg *.png

will convert all the .png files in the
current directory into .jpg format
(names will be the same).
As you can see, contrary to
common belief, command-line tools
can help with graphical projects, and
often do it more quickly or more
effectively than a GUI program with
confusing menus and/or different
layouts in newer versions. The
command will (usually) stay the
same, and arguments are very rarely
changed. And so, command-line tools
are much more universal – which is
why users on ubuntuforums.org
usually supply commands instead of
GUI methods for solutions, since the
commands apply to Kubuntu,
Xubuntu and Ubuntu, as well as
you've found this useful, and
next time you need to convert a
video or an image, you'll
remember mogrify and ffmpeg.
After all, practice makes perfect.

From Full Circle