Skip to contentSkip to conversation

Support for GP107(GL)M with Optimus

DISCUSSION Markus Wanner 3 participants 5 messages May 28, 2019 – May 30, 2019 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I recently added logs and another report from a ThinkPad P1 with a Quadro P2000 Mobile (GP107GLM) to issue #100228.

That's with a very recent Linux kernel and current nouveau driver sources, all booted from an NFS-root setup, making it well reproducible.
I can optionally boot into a similar NFS installation with the
proprietary Nvidia driver, allowing me to capture MMIO traces as well.

However, I'm not sure where to go from here and would appreciate some help in diagnosing this and/or moving it forward. I'm a professional and experienced developer, but have plenty of other interesting projects on my table, already.

Do ordinary (non-Optimus) setups with GP107 work? What do you look for when reading MMIO traces? What accompanying data do I need to collect?

Kind Regards

Markus Wanner
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 2b626681-3504-c7e9-10d2-0f906dcb176d-XHb0b+agOrdyDzI6CaY1VQ@public.gmane.org

#2 lore raw

thanks for your main.

If you want you could try out those patches on a kernel and see if those make any difference on your machine:

https://github.com/karolherbst/linux/commits/runpm_fixes

make sure you use the "runpm_fixes" branch. We are kind of aware of the issues on modern laptops and already try to find a proper solution, it mostly boils down to testing and checking if there are other issues left we didn't address yet. Also without knowing what error message you are getting precisely I can only make an educated guess on what your issue might be.
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): CACO55tsFLc1M0pPe0_2=Dn7j8KctApganDoe=hNBsLCfNLXULw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

Hello Karol,

Quoted 4 lines · Karol Herbst

If you want you could try out those patches on a kernel and see if those make any difference on your machine:

https://github.com/karolherbst/linux/commits/runpm_fixes

thanks, I tried, see below. This raises another question: where does nouveau development take place? In a tree based on the linux kernel (such as the above repo) or in some dedicated module-only repo like skeggsb/nouveau?

I manually "rebased" the last five commits from the "runpm_fixes" branch of the repo above onto skeggsb/nouveau, which applied w/o conflicts. Results below are for a nouveau module built that way.

Quoted 4 lines

make sure you use the "runpm_fixes" branch. We are kind of aware of the issues on modern laptops and already try to find a proper solution, it mostly boils down to testing and checking if there are other issues left we didn't address yet.

Understood. That's part of why I setup that infrastructure.

Quoted 2 lines

Also without knowing what
error message you are getting precisely

Sorry, I thought the reference to issue #100228 was enough. I certainly got the exact same "bus: MMIO read of 00000000 FAULT at 409800" timeout and figured I better not file a duplicate.

I realize messed up the upload of the kernel log to that issue. I just corrected that.

So, current status on skeggsb/nouveau fails that way for me, independent of the runpm setting. However, with the five patches from your runpm_fixes branch added, I see different results:

* no such timeouts any more in kernel logs (yay!)
* X11 recognizes the Dell display connected on HDMI-1 (independent of kernel module parameters or X11 config)
* starting X11 with only the nouveau driver, a terminal appears on the display (yay!)
* loading nouveau with debug=debug and starting X11, the display remains dark
* loading nouveau and intel (for the internal display), the external display remains dark as well, xrandr does not show it, but xrandr --listproviders at least lists two providers (I'm not sure whether I can somehow enable the external display in this case).

That's all tested on:

* a Lenovo ThinkPad P1, with a GP107GLM, AKA Quadro P2000
* Debian testing
* linux 5.2-rc1
* X11 started using xinit, loading nothing but an xterm

I'm happy to provide logs from these runs or conduct further experiments, but would appreciate some guidance on what's useful. Thank you.

Kind Regards

Markus
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 169b8cf4-df8a-558b-5d68-e1400c73f6a5-XHb0b+agOrdyDzI6CaY1VQ@public.gmane.org

#6 lore raw
Quoted 2 lines · Markus Wanner

I realize messed up the upload of the kernel log to that issue. I just corrected that.

Oh, I attempted to, but got an internal server error uploading the logs to bugzilla. "Please contact the server administrator at [no address given]", hm...

Markus
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw
In reply to a message not in the archive
Quoted 9 lines · Markus Wanner

Hello Karol,

Quoted 4 lines · Karol Herbst

If you want you could try out those patches on a kernel and see if those make any difference on your machine:

https://github.com/karolherbst/linux/commits/runpm_fixes

Quoted 8 lines

thanks, I tried, see below. This raises another question: where does nouveau development take place? In a tree based on the linux kernel (such as the above repo) or in some dedicated module-only repo like skeggsb/nouveau?

I manually "rebased" the last five commits from the "runpm_fixes" branch of the repo above onto skeggsb/nouveau, which applied w/o conflicts. Results below are for a nouveau module built that way.

Nouveau development takes place on developers' computers :) We then submit patches to Ben (nouveau maintainer) who in turn submits pull requests to Dave (drm maintainer). The tree that these pull requests come from is

https://github.com/skeggsb/linux

Ben does his own development on that "nouveau" repository, as it enables him to do various clever things. However there's a trade-off, and it's not always convenient to use. I exclusively develop against the linux tree and send patches based off that. It's pretty trivial to map patches back and forth with sed, so it's not a huge deal. It does cause some frequent confusion, so probably worth documenting in the wiki or something. [And I suspect if I had to do the things Ben has to do, I'd find the trade-off to go in the other way and prefer his approach. But I don't, so here we are :) ]

It's a bit unfortunate that this flow does not put nouveau development into linux-next prior to Dave pulling the tree in. I'd encourage Ben to do more frequent sync's to the linux tree and have a permanent, rebasing, "next" branch, but ... not my call. Perhaps linux-next frowns on that sort of thing.

Quoted 9 lines

So, current status on skeggsb/nouveau fails that way for me, independent of the runpm setting. However, with the five patches from your runpm_fixes branch added, I see different results:

* no such timeouts any more in kernel logs (yay!)
* X11 recognizes the Dell display connected on HDMI-1 (independent of kernel module parameters or X11 config)
* starting X11 with only the nouveau driver, a terminal appears on the display (yay!)

Sounds like nouveau is working fine then.

Quoted 2 lines

* loading nouveau with debug=debug and starting X11, the display remains dark

That's weird. What's in the logs? I don't think we spam debug logs THAT much by default...

Quoted 4 lines

* loading nouveau and intel (for the internal display), the external display remains dark as well, xrandr does not show it, but xrandr --listproviders at least lists two providers (I'm not sure whether I can somehow enable the external display in this case).

You have to link the two providers together. See
https://nouveau.freedesktop.org/wiki/Optimus/ "Using outputs on discrete GPU". Long story short, just run

xrandr --setprovideroutputsource 1 0

and the secondary GPU's outputs should magically appear in the RandR output list.

Cheers,

-ilia
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau