You are not logged in.

#1 2012-01-04 13:31:59

BlueF
Member
Registered: 2010-01-31
Posts: 12

Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Hi everyone,

first of all my question (before I explain everything more detailed):
Is it possible to start X with the nVidia driver when both cards are enabled in the BIOS (using the "NVIDIA Optimus" option)???


I've just bought a new Lenovo Thinkpad W520 with a nVidia Quadro 2000M and the Intel HD3000 graphics adapters (it uses nVidia optimus but also has a hardware MUX, so I can choose which graphics adapter I want to use in the BIOS (Integrated, Descrete or Optimus)).

Most of the time I use the Tinkpad at home where it is connected to an external monitor via DisplayPort. Unfortunately, the DisplayPort is internally only connected to the nVidia graphics card.
So at the moment I do it this way:
1.) I selected the option "Discrete" in the BIOS (so only the nVidia graphics adapter is available for the OS)
2.) I installed the nvidia proprietary driver

So far, everything works fine! I can use my external monitor via DisplayPort (with sound) or my Thinkpad display.

But if I want to use the Tinkpad on battery (without the external monitor - when I'm not at home) I would like to use the Intel HD graphics chip to save power and get a better battery life.

I tried to select the "NVIDIA Optimus" option in the BIOS so that both adapters are available in Arch Linux. I also managed to start the X server using the nvidia driver (by adding the BusID-line to xorg.conf) and I could use my external Monitor via DisplayPort, BUT:
- There was no nvidia sound card available in alsa (to play sound over DisplayPort)
- the Thinkpad display was always on (usually I use either my external monitor - if it is connected - or the Thinkpad display using the "nvidia autoselect" option in the xorg.conf file)
- when I switched to a console (e.g. Ctrl-Alt+F1) and back to X, all the console content was still visible on the Thinkpad-Display
- I wasn't able to use the Thinkpad-Display for X without my external monitor


So my question is:
Is there a way to start X with the nVidia driver when both cards are enabled in the BIOS (using the "NVIDIA Optimus" option)???

Bumblebee is no option for me, because I already need to start the X server using the nvidia driver to be able to use my external monitor via DisplayPort!!!

Offline

#2 2012-01-04 14:55:15

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Not yet possible. Stuff to make it possible is being developed, but it's still very early. See here: http://airlied.livejournal.com/75555.html

Offline

#3 2012-01-04 15:40:50

BlueF
Member
Registered: 2010-01-31
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Gusar wrote:

Not yet possible. Stuff to make it possible is being developed, but it's still very early. See here: http://airlied.livejournal.com/75555.html

Thanks for that!
But it seems like if it would only work with nouveau and not with the nvidia proprietary driver, right?

Offline

#4 2012-01-04 15:51:57

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Well, Dave Airlie can't work on a proprietary driver, so of course this is for the open source stack only. It's up to Nvidia to make stuff work with their blob.

Offline

#5 2012-01-04 23:40:36

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Bumblebee is the closest thing we've got right now.  As I understand it, having "Nvidia Optimus" enabled in the BIOS (while using the Intel driver in X) leaves the dedicated card inactive, but still powered on.  So at the moment, turning Optimus on under Linux is really at least as detrimental as it is ineffective.

Offline

#6 2012-01-05 04:22:14

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

BlueF,

I have been trying to get the nvidia card to power an external display with the BIOS set to "Nvidia Optimus" on my W520, but I have been unsuccessful. If I read your post correctly, it seems that you have at least some functionality:

BlueF wrote:

I tried to select the "NVIDIA Optimus" option in the BIOS so that both adapters are available in Arch Linux. I also managed to start the X server using the nvidia driver (by adding the BusID-line to xorg.conf) and I could use my external Monitor via DisplayPort,


I thought that I got the "BusID" line right, but apparently not, because it is not working. Could you post your xorg.conf file so that I can perhaps troubleshoot mine? I would be very grateful!

Offline

#7 2012-01-05 09:40:24

BlueF
Member
Registered: 2010-01-31
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

ANOKNUSA wrote:

Bumblebee is the closest thing we've got right now.  As I understand it, having "Nvidia Optimus" enabled in the BIOS (while using the Intel driver in X) leaves the dedicated card inactive, but still powered on.  So at the moment, turning Optimus on under Linux is really at least as detrimental as it is ineffective.

No, that's not entirely true. With acpi_call it's possible to turn off the discrete graphics card (nvidia) (on most devices).

Last edited by BlueF (2012-01-05 09:49:01)

Offline

#8 2012-01-05 09:48:25

BlueF
Member
Registered: 2010-01-31
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

zsunberg wrote:

I thought that I got the "BusID" line right, but apparently not, because it is not working. Could you post your xorg.conf file so that I can perhaps troubleshoot mine? I would be very grateful!

Here is the content of my xorg.conf file:

Section "Device"
	Identifier	"Device0"
	Driver		"nvidia"
	BusID		"PCI:01:00:0"
	VendorName	"NVIDIA Corporation"
	BoardName	"Quadro 2000M"
	Option		"RegistryDwords" "EnableBrightnessControl=1" #enable Brightness-Control on my Thinkpad W520
	Option		"NoLogo" "1"
EndSection

Section "Screen"
	Identifier	"Screen0"
	Device		"Device0"
	DefaultDepth	24
	Option		"TwinView" "0"
	Option		"metamodes" "DFP-1: nvidia-auto-select +0+0"
	SubSection	"Display"
	    Depth	24
	EndSubSection
EndSection

But as I said, it's not really working very well! It was just a test to see if there is a possibility.

Offline

#9 2012-01-06 06:14:56

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

BlueF,

Thanks so much - even though that wasn't quite what you wanted, it did what I wanted it to! (turns out I didn't have the "Screen" section set up right)

I have been looking around the internet and on some Windows Lenovo forums, I noticed something interesting: In "Discrete" BIOS mode, you can only run the Thinkpad display and one other display, while in the "NVIDIA Optimus" BIOS mode you can run the Thinkpad display and *two* other displays - this got me thinking on how the cards might all be connected internally.

My current hypothesis is that, when in "Discrete" mode, the nvidia card is connected to the Thinkpad display and the external ports (but for some reason it can only use one at a time). When in "NVIDIA Optimus" mode, the integrated chip is connected to the Thinkpad display (in Windows, the nvidia chip can render and dump into the integrated chip when needed, but not in linux (yet)) and the nvidia chip is connected to the external ports. This would explain your problem of not being able to start X with nvidia on the Thinkpad display in Optimus mode. If my hypothesis is true, you can only run the Thinkpad display off the integrated card in optimus mode.

I don't know what your solution to this will be, but please post it if you come up with a good one so that I can see if it will help me.

Right now my goal is to get both the thinkpad and extenal displays working simultaneously on the two different cards... I am still a total noob, so this could be pretty difficult, but it seems like it might be possible with xinerama or something...

Offline

#10 2012-01-06 13:26:06

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

zsunberg wrote:

My current hypothesis is that, when in "Discrete" mode, the nvidia card is connected to the Thinkpad display and the external ports (but for some reason it can only use one at a time).

Maximum two displays on a single card (in this case the internal and one external) is very, very common. The only cards capable of more are desktop ATI cards with Eyefinity.

zsunberg wrote:

in Windows, the nvidia chip can render and dump into the integrated chip when needed, but not in linux (yet)

In Linux you can use Bumblebee for that. It's a hack, but it does work.

zsunberg wrote:

Right now my goal is to get both the thinkpad and extenal displays working simultaneously on the two different cards...

Not possible. Look at the link I gave, development is happening, but it'll take a while before it's done.

Offline

#11 2012-01-06 20:20:43

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Gusar wrote:

Not possible. Look at the link I gave, development is happening, but it'll take a while before it's done.

So you are saying that it is not possible to run a xinerama configuration on two different graphics cards? that is all I am trying to do. I don't even really care about acceleration, so I can use an open-source driver if I need to use the same driver across all the cards. - I just want more screens to see more code.

Sorry if I'm hijacking this thread. I don't know if this is proper etiquette - I can open another thread if that is the proper thing to do.

Offline

#12 2012-01-07 22:28:41

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Yes! got it to work! http://db.tt/KppyNg94

Of course there is no acceleration [edit: actually 3d acceleration does work, but only on the external monitor connected to the nvidia card]... no compiz or anything good like that, but now I will finally be able to use 3 displays once I get another one! And I won't have to keep getting into the bios to change display modes for better battery life vs being able to use an external monitor. Even though you didn't really get a solution out of this, BlueF, it helped me tremendously. Also, thanks for your input, Gusar

Here's the xorg.conf file in case anyone happens upon this thread and wants to do what I did: http://db.tt/wuZE4esO

Last edited by zsunberg (2012-01-12 05:07:34)

Offline

#13 2012-01-10 03:45:44

lucasrangit
Member
Registered: 2012-01-10
Posts: 1

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

zsunberg wrote:

Yes! got it to work! http://db.tt/KppyNg94
Here's the xorg.conf file in case anyone happens upon this thread and wants to do what I did: http://db.tt/wuZE4esO

Hi @zsunberg. I tried your configuration. Thank you for sharing it. I configured my BIOS to use Optimus and disabled the OS detection option. I'm driving a 24" DVI display and the laptop. I also do not have Compiz running. It's usable but there are issues.

I do not have Window decorations (menu bar with close, minimize, maximize or the edges to resize). I cannot open a terminal (doesn't appear). When I attempt to run nvidia-settings I get the following error:

Xlib:  extension "RANDR" missing on display ":0".

Did you observe this as well?

I'm running Ubuntu 11.10 on the W520 with a Quadro 1000M with version 290.10 of the nvidia drivers.

Last edited by lucasrangit (2012-01-10 03:46:15)

Offline

#14 2012-01-10 19:00:34

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

No, lucasgrangit, I am not having the same issues.... I am running kubuntu 11.10. Becuase it uses KDE instead of gnome/unity, it has a different window decorator, so I do not have the same decoration issues - mine is working fine. I can also open tty terminals through Ctrl-Alt-F1 etc. on the Thinkpad display fine. My nvidia driver version is 280.13 from the nvidia-current package.

The RANDR missing output has to do with the fact that X is using the Xinerama extension (the xorg.conf file tells it to do this). RANDR is used to dynamically resize the X display (it's what ubuntu tries to use when you press Fn-F7). Because we told X to use Xinerama to set up a static X server configuration in xorg.conf , RANDR is disabled. There may be a way to set this all up to use RANDR instead of static Xinerama (which would be better), but I don't know how to do it at this point with the two graphics cards.

Offline

#15 2012-01-12 07:09:26

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

For anyone who finds this thread... I have created a blog post outlining information about graphics on the W520 including an xorg configuration for using 3 displays. You can see it at

http://zachstechnotes.blogspot.com/2012 … -w520.html

Last edited by zsunberg (2012-01-18 02:15:14)

Offline

#16 2012-01-12 17:37:27

BlueF
Member
Registered: 2010-01-31
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

@zsunberg:
Have you installed both graphics driver, intel and nvidia? Or are you using the nouveau driver for the nvidia card?

Offline

#17 2012-01-12 21:34:01

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

I'm using the "intel" driver for the intel card, and the "nvidia" driver for the nvidia card right now.

I think there might be a way to get all of this working with xrandr instead of xinerama if I switch to the nouveau driver (because the nvidia driver tries to handle it's own display resizing as far as I can tell). There might also be a way to get 3d acceleration and compiz on all screens using the nouveau and intel drivers, but I haven't had time to check.

Offline

#18 2012-01-13 19:13:13

BlueF
Member
Registered: 2010-01-31
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

zsunberg wrote:

I'm using the "intel" driver for the intel card, and the "nvidia" driver for the nvidia card right now.

You are using (k)ubuntu, right?

Because with archlinux it's not so easy to have both drivers, intel and nvidia installed at the same time. The packages are in conflict because of libgl.

Offline

#19 2012-01-15 04:43:31

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Yeah, I'm using kubuntu. Fortunately the intel and nvidia packages don't conflict, but I still can't have open gl graphics acceleration on both at the same time as far as I can tell.

I wonder if it might be possible to run both of the cards on some baseline generic graphics card driver like vesa. I think there is a pure software open gl renderer that is part of mesa and that might be able to output 3d stuff on screens run by the intel card and the nvidia card. That would mean throwing away all of the performance of the cards, but it might allow running all the monitors consistently. I don't really know what I'm talking about here... it's just a thought.

Offline

#20 2012-01-17 08:26:18

fabian
Member
Registered: 2012-01-17
Posts: 4

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Hi! I hope I am not out of topic with this post.

I have a W520 and wish to have only the Intel integrated graphics enabled... when I do so (no nvidia nothing installed and only integrated graphics enabled in BIOS) I can't have dual monitors! xrandr always shows "VGA1 disconnected"

I guess this should be that complicated... I am very new to all this graphics mess. Any help will be greatly appreciated.

Fabian

Edit: yes, xf86-video-intel is installed

Last edited by fabian (2012-01-17 08:26:55)

Offline

#21 2012-01-18 02:23:10

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

As far as I can tell, the integrated graphics is ONLY connected to the thinkpad display, so it may be impossible to connect external displays without using the nvidia card (Let us know if you figure out how to do it with just the intel card). To see my summary of the different configurations, see my blog (linked in my 1/4/12 post on this forum).

Offline

#22 2012-01-18 17:50:33

fabian
Member
Registered: 2012-01-17
Posts: 4

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

zsunberg,

Seems that you are right. sad
Proof by example: Windoze7... I disabled the discrete graphics cards as well as the Optimus OS Detection and booted win7, the Intel Graphics settings panel doesn't even show an option to have VGA output...

oh, well... time to come up with something:

I was thinking I could put come parameters on the kernel line, and have one more option, to boot depending if I'm at home (dual-monitor) or on the move (only integrated). Any ideas?

Fabian

Offline

#23 2012-01-18 22:52:14

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

If you can figure out a reliable way to turn off the nvidia graphics card (acpi_call only sort of seems to work), then I think the answer would be just to boot every time in "Optimus" mode. In optimus mode, both the nvidia card and intel card are available. The intel card is connected to the Thinkpad display only, and the nvidia card is connected to both of the external ports. Right now, I have it set up so that I boot into a tty terminal and then start X manually from there either with both cards turned on when I have an external display, or with the nvidia card turned off if I am mobile. The problem is that the nvidia graphics card doesn't want to stay turned off in all circumstances.

Offline

#24 2012-01-18 22:58:05

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Instead of acpi_call, give bbswitch a try: https://aur.archlinux.org/packages.php?ID=55799

Offline

#25 2012-01-22 17:32:58

zsunberg
Member
Registered: 2012-01-05
Posts: 12

Re: Thinkpad W520 nVidia Optimus (run X with nvidia driver)

Thanks Gusar, bbswitch seems to work correctly

Offline

Board footer

Powered by FluxBB