FreeBSD/X.org in an Optimus enabled laptop

Greetings,

I just got my new laptop (Sager NP5135) and it has the i7 640M with Intel GMA HD iGPU and an Nvidia GT425M Optimus card. I know that I cannot use this card in FreeBSD, but I thought that I could just use the onboard Intel graphics with either their driver or Vesa.

I installed FreeBSD 8.1 Release x64 a few days ago and updated the ports tree and installed X. Or at least tried. I got a few error messages so I updated the pkgdb and installed it successfully with pkg_add. When I tried to configure or startx, I get errors talking about multiple primary devices found and fatal errors, etc.

The /var/log/Xorg.0.log, /root/xorg.conf.new are attached. Please help. I had initially tried PCBSD but it complained of Xorg issues after I installed and could not get anywhere, so I went with FreeBSD knowing the forums could help me figure it out.

I have also updated /etc/rc.conf with hald and dbus.

http://pastebin.com/embed_js.php?i=GLQbS1Pi
http://pastebin.com/embed_js.php?i=nduMKmii

Just to clarify, this is a laptop, with one screen. Not using the HDMI out to have a second screen. I saw something in a linux forum about deleting the nVidia driver to allow the intel or vesa driver to take over.

Also, when I try X -configure I get a list of video drivers including: radeon, radeonhd, r128, openchrome, nv, mach64, inntel, ati, fbev, and vesa. It tries to use my /root/xorg.conf.new settings and fails with a
Code:
Number of created screens does not match number of detected devices
error.

Thanks for the help and I apologize if my formatting sucks, but I just copied 400 lines of code and do not have the energy to format this too.
 
Anything beats retyping all those lines. I did that and tried startx and it gave the same error log. Still no devices detected and no screens found and two potential primary devices. Would deleting the nVidia drivers from my system help? Or how can I prevent the "nv" module from loading?

How do I designate the Intel device as the primary. Do I need to cp /root/xorg.conf.new /etc/x11/xorg.conf for the Xserver to find the files?
 
If you edited the /root/xorg.conf.new, that will only be used if you specify it. The real xorg.conf has to be in /etc/X11/ or /usr/local/etc/X11/.

If that was the file you edited, please post a link to the latest version of /var/log/Xorg.0.log.
 
Wow, that is bizarre. Ok, stupid question. How do I cut and paste my new /var/log/Xorg.0.log into the pastebin site?
 
CalBear96 said:
Wow, that is bizarre. Ok, stupid question. How do I cut and paste my new /var/log/Xorg.0.log into the pastebin site?

With lynx, looks like you go to http://pastebin.com, move to the text area after "Post a new Pastebin", then type ctrl-x i, enter the filename, fill in any of the other fields, move to Submit and press enter. (Untested.)
 
Wow, I am slow tonight. Finally got that all squared away. Here is the link. By the way, using the site in lynx is the way to go. I spent way too long trying to use the pastebinit -i [FILE]var/log/Xorg.0.log[/FILE] only to have the output not reflect a unique URL. Surely user error, but want to give a heads up.

http://pastebin.com/mENpnuaN

And my apologies to DutchDaemon for my breach of etiquette. I reread the sticky and re-familiarized myself with how to format.
 
Code:
Section "Screen"
	[B]Indentifier	"Screen1"[/B]
	Device		"Card0"
	Monitor		"Monitor0"
End Section

Section "Screen"
	Identifier	"Screen1"
	Device		"Card1"
	Monitor		"Monitor1"
EndSection
This is correct?
 
Now it's loading the nv driver. Of course nineteen trillion drivers are installed, because they're part of the package, because packages have everything.

# pkg_delete -f xf86-video-nv\*
 
JokerBoy said:
Code:
Section "Screen"
	[B]Indentifier	"Screen1"[/B]
	Device		"Card0"
	Monitor		"Monitor0"
End Section

Section "Screen"
	Identifier	"Screen1"
	Device		"Card1"
	Monitor		"Monitor1"
EndSection
This is correct?

Actually no. It is Screen0
 
Don't run -configure any more, it is not helping. Here is my suggestion for xorg.conf:
Code:
Section "ServerLayout"
	Identifier     "Not X.org Configured"
	Screen      0  "Screen0" 0 0
EndSection

Section "Files"
	ModulePath   "/usr/local/lib/xorg/modules"
	FontPath     "/usr/local/lib/X11/fonts/misc/"
	FontPath     "/usr/local/lib/X11/fonts/TTF/"
	FontPath     "/usr/local/lib/X11/fonts/OTF"
	FontPath     "/usr/local/lib/X11/fonts/Type1/"
	FontPath     "/usr/local/lib/X11/fonts/100dpi/"
	FontPath     "/usr/local/lib/X11/fonts/75dpi/"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "vesa"
	VendorName  "Intel Corporation"
	BoardName   "Intel nVidia Thingy"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Modes "1024x768"
		Virtual 1024 768
	EndSubSection
EndSection
 
Woohoo!!! I changed the driver to the vesa driver and ran # startxand it launched xterm. Does that mean I am good to go?

Argh, I can get the xterm up but cannot get KDE to boot. I applied # echo "exec startkde" > ~/.xinitrc but when it launches it back out and says exec : startkde : not found

Also, why did you take out all the modules to load? Are they unnecessary?
 
CalBear96 said:
Woohoo!!! I changed the driver to the vesa driver and ran # startxand it launched xterm. Does that mean I am good to go?

If it works, well, yes. It would be good to post the xorg.conf you used, if it wasn't the one above.
 
Figured it out. I had the wrong code. I changed ~/.xinit to # echo exec /usr/local/kde4/bin/startkde and it now brings it up.
 
Here is my configuration. I have one problem remaining. KDE is only allowing 1280x1024 resolution and I have a FHD screen at 1920x1080. Is there a depth change I can make to get the full HD or is the vesa driver not capable of that?

http://pastebin.com/n06K68A2
 
CalBear96 said:
Here is my configuration. I have one problem remaining. KDE is only allowing 1280x1024 resolution and I have a FHD screen at 1920x1080. Is there a depth change I can make to get the full HD or is the vesa driver not capable of that?

http://pastebin.com/n06K68A2

The one I posted is a bit less misleading. Should work the same.

As Adam posts, vesa is a stopgap. It's better than nothing, and ISTR someone here got some resolutions higher than 1280x1024 to work, but don't expect much. That it works at all on an Optimus system is a little surprising.

I'd think it's technically possible to have a utility that would disable either of the two video systems, but it would be up to Intel (maybe) or nVidia (fat chance) to provide it.
 
I've actually read that some versions of the vesa driver can use resolutions that are programmed directly into the cards BIOS. I've never seen an intel GPU with HD resolutions programmed into the BIOS (though I have seen a few nvidia GPUs like that).

EDIT: But that's not to say such an intel GPU doesn't exist.

Adam
 
@Adamk: That was actually my thread that I started. Then I saw this one and added my two cents and it spiraled from there. Unfortunately on my computer I cannot disable the NVidia chip in BIOS and the research did on the vesa BIOS did not yield much in the way of help. I decided that until this GMA HD issue is fixed (GEM/KMS) added to the kernel or I get another laptop without Optimus (they were about 500 bucks more), I will revert back to Linux. I am sad to say that, but I will keep exploring FreeBSD on a mail server I want to configure for my business.

Also, the legacy driver I found offers no acceleration so it is a waste of system hardware I think, in my case anyway. Thanks for everyone's help.
 
Back
Top