Ubuntu Graphics Problems

I ran into this problem a while back on my server but it’s never really affected me as I dont generally use the console.

After running updates a good few months back, my system stopped giving me any output. It wouldn’t load to X or a console and even stopped showing the splash screen and the boot info.

The way I was getting around it was to just use an earlier Kernel version during boot. But tonight while doing some work this little bugger got me again.

After hours working through numerous problems I’ve just left unresolved this one finally needed to be solved. Previously I’d just SSH’d to the machine having no console, started the xlib_shm stuff and up popped the CCTV view and I’d just leave that running, but tonight even that wouldn’t work.

I found the following info while trawling the interweb for fixes:-
The problem seems to start after Kernel 2.6.38-8 (that’s the last one I can boot without problems)
It’s related to the ATI graphics card and drivers
*ERROR* Failed to register bit i2c VGA_DDC was showing up in the syslog

I found info in several bugs saying to add this ‘i2c_algo_bit.bit_test=0’ but didn’t actually say where.

So I opted to add ‘i2c_algo_bit.bit_test=0’ into the grub config for the lastest kernel, so my grub line now looks like ‘linux   /vmlinuz-2.6.38-15-generic root=/dev/mapper/VG-LV_Root ro   quiet splash i2c-algo-bit.bit_test=0 vt.handoff=7’

Rebooting kept my splashscreen, and presented me with my console once again. and now my xlib_shm was also working once again.

But as I’m very likely to forget after a bunch more remote updates, I thought it best to make it a little more permanent, so I edited /etc/default/grub and amended the OPTIONS line to read ‘GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash i2c-algo-bit.bit_test=0″‘
a quick run of update-grub and my entire config is updated.
This should survive future updates and keep me with a working console should I need it.

cp: cannot stat `/lib/libnss_*’: No such file or directory

Another Quick note as I keep running into this and every time go hunting for what I did to fix it last time.

When doing update/upgrades I run into the error cp: cannot stat `/lib/libnss_*’: No such file or directory when it’s running update-initramfs

This seems to be because of the dropbear hooks, that I use to decrypt a filesystem remotely.


Has all the info, but the basic steps for me are:-

nano -w /usr/share/initramfs-tools/hooks/dropbear

search for the line

cp /lib/libnss_* "${DESTDIR}/lib/"
Add x86_64-linux-gnu into the path making the line

cp /lib/x86_64-linux-gnu/libnss_* "${DESTDIR}/lib/"

UPDATE: This is valid for a 64bit system. For a 32bit system the path is more likely to be /lib/i386-linux-gnu/
This would make the line

cp /lib/i386-linux-gnu/libnss_* "${DESTDIR}/lib/"

Then run

update-initramfs -u

and no error.