I have had the same problem after install new Intel Graphics drivers. The cause was the way dynamic links between shared libraries were formed by ld.so
. I found pieces from different sources, and took the following steps to fix it.
1: Check /etc/ld.so.conf
ldconfig
is used to update/maintain the configuration of links. On SO I found out that the list of paths it looks for is based on the file /etc/ld.so.conf
, which should contain just one line and should look like this:
$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
2: Check files /etc/ld.so.conf.d/
The files inside the folder /etc/ld.so.conf.d/
hold the different paths containing the shared libraries. To check, list all the *conf
-files in the
folder. Mine had files and links, and looked like this. But it may be different depending on installed packages.
$ ls -Ahl /etc/ld.so.conf.d/
total 16K
-rw-r--r-- 1 root root 38 aug 12 2016 fakeroot-x86_64-linux-gnu.conf
-rw-r--r-- 1 root root 24 sep 27 20:41 ld.so.conf
-rw-r--r-- 1 root root 48 sep 27 20:43 x86_64-linux-gnu.conf
lrwxrwxrwx 1 root root 43 jun 8 11:51 x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
lrwxrwxrwx 1 root root 42 jun 8 11:51 x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf
-rw-r--r-- 1 root root 18 sep 27 20:43 zz_i386-biarch-compat.conf
and their contents, listed one after the other using cat
(some files have comments, not shown here):
$ cat /etc/ld.so.conf.d/*.conf
/usr/lib/x86_64-linux-gnu/libfakeroot
/usr/lib
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/mesa-egl
/usr/lib/x86_64-linux-gnu/mesa
/lib32
3: Add missing paths
Back-up any files before changing them!
The first problem might be that paths are missing from the .conf
files. For example, I had to add /user/local/lib
and used sudo nano ld.so.conf
to add it. And I added /usr/lib32
to zz_i386-biarch-compat.conf
. Google ldd
and ldconfig
for finding paths that are missing.
Removing lines from these files is generally not necessary.
4: Reorder files and their entries
Now, the problem is that ld.so
reads the files and their lines in the order they were saved (I found out here). I used an array of filenames and an array of new prefixes to rename the files. The /mesa...
entries must come before those in (/usr)/lib/x86_64-linux-gnu/
to order the graphic libraries.
$ cd /etc/ld.so.conf.d
$ files=(*) #filename array
$ numbers=(1 2 5 3 4 6) #order array
$ for i in ${!files[@]}; do
$ sudo mv -i ${files[$i]} ${numbers[$i]}0_${files[$i]};
$ done
$ cat /etc/ld.so.conf.d/*.conf #Check the order
/usr/lib/x86_64-linux-gnu/libfakeroot
/usr/local/lib
/usr/lib
/usr/lib/x86_64-linux-gnu/mesa-egl
/usr/lib/x86_64-linux-gnu/mesa
/usr/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib32
/lib32
5: Reconfigure library and reboot
$ sudo ldconfig #sudo ldconfig -v (for output)
$ sudo reboot
After rebooting, everything was back to how it used to be (lighter windows, purple gnome-terminal, better font rendering). Let me know if it works for you.
cat /etc/ld.so.conf.d/*.conf
? In general, I think/usr/lib
and/usr/local/lib
should come first, followed by the multiarch (x86_64) equivalents. In my case these were listed in different .conf files. If you have special files like the mesa files, placing thex86_64-linux-gnu.conf
afterx86_64-linux-gnu_(E)GL.conf
might do the job. – pm-b Sep 28 '17 at 13:55/usr/lib
is missing. – Tooniis Sep 29 '17 at 08:46