LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 01-23-2017, 07:38 PM   #1
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Rep: Reputation: Disabled
nvidia optimus: failed to load driver: swrast (primus fatal error)


hello forum i got a problem with my nvidia optimus graphics card. when i run something with optirun i get:
Code:
libGL error: failed to load driver: swrast
followed by
Code:
primus: fatal: failed to acquire direct rendering context for display thread
i run also the debug command and got a more detailed list of errors:
Code:
libGL: screen 0 does not appear to be DRI3 capable
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL error: failed to load driver: swrast
libGL: screen 0 does not appear to be DRI3 capable
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL error: failed to load driver: swrast
libGL: screen 0 does not appear to be DRI3 capable
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL: Can't open configuration file /home/orestisfra/.drirc: No such file or directory.
libGL error: failed to load driver: swrast
primus: fatal: failed to acquire direct rendering context for display thread
i have nvidia graphics card and intelhd graphics (optimus technology) and i have linux mint 17.3 KDE with nvidia 378 driver.

i also found 2 threads with a similar problem but they are for an amd graphics card. generally i have searched everywhere and i couldn't find a solution. i have mesa-utils and libgl1-mesa-glx:i386 installed. i have reinstalled the nvidia driver and rebooted.
http://www.linuxquestions.org/questi...-a-4175484253/
http://www.linuxquestions.org/questi...st-4175497461/

thank you
 
Old 01-24-2017, 04:27 AM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
It is best to include as much information as possible. Like, make and model of computer, model of graphics devices.
Post the output of command: lspci | grep VGA for information on the display devices and command: lspci -vn | grep VGA for detailed hardware id.

It appears this driver has recently been released, did you have a previous version working with this installation, if so, which one?
 
Old 01-24-2017, 09:21 AM   #3
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Original Poster
Rep: Reputation: Disabled
first of all thank you so much for your time. sorry i don't usually ask for help on forums, i try to find my way. but this time it is a dead end for me.

i used the nvidia-352, nvidia-367, and none of these worked with optirun/primusrun command. the outputs of the commands are:
Code:
lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [GeForce 610M] (rev a1)
and
Code:
lspci -vn | grep VGA
00:02.0 0300: 8086:0106 (rev 09) (prog-if 00 [VGA controller])
01:00.0 0300: 10de:1058 (rev a1) (prog-if 00 [VGA controller])
and this is the entire lspci -vk:
https://gist.github.com/orestisfra/9...b103e1fe95b6b8
samsung laptop - NP300E5C-T01GR

i don't exactly demand the bumblebee project to work, i mean if i find a way to disable the intelHD graphics card and have only nvidia working, that could work too. bios don't give me that option but i will double-check. the fact is that i've used bumblebee in the past (2 years ago) and it worked. but i don't remember what driver i used.
 
Old 01-24-2017, 06:39 PM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
It appears the only driver currently in Mint repositories is ver. 346, which don't support your card. The current driver in Debian repositories installable by the package management system for that card is ver. 375.26, but will likely migrate to the update ver. 378 soon.
You are using the correct version, I'm guessing it's the .run installer from Nvidia web site and not installed via package manager?
 
Old 01-25-2017, 07:09 PM   #5
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Original Poster
Rep: Reputation: Disabled
i actually installed the nvidia-378 driver from the ubuntu repositories. i uninstalled all nvidia drivers and bumblebee and reinstalled the nvidia-375 package. it didn't work again. mdm wasn't loading and because of that i had to uninstall the drivers again. right now i don't use the nvidia graphics card. i also checked the bios and i cannot disable the integrated intelHD graphics card. i really don't know what to do. this error seems to occur when i install the bumblebee package. i'll try to find another way to use the graphics card (if there is one)
 
Old 01-25-2017, 11:54 PM   #6
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Seem to have found a solution. Recently had a motherboard replacement and that strangely required graphics drivers to be reinstalled in windows. I have not done that and when i booted to ubuntu, I can no longer find 2 VGA adapters listed in lspci output. It only detects the nvidia one. So I just installed nvidia-current and it works great! BUT of course it means bad graphics in windows. I am not sure if the graphics driver installation triggers some sort of hardware switch in windows that sets the intel one as the primary. so right now its my only option!
My MSI laptop has Nvidia GTX970M, which has optimus.
But...
MSI set things up a little different on my GT72 6QD, supposedly optimus is a pain for a gamers so MSI included a hardware switch on my GT72 6QD to select either dedicated or integrated graphics, no optimus here, it's either Nvidia or Intel. Hitting this switch while booting up the system, during power down/up on a reboot or when linux is up and running does nothing, there is no option in the firmware settings (BIOS) to select graphics adaptor.
The only way I can switch between the two is when Windows 10 is up and running, I hit the switch and a pop up appears saying it has to reboot to switch adapter and I click "OK". I have been assuming the switching was taking place via the firmware interface, but after finding the quote above in another forum, I'm starting to think it's done through Windows.

EDIT: Although I doubt it's that easy, it's worth a try to disabling Intel graphics support in Windows.

Last edited by Brains; 01-26-2017 at 12:04 AM.
 
Old 01-26-2017, 08:23 AM   #7
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Original Poster
Rep: Reputation: Disabled
thanks for the info . i dual boot indeed but i don't use windows 10 but 7. i will try to do that although i haven't open w7 for a month. basically i don't use them that often. so i don't really know how to do that. but i will try it via the nvidia and intel settings on windows, as well as make a research on all the options i have and report it here.

EDIT: well i installed the "nvidia-375" driver as well as "nvidia-settings" and "nvidia-prime". i didn't install the "libcuda1-375" package. i then changed the default driver to be nvidia through the "nvidia-settings" package on "PRIME profiles" section. loged out loged back in and now it seems to be working. there are 3 programs on system monitor ("nvidia-persistenced" nvidia-persistenced user, "irq/30-nvidia" root user, and "nvidia" root user) running. is there another way to check if the nvidia driver is working? just to be sure. sorry for the noob question... :/ . it seems i can't get bumblebee to work on my system. i still don't know why.

Last edited by orestisfra; 01-26-2017 at 09:29 AM. Reason: updating post. i don't want to add another post to avoid spam.
 
Old 01-26-2017, 10:39 AM   #8
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Check the log file /var/log/Xorg.0.log, it will show how it configured including the driver loaded.

Not sure if Mint packaging is similar to Debian, but this is what Debian wiki says to install: sudo apt-get install bumblebee-nvidia primus

Last edited by Brains; 01-26-2017 at 10:49 AM.
 
Old 01-26-2017, 11:16 AM   #9
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Original Poster
Rep: Reputation: Disabled
well as shown here: https://gist.github.com/orestisfra/2...b6b3f786e22bce
it is running. but i can only change it through the nvidia-settings. i will install bumblebee again and report

EDIT: ok so i installed "bumblebee-nvidia" and "primus" and mint installed with it the "bumblebee" package. it seems that these packages depend on each other. so then i added my user in the bumblebee group rebooted and bumblebee seems to be working fine! so this is solved but i don't know what caused the problem in the first place. if the user wasn't added in the bumblebee group wouldn't it give a different error?

Last edited by orestisfra; 01-26-2017 at 12:12 PM.
 
Old 01-26-2017, 02:41 PM   #10
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Although this may be a little off topic. Something I've been wanting to mention many times in the past, I will seize the opportunity to mention now.

When I was configuring a new Debian testing install on my desktop, I had three installations in three partitions. When I went to compile drivers for a Asus AC51 wireless USB dongle and installed headers the way most people in forums suggested, I would get a compile failure, just like so many others looking to get these drivers working. A lot of people eventually gave up and either returned the dongle or just bought another that was natively supported by the Linux kernel. The command most people recommend for installing headers is below.
Code:
$ sudo apt-get install linux-headers-$(uname -r)
So....
In another installation I had (I use images of the initial installation), I installed headers the Debian way according to the Debian Nvidia wiki article and I'm able to compile the Asus AC51 drivers, and it works perfectly. Debian "wiki" recommended way of installing headers below.
Code:
# aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
So many people out there have problems compiling drivers for hardware not supported by the kernel get frustrated, angry, and a lot just give up, some, give up on Linux altogether.
Debian wiki should be in your bookmarks if you are running a Debian derivative, granted, not all derivatives are exactly like Daddy, it is still a great source of information.

Last edited by Brains; 01-26-2017 at 02:44 PM.
 
Old 01-26-2017, 07:22 PM   #11
orestisfra
LQ Newbie
 
Registered: Jan 2017
Distribution: linux mint 17.3 KDE edition
Posts: 10

Original Poster
Rep: Reputation: Disabled
thank you so much for your time and information given. i actually had the nvidia drivers working in the past by following a linux mint guide (although there were still some problems. wine was interfering with the nvidia driver for some reason). i don't remember exactly what happened but i broke my system as i was new to linux and i was experimenting. so i tried different distros, even debian and arch.

i ended up installing linux mint kde dual boot with windows 7, as i didn't want to use wine. so that is why i didn't use nvidia drivers on linux. after 2 and a half years i realised i don't use windows at all. so i wanted to get my laptop's full potential (that's the interest for nvidia drivers now :P ). i followed the same steps (no tutorial) as i knew what packages i needed and realised it didn't work. went to irc channels, ubuntu wiki, linux mint wiki, reinstall drivers a bunch of times.

i think what fixed the problem was that i watched carefully what packages are going to be installed and didn't install "libcuda1-375" package, as it has a bug not yet fixed (or maybe they fixed it by now but it is quite new. 13/1): nvidia forums . either that or because i added the user in the bumblebee group. to do that i didn't use the command provided by the debian wiki as it is not working on linux mint. but yes debian wiki is a really good source of information, i would say beside the arch wiki. both helped me a lot understand how linux work.

anyway i think we went out off topic a lot so thanks again .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install nvidia driver for optimus laptop failed to start on Centos 6 ohmygoddess Linux - Software 1 06-18-2015 05:31 AM
Install Nvidia driver on Centos 6 system and Lenovo optimus Laptop Y580 failed ohmygoddess Linux - Software 7 06-17-2015 11:29 AM
[SOLVED] failed to load driver: swrast moisespedro Slackware 37 04-23-2014 09:47 AM
amd catalyst 13.12 - libGL error failed to load driver swrast Dr.Thodt Slackware 1 01-25-2014 01:35 AM
[SOLVED] Nvidia Optimus Xorg -configure fatal error jiecenzhao Linux - General 10 12-03-2011 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration