LibGL Error: Failed To Load Driver Swrast

Being a professional graphic designer you value your graphics card more than your life. Or, be it for enhancing your gaming experience or working for hours and hours on rendering your video edits, a good graphics card will certainly make your life and the process of rendering easier and even painless. Either way, when your graphics card in your favorite version of your free operating system starts acting up and you’re unable to use your new, flashy application or game due to an error such as Failed to Load Driver Swrast, fear not! We have all the steps required to get you back on track, from the easy to the long and drawn out. Buckle in!

This article applies specifically to a Linux error, but maybe you’re wondering more about another Operating System – you can check here for my Ultimate List of Windows Error Codes. Maybe consoles interest you more? Check here for the Ultimate PS4 Error Code List.

This is an era of communication and you can find almost everything online. I remember back in my days when we had to actually go out and buy games but now I can simply do it in the comfort of my home and at very reasonable prices – thanks to Steam discounts. Getting back to my point, sometimes – when on Linux – when you have just bought yourself the latest game and are eager to play you launch Steam without any further delay. The excitement of it has you on the tip of your toes while the anxiety of playing your new game and telling your friends on the earliest is also creeping into your head. However, all this excitement goes away when Steam decides to betray you. Disappointed you look towards your computer screen and think, now what? Well, don’t panic! I’m certainly here to help.

You would basically try launching steam via Terminal like this;

Running Steam on ubuntu 15.04 64-bit

STEAM_RUNTIME is enabled automatically

Installing breakpad exception handler for appid(steam)/version(1437790054)

libGL error: unable to load driver: r600_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: r600

libGL error: unable to load driver: swrast_dri.so

libGL error: failed to load driver: swrast

And to your dismay, it won’t work.

Possible Easy Solution

To fix this problem try running these commands in Terminal:

rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

rm ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libgcc_s.so.1

After this Steam should be working properly.

Pro Tip: If you are installing the proprietary AMD drivers don’t do it! They are bad for the stability of your OS in comparison to other open source drivers. At this point, you might point out how open source drivers perform badly. In that case, better stop living under a rock and upgrade! What I mean is upgrade the Mesa version by adding xorg edgers ppa.

sudo add-apt-repository ppa:xorg-edgers/ppa

 

After that type this;

sudo apt-get update & sudo apt-get upgrade

 

You will be required to reboot after that and then you will be upgraded to Mesa version. This method is tried and tested for Ubuntu 16.04.


Running Steam using terminal can be complicated even if you are well aware of the commands. Here is a simple query to give you an idea about what errors you can face while installing Steam on Ubuntu 15.04 and how to solve them.

More Details: What are Ubuntu and Mesa?

Mesa is an API that allows interfacing between the graphics hardware and software. Basically, independent of Operating System, Mesa provides an OpenGL API. Its job is to create a transitional layer in between graphics API and the graphics hardware in the operating system. On the other hand, Ubuntu is an open source free to use operating system, based on Linux. You can download Ubuntu from here.    

The basic difference between Windows and Linux is the Direct Rendering Infrastructure, also known as the DRI. DRI, which is a framework that allows access to the graphics hardware directly under the Windows System. Mesa, using OpenGL, is an interface that defines a standard set of functions that are needed for drawing 3D graphics. Now I know that computer science is not your major, but keeping that in mind in this day and age you cannot go without knowing how to use a computer, even if it’s only for occasional use. As difficult as the setups are, the job it does for you is a thousand times better and more fruitful than all the trouble you went through.

Another condition could be that you are quite sure NVIDIA-Linux driver is installed properly and there is nothing you can recognize which might seem to be causing trouble. The visible effects of this sometimes appear during start and then GL windows are not drawn, rather, they just contain the background, ie:

If you installed the NVIDIA drivers using binary .run package then you are in for a surprise. You need to install that each and every time there is a kernel update. Other files are also overwritten so they might be disrupted when packages are updated. Newbies might have trouble in realizing minute details that go in the process of updating and building Linux-based machines and servers, as they can be of great use but most of the people use tools to produce a site with an unmanaged machine.

What is SWRAST?

Swrast is a software renderer and therefore, it is not the job of swrast to find the hardware driver for your graphic card. There is a couple of libGL libraries installed and a symbolic link to those libraries. If you want to have a look at them refer to the command line below:

sudo find /usr -iname “*libGL.so*” -exec ls -l {} \;

 

ALSO READ:  Fix Runtime Error 203 For Windows 7 ,8 & 10

Sometimes installing graphics card break these symbolic links. To check this you might want to run a small OpenGL program test and verify the symbolic links. You can do so via:

 

export LIBGL_DEBUG=verbose

glxgears

This is going to fail and will probably tell you that your OpenGL library is not working. If you do not see this error then there are other things to consider. For now, the solution to this would be making sure that the symbolic link i.e. /usr/local/lib/libGL.so.1.2.0 is pointing at the right OpenGL library.

Brand New to Your Nvidia Card?

The earlier method does not work properly and when someone switches to Nvidia in the bios, and there is no libGL installed in the first place. Oh no! What should we do? Have no fear, we’ve got you covered, too. It’s pretty simple, really – all computer hardware generally has evolving versions of software drivers to ‘drive’ that hardware and ‘make it go.’

The solution here? Install drivers! Visit this site and download Nvidia updated drivers!

Simple enough, right? Reboot your machine, and give your Application or game another shot – and see what happens!

Shortcut / End-All Solution

Should nothing else prove to work, try in terminal:

sudo apt-get remove nvidia*

which will remove any nvidia drivers you've got installed already. Next, reboot. Now, again in terminal:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-349 nvidia-settings
sudo add-apt-repository -r ppa:xorg-edgers/ppa
This will install Nvidia's 349 driverset, which is known to be the most stable. Try your game or application again!

Conclusion

Installing graphics card drivers provide the possibility that the symbolic links used for OpenGL libraries break. The solution to this problem is manually fixing symbolic links.

Computer related errors have always been a nuisance to mankind ever since the introduction of computers into our daily lives. Even though most of the solutions are available online it is one tough job to land on the right link at the right time. I hope I provided an answer to all of your queries!

Pro Tips Galore:

  1. Should nothing else work – try reinstalling your Operating System. A fresh start is oftentimes exactly what you need – check out these tips under Pro Tips Galore about reinstalling the Windows OS, they basically apply the same in this scenario except you want to download your shiny version of Linux instead. Maybe, right?
  2. While you’re at it, make sure you’re using the most recent version of your Operating System. Updates and upgrades can do beautiful things when you’re facing errors like these!
  3. Failing that, try a new graphics card (along with new drivers). Try switching to AMD? AMD and Nvidia have had a long-standing battle for ‘best,’ and you might find that a comparable alternative from the ‘other side’ to be a good fit.
  4. Failing that, try a new operating system. There’re plenty of flavors of Linux out there – or, potentially, you could try Windows to sort out your woes.
  5. Failing that – check other, similar titles. Are they also misbehaving? Do you see any relevant troubleshooting articles for those specific games through searching your favorite Internet Search Engine?

“There’s nothing that cannot be found through some search engine or on the Internet somewhere.” – Eric Schmidt

What’s more impressive than knowing so much about Linux? Knowing about the Internet in general, of course! Click here for the Ultimate List of HTTP Errors.

Thanks, and again – I truly hope this helped put away your issue! If you’re interested in more articles I’ve written helping people in other circumstances like these, click on my name as author up top. You can also search all of Error Codes Pro by clicking the little Search icon in the top-right, and typing in whatever error you’re facing.

Leave a Comment