2015-06-28

CB5-311 Ubuntu (ARM Chromebook) and fixing GLX

I did an apt-get upgrade and didn't consider the sort of breakage that could occur if the system were to replace /usr/lib/xorg/modules/extensions/libglx.so with *not* the Nvidia one. I had some erroneous messages in /var/log/Xorg.0.log that made me think the problem was because of some undefined symbols in some mesa library, but that turned out to be missing symbols in the fallback software rendering, not the actual GLX module. To fix the error, I extracted the relevant parts from the original setup script and ran them again. Here's the extracted bit:

    l4tdir=`mktemp -d`
    l4t=Tegra124_Linux_R19.3.0_armhf.tbz2
    wget -P ${l4tdir} https://developer.nvidia.com/sites/default/files/akamai/mobile/files/L4T/${l4t}
    cd ${l4tdir}
    tar xvpf ${l4t}
    cd Linux_for_Tegra/rootfs/
    tar xvpf ../nv_tegra/nvidia_drivers.tbz2
    tar cf - usr/lib | ( cd / ; tar xvf -)

    cat > install-tegra.sh << EOF
    update-alternatives --install /etc/ld.so.conf.d/arm-linux-gnueabihf_EGL.conf arm-linux-gnueabihf_egl_conf /usr/lib/arm-linux-gnueabihf/tegra-egl/ld.so.conf 1000
    update-alternatives --install /etc/ld.so.conf.d/arm-linux-gnueabihf_GL.conf arm-linux-gnueabihf_gl_conf /usr/lib/arm-linux-gnueabihf/tegra/ld.so.conf 1000
    ldconfig
    EOF

And a pastebin version because blogger butchering.