Installing nVidia drivers with Optimus support, startx gives error "no screens found"
Just spent most of the day seeing if I could figure this out on my own. I feel like I did reasonably well for a first attempt, but X will not start and I haven't been able to figure out how to fix it...so here we go!
I have a Dell XPS 17 laptop that has both Intel and nVidia graphics with Optimus. I spent some time reading the Slackware documentation, along with the instructions on SlackBuilds.org before attempting the procedure.
Here's a summary of what I did:
1) Install xf86-video-nouveau-blacklist package from /extra on the Slackware disc
2) Install nvidia-kernel from SlackBuilds
3) Install libvdpau from SlackBuilds
4) Install nvidia-driver with COMPAT32="yes" from SlackBuilds
5) Copy /usr/share/X11/xorg.conf.d/10-nvidia.conf to /etc/X11/xorg.conf.d/
After doing this, everything seemed to be ok. I saw no errors during boot, and I also saw a message that the nvidia module had been loaded successfully. I saw no mention of nouveau anywhere, indicating it had been successfully disabled.
Now, when I run startx, it fails with the following error:
Oddly enough, with this huge xorg.conf file, I was able to run startx and get into KDE. However, as soon as I tried to open a terminal, everything froze. I couldn't switch to another terminal or kill X with Ctrl-Alt-Backspace, had to do a hard shutdown.
So then, I thought that maybe bumblebee might help with the multiple screen confusion, and I followed this guide to try to get it installed (taking careful attention to use the COMPAT32="yes" option for everything that needed it.) I also made sure to use the nvidia driver I downloaded from SlackBuilds, and changed the version number in the bumblebee.Slackbuild script accordingly, so as not to be mixing different driver versions, which seems obviously undesirable. I skipped the kernel section of the guide, since I already did this earlier and it appears to be working.
So I restarted again, ran startx...exact same error, no change.
It seems that the xorg.conf needs a very specific setup for Optimus laptops, but I haven't been able to find any documentation that addresses this specifically. I also saw several places that mentioned xorg.conf was deprecated in favor of some new files under /etc/X11/xorg.conf.d/ that matched the naming convention for the file automatically generated by the nvidia driver, but I'm a little confused on exactly which config file is the "correct" one?
So I've got my new task for the week...any ideas?
I would blacklist each GPU driver module individually and get each to run. That way you can inspect and compare syslog/messages/Xorg.0.log for hints. See also http://docs.slackware.com/howtos:har...nvidia_optimus if you haven't already.
I just discovered the link you mentioned right before you posted, although it looks identical to the one I found earlier.
I'll probably remove them all and try it one more time to make sure I didn't miss some little thing.
OK, after a few more hours of troubleshooting I discovered a few interesting things.
First, I attempted to run slackpkg clean-system, and the proceeded to install Bumblebee again, this time with the intention of letting it use its own nvidia driver. While compiling the VirtualGL dependency, it stopped with an error that it couldn't find libGL.so. I traced this to being an OpenGL library that sounded like something that would be installed with a default system. This compiled fine earlier with no errors, so I guess something happened after removing all these packages.
In order to rule out any other possibilities, I just went ahead and did a full reformat/reinstall. While I was cloning the Bumblebee from github, I thought to myself that I better run KDE on a stock nouveau driver just to make sure it works ok. To my surprise, it did not! It froze before even getting to the desktop, had to do another hard shutdown. I restarted and tried again, this time making it to an open terminal window, and after typing one character, it hard froze again.
So it seems I have some other graphics problem going on that I wasn't aware of, and I need to solve this before trying to install the nvidia driver again. I've been working exclusively at the command for the last few weeks, but I distinctly remember using KDE a month or so ago and it worked fine with no freezing problems, so something must have changed since then.
I'm running a totally default Slackware 14 install, with only the following changes:
multilib, with appropriate slackpkg blacklists
slackpkg upgrade-all, fully up to date with kernel 3.2.45
One last thing I tried was adding [Compositing]Enabled=false into ~/.kde/share/config/kwinrc, but that didn't change anything either.
I looked through /var/log/Xorg.0.log for any clues, but everything looks ok as far as I can tell. The only thing I saw that jumped out at me was the fbdev module couldn't be opened because it didn't exist, but the intel modules are loaded and working.
I guess at this point I'm leaning towards either the kernel upgrade from 3.2.29 to 3.2.45 or the terminus fonts causing the issue, but is there anything else that could cause this that I'm unaware of?
I just happened to wander into this thread right after posting this, and several pages in some people were reporting this very issue, with freezing in X with intel graphics.
It sounds like rolling back to 3.2.29, or upgrading to the 3.8 series in -current is resolving this issue for everyone, so that seems like my next course of action.
It might take me a few days to figure out how to do this, so I'll report back as soon as I can figure it out.
OK, I'm back with an update!
I managed to figure out how to download and install the 3.8.13 kernel from Slackware -current and get it working, so I didn't have to build one from scratch (sounds like fun but not quite ready for that yet!) I tested X and the freezing problem seems to be gone, so I was ready to try the Bumblebee install again.
I followed the instructions on the Optimus page in the Slackware docs again, and I did notice something I did incorrectly the first time. I had installed the packages with the installpkg, rather than upgradepkg --install-new, and that may have contributed to my earlier issues, got that straight now! I also didn't realize that Bumblebee included the nvidia driver, so trying to do them separately may have also caused an issue.
I was also able to compile VirtualGL with no issues this time around. It seems that installing all the Bumblebee packages, then running a slackpkg clean-system to remove them, did something with the libGL.so that made it unavailable. A system reformat/reinstall fixed the problem, but I'm sure there was probably a better way to fix it.
I also noticed that the Slackware docs did not mention installing libvdpau, which is required for the nvidia-bumblebee package to compile. Luckily I recalled this step from the SlackBuilds documentation, and added it in after VirtualGL, not sure if it was omitted intentionally, but if not it might need an update.
So after getting them all installed, I ran the following commands:
I checked X one last time after this, and it's still working ok. I ran glxgears and got a solid 60fps, so I believe the nvidia driver might be working, but I'm not sure if that alone is conclusive.
So I've made some good progress, I think if I can figure out this bumblebee issue I might have this one solved.
Anyone have any ideas what would cause this?
Did you use libbsd > 0.4.2? For some reason libbsd 0.5.* also gives me segfaults when running the bumblebee daemon.
Also, there's a pre-built libvdpau that is shipped with the nvidia-bumblebee driver which is why I did not include compiling and building libvdpau (and as far as I know, libvdpau was only needed if you're going to use nouveau, or at least that's what the README says.
I did indeed use libbsd-0.5.1, as that was what came down with the Bumblebee-Slackbuilds GIT repository.
I tried your suggestion by removing libbsd-0.5.1 with removepkg. I then downloaded libbsd-0.4.2 from SlackBuilds.org, and installed it with upgradepkg --install-new.
Then I tried to start rc.bumblebeed again...and it worked! No more segmentation fault! =)
I then went into X and ran glxspheres both with and without the optirun command, and sure enough it was switching between the Intel and nVidia GPU for rendering, so I think it's all working correctly now!
As for your comment about libvdpau, the only reason it came to my attention was because nvidia-bumblebee failed to compile without it, I don't recall the exact error but it was clearly complaining about that, and after installing it, it compiled with no problems. I also see it listed as a dependency for the nvidia-driver on SlackBuilds.
So for anyone who happens across this thread in the future, here's a brief summary of what happened:
1) I installed nvidia-driver and dependencies from SlackBuild, which resulted in the "no screens found" error.
2) I then tried to install bumblebee after the fact, which did no good.
3) I then tried to do a rollback with slackpkg clean-system, and in doing so caused an issue with libGL.so no longer being found.
4) I didn't know how to fix the libGL.so problem, so I reformatted/reinstalled.
5) I then followed this guide, which installs both bumblebee and the nvidia driver together.
6) After doing this, I couldn't start rc.bumblebeed due to a segmentation fault error.
7) I removed the libbsd-0.5.1 package, and installed libbsd-0.4.2 in its place, which resolved the segmentation fault error.
8) Tested bumblebee in X and all is well!
Now, for TommyC7, I have one final question...how did you figure out that the newer libbsd package was causing the segmentation fault error? I would have never guessed that, so I'm super-curious about your troubleshooting technique on this issue.
I'm not sure how common this issue is, but it might be nice to have listed under the troubleshooting section on the Slackware Docs page for this procedure, along with clarifying the libvdpau requirement. I don't know what the official procedure is for recommending an update to the Slackware documentation, so I'll just put the idea out there.
Another issue solved! Thanks for all the help!
Well I'm the original author of that wiki/docu page and I started using modified SlackBuilds awhile back.
I have a script that's run on some sites to check for new packages and libbsd at the time had been one. I built the new package and noticed none of the major library versions that bumblebee relies on had changed so it didn't seem like it needed a rebuild. So I just restarted the daemon and got the same problem you did.
I'll look into that libvdpau thing later, but at the moment I'm quite busy with other things.
The SlackBuilds used for bumblebee aren't provided by me so unfortunately I can't help too much there other than to say you should modify the version as you already did.
Thanks for the info, I was wondering if there was some way I could have figured out to look for something like that, but I guess you just happen to be in the right place at the right time.
I didn't even realize you were the author of that page, I had to scroll way down and found your name at the bottom. Thanks for putting that together, greatly appreciated!
I'm actually working on documentation on setting up my laptop with a fully functional Slackware system, since I have sort of a complex setup it's helping me keep everything straight since I'm learning as I go, and I'm sure I won't remember all these steps whenever I have to do it again someday!
Once its finished I'd like to put it up here in some form, since I've received so much help here, its my way of returning the favor. I doubt I have enough experience to be editing the official wiki pages just yet...maybe someday.
|All times are GMT -5. The time now is 11:39 AM.|