Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

OpenGL not working for intel on optimus system [CONCLUDED]

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
51 posts
  • Previous
  • 1
  • 2
  • 3
  • Next
Author
Message
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Wed Jun 25, 2014 6:53 pm

Well, pastebin that xorg log.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Wed Jun 25, 2014 7:18 pm

I noticed that adding the nvidia part makes KDE unstable. I guess that is due to the segmentation fault. Also, in http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers in the section trouble shooting by the title "Getting 2D acceleration to work on machines with 4GB memory or more" I seam to have an issue.

Code: Select all

# cat /proc/mtrr 
reg00: base=0x000000000 (    0MB), size= 8192MB, count=1: write-back
reg01: base=0x200000000 ( 8192MB), size=  512MB, count=1: write-back
reg02: base=0x220000000 ( 8704MB), size=  256MB, count=1: write-back
reg03: base=0x0e0000000 ( 3584MB), size=  512MB, count=1: uncachable
reg04: base=0x0d0000000 ( 3328MB), size=  256MB, count=1: uncachable
reg05: base=0x0cc000000 ( 3264MB), size=   64MB, count=1: uncachable
reg06: base=0x0cb800000 ( 3256MB), size=    8MB, count=1: uncachable
reg07: base=0x22f800000 ( 8952MB), size=    8MB, count=1: uncachable
reg08: base=0x22f600000 ( 8950MB), size=    2MB, count=1: uncachable
According to the wiki I should adjust that in the BIOS. However, I have no "CPU Settings" or anything resembling MTRR in BIOS. Thus, I can not apply the suggested fix. Not sure it is relevant to the issue at hand. I could also confirm that my notebook is muxless (SG Mode Select [Muxless]).

As for the xorg log see here: http://pastebin.com/AAJXUnnN
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Thu Jun 26, 2014 12:14 am

It seems that you need that 'Option "UseDisplayDevice" "none"' line at the driver - as I don't have any laptop (muxless or otherwise) I was going here by my recall of other forum posts on muxless laptops, but those were mostly ATI (and usually about open source driver); nvidia, it seems, is far more bitchy.

Going by the guide I've googled, if you won't be using nouveau, 'modesetting' driver might be required instead of 'intel'.
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Thu Jun 26, 2014 9:46 am

You should have warned me that includes mouse and keyboard :)
Shite ... I completely forgot that. :o Sorry, I am really sorry.
@VoidMage, you were right, it sometimes causes more problems. I forgot that it just worked for me because I am used to specify every detail in my system.

MTRRs? That usually has nothing to do with GL-support, more with the general performance ...
@VoidMage: Maybe you can answer me that question: arent page attribute tables (X86 PATs) in more common use today? If my memory serves right, they are MTRRs successors and should be widely supported?
So, the intel part should be built into the kernel rather than be there as a module. I think that is ok, but I am not sure about it.
Should be. You can check out with sudo lspci -k | grep i915 -n2. If you got some output, it should be functional.
I agree, it looks small, but that's all I could find with emerge --search.
Nah, VoidMage is right again. :p I am german and read it as 66 KB, not as 66xxx KB => 66 MB. Stupid me.
So, the nvidia driver WAS installed - supposedly with it's own nVidia OpenGL module.

Wait, what? There is something wrong. When you emerge nvidia drivers, it installs the Gl library and then creates a symlink to the default Gl library, so you can switch between them via eselect.

What does

Code: Select all

eselect opengl list
Show? There should be two entries, one with "xorg-11" or something like that, and one with "nvidia".
If not, I think [somehow] the standard GL lib was overwriting by the nVidia installer, and now your Xorg tries to load in a GL lib for a intel driver with requires the Mesa GL lib (not the nVidia GL lib) to work properly.

In this case, I know of no other way but to disable the nvidia card and reemerge Xorg. Then you should have GL support from Mesa. Your nvidia driver installation will not like it, though.
And then we'll need to find out why it was overwritten - I mean, eselect was made for exact that purpose. I can hardly believe it, but it's my best guess so far. The upsteam nvidia driver from nvidia.com ignores eselect, of course. :) But since you reinstalled your system from scratch, you wouldn't use that driver, but the Gentoo package, and then something was screwed up by eselect.

Please note that I am no expert on that topic, and I never claimed to be. It's just that I had massive problems myself getting my system to run, and I am now trying to use the same methods that I used back then to somehow make it work - and maybe learn something from it. :p

Code: Select all

Ok, I adjusted my xorg.conf for the nvidia part. I am a bit confused with this as it was mentioned to focus on the intel first. So, I thought that the nvidia driver should not yet matter. Do I need the nvidia driver to run opengl on the intel chip?
Well, I thought it was about getting your Intel driver running with GL support as well, since your optimus ran with it as well. But as far as I remember, optimus uses it's own GL lib? Your server glx vendor string in your OP was "VirtualGL", after all. Not Mesa, not nVidia. :)

Truth be told, I expected that before running optimus you tried out to install the nvidia upstream driver ... the thing is that in this case you'd only need the nvidia kernel module, not the GL libs (and other user space libs aka "all the other stuff"). While I am not even sure right now whether optirun automatically loads and unloads it's own kernel module ... It's been nearly half a year since I tried out. But if it relies on you having your kernel packed with nvidia.ko, then installing the driver made sense ... overwriting "all the other stuff" wouldn't. Simply because your Intel driver needs it for OpenGL.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Thu Jun 26, 2014 5:55 pm

Thank for the help. I tried all suggestions. There is no change. I can not get opengl for intel. I am growing tired of this problem. I probably will go to my initial solution, install bumblebee and bbswitch. Then at least I have opengl for the nvidia chip. Either way I can not get any desktop effects working.

Code: Select all

# glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

Segmentation fault
I have amd64. Could it be that this is causing a segmentation fault? I have not specified any particular version for the drivers. Maybe x86 is required and I need to set it explicitly?

@dachschaden
you have been asking about eselect opengl

Code: Select all

eselect opengl list
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11
This is my current xorg.conf

Code: Select all

Section "ServerLayout"
  Identifier "Layout0"
  Screen 0 "Screen0" 0 0
  Screen 1 "Screen1" 0 0
EndSection

#Section "ServerFlags"
#  Option "AutoAddDevices" "false"
#EndSection

#Section "DRI"
#  Group 0
#  Mode 0666
#EndSection

Section "Extensions"
  Option "Composite" "Enabled"
EndSection

Section "Module"
  Load "glx"
  Load "extmod"
  Load "dri"
#  Load "glamoregl"
EndSection

Section "Device"
  Identifier "Card0"
  Driver "modesetting"
  BusID "PCI:0:2:0"
#  Option "AccelMethod" "glamour"
EndSection

Section "Device"
  Identifier "Card1"
  Driver "nvidia"
  BusID "PCI:1:0:0"
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "Card0"
  Option "UseDisplayDevice" "none"
EndSection

Section "Screen"
  Identifier "Screen1"
  Device "Card1"
  Option "UseDisplayDevice" "none"
EndSection
Well, I thought it was about getting your Intel driver running with GL support as well, since your optimus ran with it as well.
Yes. At least that is the apparent problem. I don't care how but what I would like to see is a working system. I should be able to run desktop effects and use the nvidia chip for the heavier lifting. Right now no matter what, I can not get the intel chip to use opengl. With bumblebee I have at least the nvidia chip working even though it's performance could be better. But I don't care too much about performance I want usability.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Thu Jun 26, 2014 9:20 pm

I done some more reading but I am not sure whether I get the point right. Could it be that nvidia loads it's own opengl libraries where as the intel chip would need different ones. So the intel chip can not find/load the library needed. If that would be the case, can I install the proper library for the intel chip? And how would I let the intel chip know where to load them?
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Thu Jun 26, 2014 10:04 pm

Given our lack of success, it seems it's time to go back to the upstream guide you've already mentioned (well, it's more up to date version) and give it another try.

Note the recommended option for nvidia driver has changed.
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Fri Jun 27, 2014 8:55 am

motaito wrote:I done some more reading but I am not sure whether I get the point right. Could it be that nvidia loads it's own opengl libraries where as the intel chip would need different ones. So the intel chip can not find/load the library needed. If that would be the case, can I install the proper library for the intel chip? And how would I let the intel chip know where to load them?
Dude ... I have been telling you this for ages:
BTW, the nvidia driver comes with it's own OpenGL libs. The intel driver uses the GL libraries from the Mesa project, the nvidia driver uses the proprietary ones.
This error message usually indicates some problem with the nvidia driver - which brings me to the question why you are loading nvidia driver parts when you are first trying to get your intel chip running with Mesa GL.
Yet I agree that this was once a tripping stone for me on Arch Linux, because I couldn't install both GL packages (Mesa and nVidia) at the same time. That was around the time when I learned to do it manually - and I never really got into the eselect stuff as well.
So let me get this straight: The intel driver only works with Mesa OpenGL, the nvidia chip only with nVidia OpenGL.
I have poked into the topic on my own last night, because I just wanted to be sure. And I need to make some corrections:

1. When I wrote Option "AutoAddDevices", I meant "AutoAddGPU". Again, I am sorry for this.
2. However we can safely ignore this because the problem became apparent ... it's not the additional driver (OK, strictly spoken it is), but the OpenGL lib the drivers try to load in.

I told you that I couldn't use the nVidia for my card? Well, I tried out the latest driver last night, and ran into the same problems that you went through. It's actually the same error message, and glamore wouldn't work as well (since it depends on OpenGL, but I guess you all figured out that part long before I did).
This is a bit experimental - not in a sense of "it might break your system", but more like "it's not documented and advised and I might be wrong, but's the best guess I currently have and I am going to pursue it".

/usr/lib/xorg/modules/extensions/libglx.so seems to be the troublemaker. On this ubuntu box, which is running a nVidia chip, it points to libglx.so.304.88 (it's a very old machine). :)
The same thing for my gentoo box after I installed the upstream driver.

Then I run the install script again with --uninstall. It set back the system to its original state, including restoration of my Mesa GL libs. After restarting xdm, I have Mesa GL for my X again, and thus also glamore.

So, you said you want to use bumblebee ... are you reading my posts?
Bumblebee gets shipped with it's own OpenGL implementation. Bumblebee is smart enough NOT to use /usr/lib/xorg/modules/extensions/libglx.so, but it's own OpenGL lib, so it wouldn't face that regression. So bumblebee will have OpenGL support without having to care whether the Intel/nVidia driver comes with their own implementation.

"But how come that I wouldn't have OpenGL support at the very beginning?"
That's a good question, and the answer is probably that you:

- first installed the nVidia driver - and thus, their OpenGL lib.
- it broke/overwrite the Mesa GL lib.
- no more glamore for you.
- but since your machine is muxless, your rendering device is the intel chip, and it would need the Mesa Lib.
- So glxinfo/glxgears on normal console will not work.
- then you installed bumblebee.
- gets shipped with own GL lib.
- doesn't affect the nVidia GL lib.
- bumblebee runs glxinfo/glxgears just fine.

Do you see now?
If that would be the case, can I install the proper library for the intel chip? And how would I let the intel chip know where to load them?
As far as I can tell, Xorg tries to load the GL lib from /usr/lib/xorg/modules/extensions/libglx.so. I have yet to find a way to specify which GL lib to load for which driver. I am afraid that won't be possible, and I will have to resort to some weird half-bumblebee-configuration using two XServers.
Since you used the gentoo driver, a simple

Code: Select all

eselect opengl set 2
and a reboot/restart of the login manager should be sufficient to get Mesa back working.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 2:26 pm

@VoidMage
I'll give it another go when I am back from work. I will let you know how it works.

@dachschaden
Dude ... I have been telling you this for ages:
You are right. Sorry about that. My text was written very badly, late at night and in frustration. Please note that english is not my native language and that I am slightly dyslexic. I completely messed that text up. Normaly my posts are longer for that very reason. I try to make sure my point gets across the way it is meant. Well, that doesn't always work as intended :) Here is what it should have been.

In the gentoo wikis it is mentioned that gentoo can have different versions of the same package installed next to one another, so that different applications can use the library they need. See here http://wiki.gentoo.org/wiki/Sub-slots_a ... -Operators
...Sub-slots allow a package to trigger slot-operator rebuilds without needing to explicitly re-SLOT (and therefore allow concurrent installation of) different versions...
By that logic, if the intel chip needs it's own library and the nvidia chip needs another library, should it then not be possible to install both of them and have each load it's own corresponding library?
later in your last post you already give the answer to that
I have yet to find a way to specify which GL lib to load for which driver.
1. When I wrote Option "AutoAddDevices", I meant "AutoAddGPU". Again, I am sorry for this.
No problem. As you see, I am troubled to write the correct stuff myselfe. Therefore, I have no issue with such typos.
So, you said you want to use bumblebee ... are you reading my posts?
I guess we have a confusion here. I was using bumblebee at first and the desktop effects did not work nor did glxinfo for the intel chip. It was suggested to focus on making the intel driver work. That's what I have been trying to do ever since in complete disregard of wheter nvidia works or not. Also in disregard on how the nvidia chip would be used (bumblebee or not). In my last post I pointed out that I might again install bumblebee so that I get at least the nvidia chip running and just have a system without opengl on the intel chip. Ultimately the goal would be to have opengl on both intel and nvidia. But so far I could not achieve this.
"But how come that I wouldn't have OpenGL support at the very beginning?"
That's a good question, and the answer is probably that you:

- first installed the nVidia driver - and thus, their OpenGL lib.
- it broke/overwrite the Mesa GL lib.
- no more glamore for you.
- but since your machine is muxless, your rendering device is the intel chip, and it would need the Mesa Lib.
- So glxinfo/glxgears on normal console will not work.
- then you installed bumblebee.
- gets shipped with own GL lib.
- doesn't affect the nVidia GL lib.
- bumblebee runs glxinfo/glxgears just fine.

Do you see now?
That makes sense. I have in /etc/portage/make.conf VIDEO_CARDS="nvidia intel i915". As it is mentioned in the xorg install wiki to specify the driver. That will pull in the nvidia driver and thus I had broken Mesa GL lib from the very beginning. As I have an nvidia card I also followed the gentoo nvidia wiki where it is mentioned to "eselect opengl set nvidia". It never occured to me that "eselect opengl set x11-xorg" would be ok when using bumblebee. My brain got stuck with "I have a nvidia card so I have to eselect nvidia". This might lead to a setup that is sufficinet for me. I will try it as soon as I am back at my gentoo-box.

But that makes me wonder why this works for the guy here https://forums.gentoo.org/viewtopic-t-9 ... timus.html Following this guide, he also eselects the nvidia driver. Technically that should then make his system incapable of using opengl on the intel chip... or something is wrong with this reasoning.

Thanks for the additional input. I will let you know how it works as soon as I get to try it out.
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Fri Jun 27, 2014 2:57 pm

motaito wrote: You are right. Sorry about that. My text was written very badly, late at night and in frustration. Please note that english is not my native language and that I am slightly dyslexic. I completely messed that text up. Normaly my posts are longer for that very reason. I try to make sure my point gets across the way it is meant. Well, that doesn't always work as intended :) Here is what it should have been.
English's not my native language as well. I guess there are just few people here who can claim this for themselves.
motaito wrote:By that logic, if the intel chip needs it's own library and the nvidia chip needs another library, should it then not be possible to install both of them and have each load it's own corresponding library?
Well, you can install them, can't you? :) And they are managed by eselect.
motaito wrote:I guess we have a confusion here. I was using bumblebee at first and the desktop effects did not work nor did glxinfo for the intel chip. It was suggested to focus on making the intel driver work.
Well, the driver itself worked, just without OpenGL support. And I guess I wrote that from the very beginning. :)
motaito wrote:That's what I have been trying to do ever since in complete disregard of wheter nvidia works or not.
Then why did you include "nvidia" in VIDEO_CARDS? The only reason for that would be if you completely ignored what I said about Mesa and Intel. ;)
motaito wrote:In my last post I pointed out that I might again install bumblebee so that I get at least the nvidia chip running and just have a system without opengl on the intel chip.
Which is not necessary, because, as I already stated, bumblebee is independent from your other Xorg stuff (sort of). That's why I said: first just care about the Intel driver. After we got Glamore working, we (and I mean "we", because I am trying to get the same stuff done here on my box) can resort on trying to get bumblebee - or the nvidia driver - working.
Also there is not much good documentation on that topic online, so this thread might help future beginners for their problems.
motaito wrote:Ultimately the goal would be to have opengl on both intel and nvidia. But so far I could not achieve this.
As well as I. But I am working on it.
motaito wrote:That makes sense. I have in /etc/portage/make.conf VIDEO_CARDS="nvidia intel i915". As it is mentioned in the xorg install wiki to specify the driver. That will pull in the nvidia driver and thus I had broken Mesa GL lib from the very beginning.
Bingo.
motaito wrote:As I have an nvidia card I also followed the gentoo nvidia wiki where it is mentioned to "eselect opengl set nvidia". It never occured to me that "eselect opengl set x11-xorg" would be ok when using bumblebee. My brain got stuck with "I have a nvidia card so I have to eselect nvidia". This might lead to a setup that is sufficinet for me. I will try it as soon as I am back at my gentoo-box.
OK.
motaito wrote:But that makes me wonder why this works for the guy here https://forums.gentoo.org/viewtopic-t-9 ... timus.html Following this guide, he also eselects the nvidia driver. Technically that should then make his system incapable of using opengl on the intel chip... or something is wrong with this reasoning.
Got no time to read the thread right now. I will do so in about four hours, you will see the answer as an EDIT.

EDIT:

Hm. Hmmm. I don't know if I did something wrong, but this method does not work for me. I am pretty sure I followed the instructions close enough that it should work ...
But my screen stays black with the given config. Everything else is fine, the nVidia GL gets loaded, the modesetting driver for PCI 0:2:0 was loaded, the nivida card was activated, xinitrc contains the provider setting stuff ... so my best guess is that this guide is for laptops with muxers - it's the same symptom when I just try to use the nvidia card.

Please try it out at your box as well (after testing the Mesa GL functionality).
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 7:28 pm

@VoidMage
I tried again. But I didn't get further. There is something I am not sure about.

- I have xorg-server 1.15 installed but I do not have xorg-x11 installed. That should be ok, right?

- Linux kernel has DRM enabled.

- I am not sure about the driver interfaces. How can I verify this?

- I have xrandr 1.4.1 installed and also libXrandr 1.4.2. I think that should be ok. However, with eselect opengl set nvidia, it does not find any display (I do find the displays with eselect opengl xorg-x11). From http://wiki.gentoo.org/wiki/Xrandr
xrandr uses the monitors EDID to identify its capabilities. Some graphic drivers like the binary Nvidia or AMD, do not support xrandr. Also faulty hardware might report wrong or bad EDIDs, in those cases it is still possible to use custom made setups by trial and error.
I guess that is still ok but then the second part of chapter 33

Code: Select all

$ xrandr --setprovideroutputsource modesetting NVIDIA-0
$ xrandr --auto
can not be executed.

With the provided xorg-config I get a black screen. I narrowed it down to the nvidia device section. As soon as nvidia is the driver that gets loaded first, I can not start x. Right now my best guess is that a driver interface is missing but like mentioned above, how can I verify this?


@dachschaden
Well, you can install them, can't you? :) And they are managed by eselect.
I am not really familiar with eselect. But eselect opengl ... is either nvidia or xorg. I meant maybe it is possible to explicitly select one lib for intel and in addition the other one for nvidia. Like setting a module path by hand. Maybe that would not be a good idea for future updates if it is at all possible.
Well, the driver itself worked, just without OpenGL support.
The intel chip has HD graphics. By working my mind included that as well and since it did not give me opengl the log may show the driver as loaded but I interpreted it as not fully functional :) My bad.
Then why did you include "nvidia" in VIDEO_CARDS? The only reason for that would be if you completely ignored what I said about Mesa and Intel. ;)
Because I followed the wikis to closely :) Right now I have it still in there because I also wanted to try to get it working with modesetting. So, intel should be functional even if nvidia is in the mix. I just did not care about the nvidia part actually working while focusing on intel.
Please try it out at your box as well (after testing the Mesa GL functionality).
I did already try the guide with no success. I also had the black screen with the provided config. I think it's related to the part I wrote above to VoidMage (please refer to it as well).

After eselect opengl set xorg-x11 I get the following.

Code: Select all

$ glxgears
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
7597 frames in 5.0 seconds = 1519.330 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 31024 requests (31022 known processed) with 0 events remaining.
It works but with some errors. At this point I have not installed bumblebee and bbswitch. So it runs with software rendering. (Desktop effects are not working with this)

Code: Select all

# glxinfo
name of display: :0
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
...

Code: Select all

# grep EE /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2705.500] Initializing built-in extension MIT-SCREEN-SAVER
[  2705.572] (EE) AIGLX error: dlopen of /usr/lib64/dri/i965_dri.so failed (/usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or directory)
[  2705.572] (EE) AIGLX: reverting to software rendering
I don't know why it wants to load i965, I have i915... I could add i965 to the list.
Btw. I concluded that I have i915 because I used http://kmuto.jp/debian/hcl/ to find the kernel settings that I need and it shows me i915.
From /usr/src/linux/drivers/gpu/drm/Kconfig

Code: Select all

config DRM_I915
	tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics"
	depends on DRM
	depends on AGP
	depends on AGP_INTEL
	# we need shmfs for the swappable backing store, and in particular
	# the shmem_readpage() which depends upon tmpfs
	select SHMEM
	select TMPFS
	select DRM_KMS_HELPER
	select FB_CFB_FILLRECT
	select FB_CFB_COPYAREA
	select FB_CFB_IMAGEBLIT
	# i915 depends on ACPI_VIDEO when ACPI is enabled
	# but for select to work, need to select ACPI_VIDEO's dependencies, ick
	select BACKLIGHT_LCD_SUPPORT if ACPI
	select BACKLIGHT_CLASS_DEVICE if ACPI
	select VIDEO_OUTPUT_CONTROL if ACPI
	select INPUT if ACPI
	select THERMAL if ACPI
	select ACPI_VIDEO if ACPI
	select ACPI_BUTTON if ACPI
	help
	  Choose this option if you have a system that has "Intel Graphics
	  Media Accelerator" or "HD Graphics" integrated graphics,
	  including 830M, 845G, 852GM, 855GM, 865G, 915G, 945G, 965G,
	  G35, G41, G43, G45 chipsets and Celeron, Pentium, Core i3,
	  Core i5, Core i7 as well as Atom CPUs with integrated graphics.
	  If M is selected, the module will be called i915.  AGP support
	  is required for this driver to work. This driver is used by
	  the Intel driver in X.org 6.8 and XFree86 4.4 and above. It
	  replaces the older i830 module that supported a subset of the
	  hardware in older X.org releases.

	  Note that the older i810/i815 chipsets require the use of the
	  i810 driver instead, and the Atom z5xx series has an entirely
	  different implementation.

config DRM_I915_KMS
	bool "Enable modesetting on intel by default"
	depends on DRM_I915
	help
	  Choose this option if you want kernel modesetting enabled by default,
	  and you have a new enough userspace to support this. Running old
	  userspaces with this enabled will cause pain.  Note that this causes
	  the driver to bind to PCI devices, which precludes loading things
	  like intelfb.
If M is selected, the module will be called i915.
I have DRM_I915 and DRM_I915_KMS built into the kernel (*) because that is how it was described in the wikis. Should I load them as a module (M) instead?

In order to avoid further confusion. Right now I have
eselect opengl set xorg-x11
VIDEO_CARDS="nvidia intel i915"
Should I adjust my video settings (remove nvidia and add i965) and rebuild the kernel?
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Fri Jun 27, 2014 8:00 pm

motaito wrote:@VoidMage
I tried again. But I didn't get further. There is something I am not sure about.

- I have xorg-server 1.15 installed but I do not have xorg-x11 installed. That should be ok, right?

- Linux kernel has DRM enabled.
Should be OK. xorg-x11 is missing on my box as well.
motaito wrote: - I am not sure about the driver interfaces. How can I verify this?
You mean gem_prime_vmap and alike?

Code: Select all

fgrep gem_prime_vmap /boot/System.map-$(uname -r)
motaito wrote: - I have xrandr 1.4.1 installed and also libXrandr 1.4.2. I think that should be ok. However, with eselect opengl set nvidia, it does not find any display. From http://wiki.gentoo.org/wiki/Xrandr
Ditto.
xrandr uses the monitors EDID to identify its capabilities. Some graphic drivers like the binary Nvidia or AMD, do not support xrandr. Also faulty hardware might report wrong or bad EDIDs, in those cases it is still possible to use custom made setups by trial and error.
Nah, that's something different. I already included my EDID for the driver, BTW:

Code: Select all

       Option          "ConnectedMonitor" "eDP-1"
       Option          "CustomEDID"    "eDP-1:/lib/firmware/edp1.edid"
       Option          "IgnoreEDID"    "false"
       Option          "UseEDID"       "true"
Didn't help.
motaito wrote: With the provided xorg-config I get a black screen. I narrowed it down to the nvidia device section. As soon as nvidia is the driver that gets loaded first, I can not start x. Right now my best guess is that a driver interface is missing but like mentioned above, how can I verify this?
Define "driver interface". Missing kernel driver? lsmod | grep nvidia. If you got something, the kernel modules are loaded in.
Missing userspace driver? fgrep -i nvidia /var/log/Xorg.0.log.

And I don't think so - see above.

Will you now FINALLY eselect xorg-x11?
motaito wrote:I meant maybe it is possible to explicitly select one lib for intel and in addition the other one for nvidia. Like setting a module path by hand. Maybe that would not be a good idea for future updates if it is at all possible.
But until that day, please use eselect.
motaito wrote: I did already try the guide with no success. I also had the black screen with the provided config. I think it's related to the part I wrote above to VoidMage (please refer to it as well).
Nah, I don't think so.
I have no errors in kern.log, all modules are there. No errors in Xorg.0.log excpet that it cannot connect to the display (oh wonder). Xorg start up just fine - I'd get error messages if a single symbol in the kernel was missing.
motaito wrote:

Code: Select all

$ glxgears
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
7597 frames in 5.0 seconds = 1519.330 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 31024 requests (31022 known processed) with 0 events remaining.
Ah, that's good.

Code: Select all

VIDEO_CARDS="intel i965"
Make sure that VIDEO_CARDS is set like that, then reemerge Xorg.
Seems like you got a newer card (as I do), and these run with i915, but best with i965. In my guess you are halfway done btw.
motaito wrote:

Code: Select all

# glxinfo
name of display: :0
libGL error: failed to load driver: i965
libGL error: Try again with LIBGL_DEBUG=verbose for more details.
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
...
"server glx vendor string: SGI" means that it uses the Mesa Lib, so don't worry.
motaito wrote: Btw. I concluded that I have i915 because I used http://kmuto.jp/debian/hcl/ to find the kernel settings that I need and it shows me i915.
i915 is the kernel space driver. i965 is a driver for Xorg.
motaito wrote: I have DRM_I915 and DRM_I915_KMS built into the kernel (*) because that is how it was described in the wikis. Should I load them as a module (M) instead?

Code: Select all

# fgrep 'DRM' /boot/config-3.15.0-valhalla
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y
CONFIG_DRM_I915_FBDEV=y
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
# CONFIG_DRM_I915_UMS is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
# CONFIG_DRM_PTN3460 is not set
That's my conf. So don't worry, keep calm, stick with i915, and just do what I wrote earlier.
Don't recompile the kernel yet, as far as I can tell it's fine.
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Fri Jun 27, 2014 8:38 pm

libdrm has only 'intel' in VIDEO_CARDS, the more fine grade control is meant for mesa, therefore if your intel is actually i965, you should put that instead of i915 into VIDEO_CARDS (but keep intel) and reemerge mesa.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 9:17 pm

@dachschaden
You mean gem_prime_vmap and alike?
Yes, I meant those.

Code: Select all

# fgrep drm_gem_prime_export /boot/System.map-$(uname -r)
ffffffff813c27f0 T drm_gem_prime_export
ffffffff81c71390 r __ksymtab_drm_gem_prime_export
ffffffff81c9b92a r __kstrtab_drm_gem_prime_export

# fgrep drm_gem_prime_import /boot/System.map-$(uname -r)
ffffffff813c3020 T drm_gem_prime_import
ffffffff81c713c0 r __ksymtab_drm_gem_prime_import
ffffffff81c9b8fa r __kstrtab_drm_gem_prime_import

# fgrep gem_prime_pin /boot/System.map-$(uname -r)
# 
# fgrep gem_prime_get_sg_table /boot/System.map-$(uname -r)
# 
# fgrep gem_prime_import_sg_table /boot/System.map-$(uname -r)
# 
# fgrep gem_prime_vmap /boot/System.map-$(uname -r)
# 
# fgrep gem_prime_vunmap /boot/System.map-$(uname -r)
# 
I got some missing. Only the first two give me a result.

emerge --search prime did not show anything that seamed relevant. Do you know what I need to install to get those? Or is it a kernel setting?
Define "driver interface". Missing kernel driver? lsmod | grep nvidia. If you got something, the kernel modules are loaded in.
Missing userspace driver? fgrep -i nvidia /var/log/Xorg.0.log.
I meant if any of the "gem_prime_vmap and alike" are missing that the nvidia driver prevented to start x because an interface was not found.
Will you now FINALLY eselect xorg-x11?
I think you wrote that before reading to the end of my post :)
After eselect opengl set xorg-x11 I get the following.
(... followed by every code snippet)
My config looks a little different.

Code: Select all

# fgrep 'DRM' /boot/config-3.12.21-gentoo-r1 
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I810 is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_KMS=y
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
I would like to make sure we are on the same page. I will
- set VIDEO_CARDS="intel i965"
- unmerge xorg
- emerge xorg again
- unmerge mesa (according to input from VoidMage)
- emerge mesa (according to input from VoidMage)
- use emerge -avuND @world
- use emerge @module-rebuild
(but not recompile the kernel)

eselect opengl set xorg-x11 is already done. But I will make sure it did not change after reemerging.

Do I have to reemerge KDE after doing that?


@VoidMage
I added it in the list (see my reply to dachschaden)
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Fri Jun 27, 2014 9:30 pm

motaito wrote:I got some missing. Only the first two give me a result.
I as well.
motaito wrote:emerge --search prime did not show anything that seamed relevant. Do you know what I need to install to get those? Or is it a kernel setting?
Those are kernel symbols.
I took a quick look, these symbols seem to be in connection just with free drivers (like nouveau or radeon). I might be mistaken here though.

CONFIG_DRM_LOAD_EDID_FIRMWARE is a setting that allows me to specify a specific EDID file. I did that to shave off some boot time, because otherwise the kernel probes the display for it's firmware.
The other stuff is for having a VT in native resolution at boot time.
motait wrote: I would like to make sure we are on the same page. I will
- set VIDEO_CARDS="intel i965"
- emerge xorg again
emerge xorg would be enough, I guess.
motait wrote: - unmerge mesa (according to input from VoidMage)
- emerge mesa (according to input from VoidMage)
Can't hurt, but if I remember correctly, that didn't help me back then.
motait wrote: Do I have to reemerge KDE after doing that?
Most probably not.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 10:28 pm

I followed the procedure mentioned.

Code: Select all

# startx

no screens found

#grep EE /var/log/Xorg.0.log
  (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 718.353] Initializing built-in extension MIT-SCREEN_SAVER
[ 718.361] (EE) Failed to load module "glamoregl" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "intel" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "nouveau" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "nv" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "modesetting" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "fbdev" (module noes not exist, 0)
[ 718.363] (EE) Failed to load module "vesa" (module noes not exist, 0)
[ 718.363] (EE) No drivers available.
[ 718.363] (EE) 
[ 718.365] (EE) no screens found(EE)
[ 718.365] (EE) 
[ 718.368] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 718.369] (EE) 
I think i965 is wrong after all and it should be i915. Not sure though. I am currently trying different xorg.conf settings but I always get the same result with or without an xorg.conf.
eselect opengl xorg-x11 is set and xf86-video-intel is installed. xf86-video-vesa is not installed but if it were working I would probabely not need it anyway, right?
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Fri Jun 27, 2014 10:49 pm

If glxgears said 'i965' then it most likely knows the best.
Check 'lspci -k' - the kernel driver will probably be i915, according to the above, but the cad itself will likely be more recent.

Also, what's with all those missing driver modules ? Did you do something with xorg/modules/drivers/ dir ?

Also, given that upstream guide you might want to add modesetting to VIDEO_CARDS, just to pull xf86-video-modesetting for later tests.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 11:14 pm

I followed the procedure mentioned. I wrote it in the post to make sure you guys can follow. I did not recompile the kernel. 'lspci -k' shows i915 as you said.

No, I did not touch any directories. I don't know why the modules are missing.

xf86-video-modesetting is still present. Should I have cleaned the system at some point before re-emerging xorg or mesa?
Top
dachschaden
n00b
n00b
Posts: 65
Joined: Sat Jun 07, 2014 1:19 pm
Location: Germany

  • Quote

Post by dachschaden » Fri Jun 27, 2014 11:18 pm

Is x11-drivers/xf86-video-intel still installed?
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Fri Jun 27, 2014 11:31 pm

Yes.

These are still installed:
- x11-drivers/xf86-video-intel
- x11-drivers/xf86-video-modesetting
- x11-drivers/nvidia-drivers

These are not installed:
- x11-drivers/xf86-video-nouveau
- x11-drivers/xf86-video-fbdev
- x11-drivers/xf86-video-vesa
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Sat Jun 28, 2014 12:13 pm

A part in the post I mentioned earlier (https://forums.gentoo.org/viewtopic-t-9 ... timus.html) gave me the idea that rebuilding the drivers might be the problem.

Code: Select all

emerge -1 $(qlist -IC x11-drivers)
Fixed the issue. I now can start x again. Right now I even have desktop effects in KDE. Here is some more output.

Code: Select all

# glxinfo
name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
... 

Code: Select all

# glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
299 frames in 5.0 seconds = 59.784 FPS
300 frames in 5.0 seconds = 59.966 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 2688 requests (2688 known processed) with 0 events remaining.
Significantly less FPS. But it looks like that's because now v-sync is enabled. I have to read up on glxgears on how to disable that.

Code: Select all

# grep EE /var/log/Xorg.0.log
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   387.407] Initializing built-in extension MIT-SCREEN-SAVER
[   387.407] (EE) Failed to load module "glamoregl" (module does not exist, 0)
[   387.408] (EE) Failed to load module "nouveau" (module does not exist, 0)
[   387.408] (EE) Failed to load module "nv" (module does not exist, 0)
[   387.409] (EE) Failed to load module "fbdev" (module does not exist, 0)
[   387.409] (EE) Failed to load module "vesa" (module does not exist, 0)
Still some errors in xorg log. I don't think these are relevant. Except maybe glamoregl.
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Sat Jun 28, 2014 1:26 pm

glxgears shouldn't be considered a benchmark, just a proof opengl works.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Sat Jun 28, 2014 1:48 pm

Yes I know but it can give a sense of direction about how your system is set up. If you compare glxgears results from your system on intel vs nvidia card and you get the same result, you will know that your setup could be better or that you might not actually be using your nvidia card at all. I would expect about 600-800 FPS for my intel chip.

Code: Select all

# vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
31535 frames in 5.0 seconds = 6306.975 FPS
34229 frames in 5.0 seconds = 6845.617 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 183359 requests (183359 known processed) with 0 events remaining.
That's quite a bit above my expectations. So far I am happy :) Actually, I would have expected these results from my nvidia chip. But I don't think that I am using it as I have adjusted the VIDEO_CARDS="intel i965" and I am not using bumblebee and bbswitch. I also have no xorg.conf at the moment. So I don't think modesetting is running it on the nvidia chip.
Top
motaito
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Wed May 28, 2014 10:28 pm

  • Quote

Post by motaito » Sun Jun 29, 2014 2:51 pm

Upon further fiddling with it. I have reached the conclusion that this isn't going to work for now. Modesetting just doesn't work. It either has a segmentation fault or the xorg.conf leads to a black screen. Your only chance is to use bumblebee. If you are planing to do so, make sure your system is set up to use intel only. VIDEO_CARDS="intel i965" and eselect opengl set xorg-x11. As some resources might suggest i915 instead it can be confusing. The kernel driver will also show i915. But if your chip is newer you must use i965 instead or it will not run properly. This confusion was a stepping stone for me to get intel to work properly. So I'm pointing it out in case someone else has that issue. Also, the intel chip is likely to perform better than bumblebee which is not exactly cool but that's just how it is for now. So, the nvidia gpu is mostly just hanging around. What a shame... Bumblebee might still be useful if you are playing games for example. It might have more memory and bandwidth than the intel chip. So, it could be slower while rendering, but give a better experience over all in some applications. This is however just a guess. I haven't tried that yet.

I am going to change the subject to include [CONCLUDED] as I have solved the problem of opengl not working on intel. But I don't change it to [SOLVED] as modesetting just does not work. I hope that makes the most sense to end this thread.

Anyway, I big thank you to everybody helping me to get intel to work right and for your patience end effort!

Edit:
I had to slightly adjust the subject line as it got to long.
changed from
OpenGL not working for intel chip on optimus system
to
OpenGL not working for intel on optimus system [CONCLUDED]
Top
schrdlu
n00b
n00b
Posts: 61
Joined: Sun Nov 01, 2009 5:09 am
Location: Adelaide Sth Australia

  • Quote

Post by schrdlu » Wed Jul 09, 2014 2:10 pm

I notice that you make no mention of using the hybrid graphics section in the kernel. If not then give it a try.
I had a benq laptop that would only load the xorg drivers if this was selected .
Top
Post Reply

51 posts
  • Previous
  • 1
  • 2
  • 3
  • Next

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic