Archive for the ‘Compiz’ Category

Be careful of the kernel update if you installed the VIA drivers

Thursday, October 16th, 2008

Just as I predicted, a kernel update has been pushed out and if you installed the VIA drivers to get Compiz working then you will boot up to a black screen after letting the update process run and install kernel 2.26.21-generic. You can still boot up from the old kernel by pressing escape just after the bios and selecting the 2.26.19-generic kernel from the GRUB menu. I have asked VIA to compile a new one for us and come up with a more useable long term solution.

Compiz Beta – part 3

Wednesday, September 17th, 2008

OK, so with luck you now have the via drivers installed. You can do a few funky things already, for example go to System-Preferences-Screen Resolution and change it to 1024×768. This will compress the display onto the 1024×600 screen which allows some of the overly tall dialog boxes to fit (like the Evolution setup wizard for example). If you plug in an external monitor or projector the display should fill the screen nicely. In fact if you are into that kind of thing you can go to the synaptic package manager and install the openoffice.org-ogltrans package and get a bunch of fancy 3d transitions in the Impress application. I will have a go at posting some screenshots of that later.

Lets move on to enabling Compiz. To do this we are going to have to tell Compiz that the VIA driver actually is plenty good enough to use. Go to Applications-Accessories-Terminal and lets try to start Compiz just to see what happens.

so that didn’t go so well. Press ctrl+c to get back to a command prompt. So it has no whitelisted driver and is refusing to start. Fortunately I know where it stores it’s whitelist :-) The compiz command is just a script file that starts off some other things and this script contains the whitelist of approved graphics drivers, so lets go edit it

sudo nano /usr/bin/compiz

now go and find the line that starts with WHITELIST, add via to the end of the list inside the quotes as shown below:


now save and close with

Ctrl+X
y
return

now lets try starting compiz again (starting from the 4th line in the screenshot below)

lots of screen flicker then it seems to have started. Don’t worry too much about the error message on the last line. You should now see a few fancy fades and effects happening. Try switching desktops and they will slide across. Open and close a few windows. Nice isn’t it! Compiz will start automatically when you log on now that you have whitelisted the via driver.

There are lots and lots of effects to turn on, for that you need the CompizConfig Settings Manager, which I will talk about in part 4

Please let me know if the instructions work!

Compiz Beta – Part 2

Wednesday, September 17th, 2008

This only works on Hardy Heron 8.04 kernel version 2.26.19 if you have upgraded beyond that, i.e. if your webbook is currently up-to-date then the download on this page will not do anything useful and you will need to restore the backup of your xorg.conf to get it working again.

So now you know how to unbreak your webbook graphics, lets have a go at installing and using the via drivers.
First download this file Elonex Via Drivers.
This contains the binary drivers patched for the webbook and compiled against kernel 2.26.19 which is the current kernel at the time of writing this. When the next kernel upgrade happens there is a reasonable chance you will boot to a black screen. If that happens go to the recovery console and copy back your xorg.conf for the openchrome drivers.
So having downloaded the file start up a terminal window. I am assuming that you downloaded the file to the desktop (the default place if you just clicked on the link in Firefox), if you put it somewhere else then you may have to adjust the commands accordingly.

cd Desktop
ls
tar -zxvf elonexviadrivers.tar.gz
cd ElonexViaDrivers
sudo ./vinstall

so step by step
cd Desktop changes the current directory to the Desktop directory where you downloaded the file
ls lists the content of the current directory, it will show you everything on your desktop. I put this in just to confirm you are in the right place and to help you forget the dir dos command:-)
tar -zxvf elonexviadrivers.tar.gz
this one is a bit more complex the zxvf bit is 4 commands or flags we are passing to the tar program. z means uncompress the file using gzip (that is the .gz part of the filename). x means extract the files from the archive. v means verbose, so it will tell you what it is doing as it extracts them. f means the next parameter is the filename to work on.
cd ElonexViaDrivers
the extracted archive created a new folder on your desktop, we now change directory into that folder
sudo ./vinstall
sudo means run the next command as the super user. The single . means “the current directory” just as .. means the parent directory. cd . does nothing cd .. goes up a directory. ./vinstall means run the vinstall script that is located in the current directory. Now if you are familiar with the workings of other popular operating systems you may be a bit puzzled by this, why can’t you just type vinstall because you are in the right directory? Well this is a security feature, the current directory is not on the search path for applications to execute, you have to be explicit. Imagine if there was a script called “ls” in a directory, you go into that directory and use ls to list the contents but instead of doing that you just ran a script that does who knows what!
You can have a look at the contents of the vinstall script if you like. Just type
gedit vinstall
and the editor will open up so you can see what it does. It is always good practice to have a look at scripts before you run them. It is a great way to learn, and you can check that it is doing what you expect it to do.
So now you should have the via drivers installed, if you restart you will find the login window a bit stretched (not quite sure how to fix that yet) and you can log on to your desktop. Some things might be a bit smoother, but nothing dramatic is visible. For that we need Part 3 – Enabling Compiz, which I will crack on with right now . . .

Please shout if the instructions don’t work, there might be some typos in there

Compiz Beta – Part 1

Monday, September 15th, 2008

OK, before we rush in to installing the drivers now is the time to prepare the exit strategy and learn how to fix things when they go wrong. So we are going to deliberately break, and then fix the graphical user interface. First lets explain a bit about how things work in Linux.

The graphical user interface (X Windows or X.org) looks up a little configuration file stored at /etc/X11/xorg.conf this tells it a bit about the screen size and layout (you can have multiple graphics cards and monitors) plus a bit about keyboards and mice and so on. You can take a look at this by going to Applications-Accessories-Text Editor, then press the Open button and go up to the root of the filesystem, then into etc then X11 then open the xorg.conf file. If you go down you will find the Device section, it looks like this:

Section "Device"
	Identifier  "Device1"
	Driver      "openchrome"
	VendorName  "VIA Technologies, Inc."
	BoardName   "CX700M2 UniChrome PRO II Graphics"
	Option	    "ForcePanel"
	Option	    "EnableAGPDMA" "true"
	Option	    "SWCursor" "true"
	Option	    "NoAccel" "true"
	BusID       "PCI:1:0:0"
EndSection

in bold I highlighted the driver name, here it is using the OpenChrome driver. Have a quick look round the rest of the file, but don’t worry if most of it is gobbledygook. Lets leave the pretty graphical user interface behind now and get comfortable with the command line.

Press Ctrl+Alt+F1. This should take you to a black screen with white writing on it asking you to log in. You can use your normal username and password here. Press Ctrl+Alt+F7 and you will be back at your graphical user interface. Try Ctrl+Alt+F1 again. Now try Ctrl+Alt+F2, you get another login prompt. You can also log on here if you want. In fact Ctrl+Alt+F1 through to Ctrl+Alt+F6 are text mode consoles, Ctrl+Alt+F7 is the graphical console.

OK, back to the first text mode console.

The above bit doesn’t work when the OpenChrome drivers are actually running, but it works find if X is broken, or if you have the VIA drivers running. When you power up the webbook go to the grub menu and select the recovery option and go to a root shell.

webbook:~$ cd /
webbook:/$ cd etc/X11
webbook:/etc/X11$ ls
webbook:/etc/X11$ sudo cp xorg.conf xorg.conf.openchrome
webbook:/etc/X11$ ls

So these few lines above took us first to the root of the filesystem, then into the etc/X11 directory. The ls command listed the files in the directory, one should have been xorg.conf. Next we used the cp (copy) command as the superuser to make a backup copy of the xorg.conf file and call it xorg.conf.openchrome. Finally we used ls again to list the files and we should see that the new xorg.conf.openchrome file is present.

Now lets break things!

$ sudo nano xorg.conf

this launches nano, a little text editor, like gedit, but not as pretty. Now lets go wild! Find something and tweak it, maybe change the driver name, maybe go down to the screen section and change the resolution from 1024×600 to 1598×543! It doesn’t matter because we have a backup. Press Ctrl+x to quit nano and press y to save your changes. Ctrl+alt+F7 will take you back to the graphical console, it is still running. If you then log out it will restart X windows and re-read your modified xorg.conf and probably not start again. Power off and power on and it will still be broken. The fix is simple though. Ctrl+Alt+F1 to get to a console. Now log on

webbook:~$ cd /etc/X11
webbook:/etc/X11$ sudo cp xorg.conf.openchrome xorg.conf

this will take your backup configuration file and copy it over the top of the one you broke. Now if you restart the webbook (or restart the X Windows with Ctrl+Alt+F7 then Ctrl+Alt+Backspace) you should get back to the graphical login prompt.
So there we have it, from working, to broken, to mended again, and you are all prepared for the next installment . . .