Compiz Beta – Part 1

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 . . .

17 Responses to “Compiz Beta – Part 1”

  1. Nearly Legal says:

    Hmm. I’m not getting a console with cntl alt F1 (or F2, F3), just varying forms/colours of blank screen.

  2. Alan Rowe says:

    Same here actually – the first time I tried it I got purple columns of verying shade flitting across the screen, but when I hit ctrl+alt+F7 I got back to the my desktop. The second time, I just get a blank screen. Doing this on my standard computer (using it right now) it works as advertised though. Were any settings snuck in while you weren’t looking Alan?

    Just as an aside – I’m trying to get the Orange mobile internet working on this web book. Currently, I have the Orange dongle and a Three PAYG dongle which I was using before I got the webbook. On the Three dongle, I’m getting massive speeds, on the Orange one I’m stuck firmly on GPRS. The technical support lad at orange is trying to tell me that GPRS is about as much as I’m going to get with this computer. I there anything you can suggest Alan? The Three dongle is brilliant, the orange one sucks pretty hard.

    (I do know this isn’t your area, I’m just wondering whether you might have further info).

    Cheers,

    Alan

  3. Will Watts says:

    Thirded on the failure of Ctrl Alt F1 to get to a console. Instead of going into text mode, the screen goes into some streaky graphics mode, through which I can see a corrupt version of the Ubuntu startup logo. Ctl Alt F7 works, happily.

    I suffer from heavy techie cynicsm. Is it possible that in order to support the console mode you describe, we need to have installed the graphics driver you are enthusing about – and it is the presence of this driver that enables you to use Ctrl Alt F1 successfully?

    Can I put in another vote for the secret of turning off automatic mouse clicks on the touchpad as an early blog topic? Its extreme sensitivity drives me mad. :-(

  4. Alan Bell says:

    oh heck. Looks like a chicken and egg problem with the Ctrl+Alt+F1 not working. The principal is right, and if X had not started with the buggy OpenChrome drivers you would be fine! You can always get to a console by going to a recovery mode option from the Grub menu. I have nearly finished the next article, which has the drivers attached to it, I will pop that up tomorrow.

    @Alan
    Is the Orange dongle the Option Icon 225? Most of them are. I have had pretty good results with Orange, there have been some problems with it not connecting first time (in some circumstances we didn’t wait long enough for the SIM card and network to be ready) but it should work at full speed. You might not be in an area with Orange HSDPA/UMTS coverage. Three and Orange share the GPRS network (so if you have a Three SIM you can be on Orange GPRS roaming) but have separate 3G infrastructure. If you connect to the network there will be a log of the connection attempt stored in a file at /tmp/wader.log There might be some information in there that indicates what is going on.

  5. Alan Bell says:

    @Will
    I am a bit puzzled by the touchpad. It should be a Synaptics touchpad and if things are set up right you should be able to use the gsynaptics tool to turn off clicks and do other things. Trouble is though, it does not appear to work. It worked flawlessly on a prototype of a different case for the webbook that I was testing, but on the real webbook it simply doesn’t. I have not yet dug into this in depth so it could be me making some silly mistake, or it might not be the Synaptics touchpad I think it is.

  6. Will Watts says:

    Thanks – I look forward with confidence to both the sussing of the installation of the new graphics driver (especially text mode: after all, it’s not really a proper Linux experience until one has found oneself hacking away at a full screen bash shell somewhere, is it?) and any further thoughts you may have about the touchpad.

    I would add that I do appreciate your efforts with this blog, which I think is a hoot. Natural techie enthusiasm for Open Source is not my primary expectation when dealing with the Car Phone Warehouse. What next? Poetry appreciation at WH Smith, perhaps.

  7. Adam says:

    “Another one bites the dust”

    I like everyone else was presented with a colourful mess when clicking CTRL+Alt+F1, but actually came across this quite some time ago, just thought it was down to not having the right driver and didn’t worry about it too much. I know about going in through the grub menu as I stuffed my machine at home that many times I had to go in and do Fsck :P

    With Will totally in saying I really do appreciate you putting the blog together! It’s a refreshing change for someone to support a product well and in an easy to understand way! Kudos and a beer to you!

  8. Alan Rowe says:

    Alan, thanks for the reply.

    Regarding the Orange connection problems, I am on the verge of telling them to do something rude with their dongle. Before I signed up for the contract – I really wanted this webbook! – I checked on the Orange site for their 3G coverage, using my home postcode and the postcode where I use the dongle the most. According to the website, the coverage at work (where I use the dongle the most) should be in the 5 bars region, with a great big “Excellent” next to it.

    ‘Taint the case unfortunately, I am getting a 2 bar GPRS connection on it, with a max speed of 11kbps. The Three dongle just tested out at 1.4Mbps.

    So far they have given me three different APN addresses to use, one of which got me to 11kbps, the rest of them were just pathetic.

    Once again, I realise this isn’t your area and I apologise for cluttering up this brilliant blog with this, I was hoping you might know more about it. I think this is in Orange’s court though.

    Thanks for the detail on the /tmp/wader log – I’ll fire up the Icon 225 and see what it says. I just looked at the lgs in there from the Three connection and its very interesting what has been stored.

    Alan

  9. [...] 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 [...]

  10. leroy says:

    In search of some CLI experience I tried the steps above, not on a Webbook, but on an old Dell laptop running Ubuntu 8.04.
    After some initial hiccups (on my part ) “It did exactly as it said on the tin.” Ctrl+Alt+F1 through F7 worked just as indicated. I then proceeded to break then then repair the screen again. Excellent tutorial. The only problem (for me ) is that i’ve now got a message on boot up that says “Invalid & Damaged Bootable Partition” (nothing to do with the tutorial) I guess that I’ve got some more fixing to do. Nice tutorial all the same. Thanks Alan.

  11. Bran says:

    AAAAAAAAHH help i need help i have just bought the webbook and i was so hasty on wanting to get compiz rcunning i tried to get drivers installed but like others every time i pressed Ctrl+Alt+F1 all i got was a screen of differnt colours so i then restarted and went in to recovery mode from the grub menue there i tried xfix as alan said there was a problem with “if X had not started with the buggy OpenChrome drivers you would be fine!” which also led me to using dpkg i then started a normal boot but now the screen goes blank just as i get to the login screen while i still can login due to the sound effect i cant see nothing but on a bonus i now can open the console using the Ctrl+Alt+F1 but when i type in the text that alan had left i had a reply of files not found. pease could some one help :-(

  12. Alan Bell says:

    @Bran,
    try plugging in an external monitor, then move on to part 2 and install the via drivers. Should work fine.

  13. Graham says:

    Hi Alan big thanks for your clear instructions and getting my webbook up and running after I black screened it. Its a great machine and trying not to play around with Ubuntu is just to tempting. I look forward to your future posts.

    Regards Graham

  14. mebreek says:

    Hello,
    the instructions/tips are great , thanks.

    I have one issue following the steps of this tip, when I press CTRL ALT F1 … thru to F6 , I get a totally black screen with no prompt. I tried the CTRL ALT on the right hand side of the keyboard , no response at all, the same with F8 and F9.
    Pressing CTRL ALT F7 will get me back to the normal GUI screen. any suggestions ? Thanks in advance.

  15. Alan Bell says:

    @mebreek, yes a few people pointed that out. I updated the instructions above.

  16. Joe O'Halloran says:

    Firstly I would like to take this brief opportunity to say that this blog site is brilliant! Well done and thank you.

    However I am currently using a orange usb modem as an internet connection. I am worried about exceeding my prescribed download limit.

    Is their currently a program that counts my download/upload usage that runs on Linux?

    thank you,

    Joe

  17. Alan Bell says:

    @Joe, the developers of the Wader mobile broadband client have some stuff in the pipeline for keeping track of the download limit cumulatively over a month, not sure when that will come as an update though. After you have been using it a while you can go to a terminal window and type ifconfig this will give you some stats on each network card, hso0 is the Orange network adapter. Unfortunately this resets each time you use it so it is almost entirely useless for your purposes! Here are the results for my wireless card, highlighting the received (RX) and sent (TX) data totals.

    wlan0     Link encap:Ethernet  HWaddr 00:19:d2:17:92:0e
              inet addr:192.168.2.10  Bcast:192.168.2.255  Mask:255.255.255.0
              inet6 addr: fe80::219:d2ff:fe17:920e/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1911691 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1227384 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2536109858 (2.3 GB)  TX bytes:150913779 (143.9 MB)
    

Leave a Reply