Saturday, August 18, 2007

GLX_EXT_texture_from_pixmap is missing compiz error with gutsy

I've been trying out Ubuntu's latest gutsy gibbon development version for a while now. The newest shiny, compiz (compiz fusion as of this week) was working very nicely with the open source radeon driver and AIGLX with no particular changes except xorg.conf tweaking on my old laptop (IBM T41p). Always a lover of newer and shinier, I upgraded to a T60p laptop. The open source radeon driver doesn't support the more recent ATI graphics cards. The T60p has an ATI MOBILITY FireGL V5200. The proprietary driver from ATI, fglrx, works fine with the new card (but not with older ones now!). However, it doesn't support AIGLX, so no compiz.

You then follow one of the many howtos out there to get compiz working with the fglrx driver by using Xgl. All working fine. Soon though, I began to suffer compiz (the window manager) not starting when I logged into X. In ~/.xsession.errors you can see these errors:

compiz.real: GLX_EXT_texture_from_pixmap is missing
compiz.real: Failed to manage screen: 0
compiz.real: No managable screens found on display :1.0

You get a terminal window, but no window manager. Starting compiz manually always works first time. What gives? It turns out that the fglrx driver is missing the GLX_EXT_texture_from_pixmap capability and to provide this you need to LD_PRELOAD the libGL shared object library that the Mesa driver provides (and fglrx replaces). This works just fine:

LD_PRELOAD=/usr/lib/fglrx/ /usr/bin/compiz.real --ignore-desktop-hints --indirect-rendering --replace ccp &

However, so does this:

/usr/bin/compiz --ignore-desktop-hints --indirect-rendering --replace ccp &

Huh? The wrapper script in gutsy, /usr/bin/compiz, detects and sets up the environment as needed. The problem is if you have Gnome set to save your session on logout. Gnome saves the currently running processes and assumes they can be started in the same way. So it tries to start compiz.real on login without the LD_PRELOAD variable set, resulting in the error messages you see in ~/.xsession-errors.

To confirm, try this:

$ grep compiz ~/.gnome2/session

10,CloneCommand=/usr/bin/compiz.real --ignore-desktop-hints --indirect-rendering --replace ccp
10,RestartCommand=/usr/bin/compiz.real --ignore-desktop-hints --indirect-rendering --replace ccp

The initial number will vary. Check in System > Preferences > Sessions and uncheck "Automatically remember running applications when logging out" in the Session Options tab. Delete your session file (rm ~/.gnome2/session) and logout and back into X to verify.


Sunday, February 18, 2007

Feisty upgrade goes smoothly

Only minor hiccups in the upgrade to Feisty Fawn. apt-get dist-upgrade stalled early on as it appeared to manage to install a newer version of a PHP library before upgrading the Apache version. As a result Apache wouldn't start or stop, couldn't be removed or upgraded and everything stopped. A bit of the usual poking around identified the suspects - apt-get remove of anything with php or apache remotely involved sorted it. A second apt-get dist-upgrade completed the install. Nothing remotely graphics card or X related to report, unlike with the Edgy upgrade.

I'm now enjoying Rhythmbox's cover art option and the Gnome menu bar song notifier showing the same. Still delving into the innards to see what else is new and shiny. That's what it's all about after all.


Saturday, February 17, 2007

Ubuntu Feisty Fawn upgrade

Been a bit lazy in posting in last few months. The latest Ubuntu release, Feisty Fawn, is nearing completion. So I thought I'd try for a dist-upgrade to the latest pre-release. It is running as we speak. Let's see how much survives, I'm guessing the graphics driver will be the usual suspect.


Sunday, October 08, 2006

Edgy and pam-keyring

Ubuntu Edgy is still looking good 3 weeks on. One joy of Dapper was Network Manager and the ease of dealing with both wireless networks and switching between many networks on a laptop. Logging into Gnome and then logging in again to unlock the gnome keyring that Network Manager uses to store wireless network passwords was a pain.

All in the past, as the (unofficial) pam-keyring deb and new versions of the pam libraries in Edgy mean that pam-keyring work like a charm now. There is the occasional bump where it connects to a wireless network and after switching back and forth from wired it starts prompting for the wireless credentials again. Overall though, life is much easier now.

Remember after installing pam-keyring to add these lines to /etc/pam.d/gdm:

auth optional try_first_pass
session optional


Sunday, September 17, 2006

Ubuntu Edgy dist-upgrade

I got bored with Ubuntu Dapper and decided to give Edgy, the latest beta version under development, a whirl. New gnome 2.16, OpenOffice up to current 2.0.3 version, Firefox 2.0 beta, Flash sound works now, updated Network Manager, updated pam libraries. All very nice.

Suspecting that apt-get dist-upgrade would trash my Dapper installation, I backed up and burned the Edgy Knot 3 install CD, just in case I needed it. Various reports from last month had people ending up with working X or kernel. Sounds like a challenge!

CAUTION: This procedure may melt your computer! Always Be Backing Up. Have a boot CD ready first.

  1. Get thee to a console window:
  2. Point your apt sources to Edgy:
    sudo perl -pi.orig -e 's/dapper/edgy/' /etc/apt/sources.list
  3. Update your package lists:
    sudo apt-get update
  4. Upgrade:
    sudo apt-get -f dist-upgrade
    "1055 upgraded, 125 newly installed, 31 to remove, 26 not upgraded" :)
  5. Upgrade once more if it bombs out during the first dist-upgrade:
    sudo apt-get -f dist-upgrade
  6. Kernel 2.6.17-7 was installed but the default in grub wasn't updated:
    vi /boot/grub/menu.lst
    change the default line to (as appropriate):
    "default 0"
  7. X didn't work, as it tries to use the missing ati driver instead of the installed fglrx driver:
    vi /etc/X11/xorg.conf
    Change this line in Section "Device":
    Driver "ati"
    Driver "fglrx"
    I did a modprobe fglrx for good measure, then startx to test. Houston, we have X!
  8. Some remaining packages complaining:
    sudo apt-get install hpijs python-adns python-clientcookie python-gadfly python-htmlgen python-htmltmpl python-imaging python-imaging-sane python-jabber python-kjbuckets python-ldap python-mysqldb python-osd python-pam python-pexpect python-pgsql python-pylibacl python-pyopenssl python-pyxattr python-reportlab python-simpletal python-soappy python-sqlite python-syck python-xmpp
  9. /sbin/reboot
All was well, and Gnome was even mostly functional during and after the upgrade (before reboot), although I stuck to the console for commands. The upgrade took about 2 hours using a 2Mb/s DSL line. I got ~200Kb/s to the local archive, ~750MB to download. Not all the upgrade time was downloading of course.

The success of the dist-upgrade may be pretty dependent on both hardware (Thinkpad T41p in this case) and what packages you have installed above and beyond Dapper default install (a few but clearly nothing bad!).

There is a slightly annoying graphics artifact sometimes, a horizontal line ~50 pixels beneath the cursor in Gnome. The multiple login prompt for Network Manager appears gone (NM 0.6.3 changelog claims it fixed it), although I had to re-enter my WPA password once after the upgrade. Flash sound works now with the packaging of the hack /etc/init.d/flashplugin-nonfree in flashplugin-nonfree 7.0.68. I cleaned out .gnome, .gconf etc. to get a fresh set of Gnome settings.

Now to try out Network Manager PPTP and pam-keyring since all the dependent libraries are now modern enough!


Saturday, April 08, 2006

Ubuntu Dapper upgrade

I upgraded from Ubuntu Breezy (5.10) to the latest Dapper test release (Flight 6) this morning, although Dapper (6.04) is not due for final release now til early June. All extremely smooth sailing so far.

First the basic distribution upgrade, just search and replace the word breezy with the word dapper in /etc/apt/sources.list. Then run sudo apt-get update; sudo apt-get dist-upgrade. A couple of hundred of MB of downloads later and a reboot we're up and running with Dapper.

The initial difference is most pronounced in the much faster boot time to the GDM login screen, followed by the much faster startup time for Gnome 2.14. A pretty new Power Manager applet has appeared alongside the old Battery Monitor one (this is on a laptop). One click later and that's the last I'll see of Battery Monitor.

So what's the damage? Well, wireless isn't working. It looks like wpa_supplicant has been uninstalled during the upgrade. Whoops, OpenOffice got uninstalled too. Where are my beloved gstreamer plugins for my MP3s?!

So easiest first, reinstall OpenOffice:

sudo apt-get install

Then sort out mp3 playback (howto for mp3/dvd/flash/realplayer/java and the rest well documented on the Ubuntu wiki):

sudo apt-get install gstreamer0.10-plugins-ugly

Now to reinstate wireless support. So Dapper has the shiny new Gnome Network Manager, which turns out to be a very fine piece of work, supporting WPA configuration seamlessly, is not installed. Perhaps it would be installed if this was not an upgrade. So:

sudo apt-get install network-manager network-manager-gnome

It doesn't work, :( Trying to start nm-applet gives this error:
The NetworkManager applet could not find some required resources. It cannot continue.
Turns out the Internet knows the answer to this one. Run:

sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/

Finally, Network Manager doesn't deal with interfaces that are already configured, so comment out all references to eth0 and ath0 from /etc/network/interfaces. Delete the WPA-PSK password from /etc/wpa_supplicant.conf.dpkg-bak for good measure.

Reboot and Network Manager kicks in. Nothing to do at all for eth0, for ath0 I get prompted for my WPA password, a master password to lock the password store Network Manager keeps the WPA password in and that's it. Each time I log in Network Manager prompts me to unlock my password database and connects to wireless when it is available.

With Breezy wpa_supplicant started up after the interface was configured at boot time, so ath0 didn't get properly configured until I ran sudo ifdown ath0; sudo ifup ath0, which I never got around to dealing with. Once the upgrade edges are smoothed off, Dapper is much more straight forward. A really nice improvement, looking forward to finding out what else is new over the coming weeks.


Sunday, May 08, 2005

Firefox 1.1 review

Fedora Core blog has a fine review of the updates coming in the next few months in Firefox 1.1:
  • improved incremental rendering of pages, especially on Linux
  • improved Preferences user interface (aka yet another user interface for Preferences, or is it called Options this month?)
  • performance improvements for tabbed browsing
  • fixes to some rendering bugs, including one that affects Slashdot's front page (Bug 217527)
  • A new "Sanitize" option that deletes all your sensitive information from your profile for additional security.


Saturday, March 05, 2005

Theo de Raadt

I had the good fortune to spend some time at a talk given by Theo de Raadt this week in Trinity College. He presented on Exploit Mitigation Techniques, primarily in OpenBSD of course. There were a lot of interesting topics like random stack offset, the use of the ProPolice compiler, taking advantage of hardware specific techniques to do with the sliding register windows on SPARC cpus and a whole lot more. The talk was followed by much selling of t-shirts and CDs.

I had some snacks at my favourite restaurant, The Cedar Tree - a very friendly Lebanese restaurant just near Trinity. A great way to end the evening.

Reading: Greg Egan's Diaspora (hard to get into so far, but has potential)
Playing: Half-Life 2 (every bit as awesome as it is reputed to be)


Friday, February 11, 2005

Favourite error message

Favourite error message:
kernel: VFS: Busy inodes after unmount. Self-destruct in 5 seconds. Have a nice day...
Still playing: Medal of Honor Pacific Assault (yes, still, what are you going to do, I went away for a while!)
Reading: Poul Anderson's Boat of a Million Years (quite like Kim Stanley Robinson's The Years of Rice and Salt so far, although it preceeds it. A tale of immortals through the years from the Phoenicians onwards).


Tuesday, February 01, 2005

Solaris 10 & Fedora Core 3 dual boot

I got Solaris 10 installed nice and smoothly. Java Desktop 3 aka customised Gnome looks nicer than the last time I saw it, I just need to poke around a bit and find everything again. The only downside so far is that it appears the Atheros wireless driver I need won't be available until maybe the next update of Solaris. Maddeningly, the Solaris engineers merrily blogging away are happily using the driver, but we can't. Roll on the rest of OpenSolaris! Which of course may not include this driver depending on where it's come from....

As I was waiting on Solaris 10 final release shipping, I had Linux installed first on the laptop. Which is not the easiest way to do it. So of course Solaris installs it own boot loader and I could no longer boot Linux (Fedora Core 3). To fix this:
  1. Boot with Fedora rescue cd
  2. Type chroot /mnt/sysimage
  3. Edit /boot/grub/grub.conf and append:
    title Solaris
    rootnoverify (hd0,2)
    chainloader +1
  4. Reinstall grub as your boot loader; type grub, at the grub> prompt type:
    grub> root (hd0,0)
    grub> setup (hd0)
    grub> quit
  5. Reboot
Pretty straightforward. The above assumes Solaris is on the same disk (hd0) as your Linux partitions and that it is on partition 3 (hd0,2) - adjust to suit. Now to get the graphics working nicely before moving onto some more exciting stuff.


Solaris 10 - absence makes...

...the heart grow fonder. While I was in Horizon I never put Solaris on my laptop as we had a shared laptop with Solaris that I could use when needed (almost never). Plus I had access to a Sun workstation and was working on Sun servers the majority of the time. So now that Solaris 10 has finally been released it's time to put it on my laptop.

Is it just me, or did waiting for Solaris 10 feel like waiting for Firefox 1.0? Visibly getting closer month by month, but always just over the horizon. Anyhow, all downloaded now, just have to burn some CDs and off we go.


Wednesday, January 26, 2005

OpenSolaris rises from the grave

argghh, arrrggh, need brains, tasty brains.... OpenSolaris is finally, really alive. I had a quick look at the dtrace source like many no doubt today. It looks complicated. Good thing my C is nearly non-existent.

I made space on the new laptop for a Solaris partition (or two), but I'm holding out another week until the FCS Solaris 10 comes out. I'm so sure we'll be seeing lots of retractions from all those good people who said it would never happen. Maybe they're having an off day, but the Slashdot trolls are fairly light on the ground - come on, there's got to be some more inventive conspiracy theories out there. I guess it gets a bit harder when actual code is available. There's even some poor, misguided soul pining for the iminent release of CDE source code. This Slashdot reply says it all:
"what kind of nutcrack would you have to be to crave for such an ugly piece of software as CDE?"
There are a load of cool blogs out there on OpenSolaris, primarily people who have all the code in the pilot program and the developers themselves. Some favourites:


Monday, January 24, 2005

Transferring pictures from Nokia to Linux with Bluetooth

I forgot to bring my digital camera so I've been taking some pictures with my Nokia 6230. My (new!) laptop has Bluetooth so I can transfer the photos to it easily. Here's a quick guide to doing this with Fedora Core 3.

First, make sure you have the basic bluetooth package installed, bluez-utils. Then for sending and receiving files I use the fabulous gnome-bluetooth package. Check they're installed: rpm -q bluez-utils gnome-bluetooth.
Start the various bluetooth daemons: sudo service bluetooth start. You should see something like this in /var/log/messages:
Jan 24 07:38:22 localhost hcid[5455]: Bluetooth HCI daemon
Jan 24 07:38:22 localhost bluetooth: hcid startup succeeded
Jan 24 07:38:22 localhost kernel: Bluetooth: Core ver 2.7
Jan 24 07:38:22 localhost kernel: NET: Registered protocol family 31
Jan 24 07:38:22 localhost kernel: Bluetooth: HCI device and connection manager initialized
Jan 24 07:38:22 localhost kernel: Bluetooth: HCI socket layer initialized
Jan 24 07:38:22 localhost kernel: Bluetooth: L2CAP ver 2.6
Jan 24 07:38:22 localhost kernel: Bluetooth: L2CAP socket layer initialized
Jan 24 07:38:22 localhost bluetooth: sdpd startup succeeded
Jan 24 07:38:22 localhost sdpd[5481]: Bluetooth SDP daemon
Jan 24 07:38:23 localhost kernel: Bluetooth: RFCOMM ver 1.3
Jan 24 07:38:23 localhost kernel: Bluetooth: RFCOMM socket layer initialized
Jan 24 07:38:23 localhost kernel: Bluetooth: RFCOMM TTY layer initialized
On the IBM T41p laptop you need to activate the bluetooth adapter (you don't want it running wide open the whole time!) by pressing Fn-F5. You should see the second LED from the left with the ™ sign come on. In /var/log/messages you should then see something like this:
Jan 24 08:18:07 localhost kernel: usb 4-1: new full speed USB device using uhci_hcd and address 2
Jan 24 08:18:07 localhost kernel: usb 4-1: device descriptor read/64, error -71
Jan 24 08:18:12 localhost kernel: Bluetooth: HCI USB driver ver 2.7
Jan 24 08:18:12 localhost kernel: usbcore: registered new driver hci_usb
Jan 24 08:18:12 localhost hcid[5455]: HCI dev 0 registered
Jan 24 08:18:12 localhost hcid[5455]: HCI dev 0 up
Jan 24 08:18:12 localhost hcid[5455]: Starting security manager 0
Turn on bluetooth on your phone (Bluetooth menu). Then scan for it from the computer: hcitool scan
Scanning ...
00:12:62:99:99:99 Nokia 6230
By default the phone has the name "Nokia 6230" which you can change from the phone's Bluetooth menu. Something like "My top secret photos" helps keep a low profile. Then we connect the phone and computer together using the MAC address discovered above (replace it with yours): sudo hcitool cc --role=s 00:12:62:99:99:99. Start the software that manages file transfers between the phone and computer, in GNOME start Bluetooth File Sharing from the Applications/Systems Tools menu. This starts /usr/bin/gnome-obex-server.

You should be done! Try sending a picture via bluetooth from the phone, it should discover a device with the hostname of your computer. On sending a pop-up dialogue box should appear on the computer to confirm if you will accept the image. Choose save and it goes into the top level of your home directory.

When you finish, turn it all off, this configuration has no security - I'll write something on that in the future. Some more information on all this: