Bug 89558 - [NV118] GM108 not supported by nouveau
Summary: [NV118] GM108 not supported by nouveau
Status: NEW
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-12 11:19 UTC by Barry Rowlingson
Modified: 2017-04-04 09:19 UTC (History)
10 users (show)

See Also:
i915 platform:
i915 features:


Attachments
part dmesg log (12.94 KB, application/gzip)
2015-03-22 15:33 UTC, SMF
no flags Details
XOrg Log (5.29 KB, application/gzip)
2015-03-22 20:56 UTC, SMF
no flags Details
Full dmesg log (242.03 KB, text/plain)
2015-03-22 23:00 UTC, SMF
no flags Details
dmesg alternate nouveau tree (45.93 KB, text/plain)
2015-03-22 23:06 UTC, SMF
no flags Details
filtered syslog (110.14 KB, text/plain)
2015-03-23 08:21 UTC, SMF
no flags Details
excerpt lspci -v and /v/l/m (321.82 KB, text/plain)
2015-03-23 16:57 UTC, EmilStephan
no flags Details
mmiotrace (2.89 MB, text/plain)
2015-03-23 17:32 UTC, SMF
no flags Details
mmiotrace (1.56 KB, text/plain)
2015-03-23 18:11 UTC, SMF
no flags Details
nvidia-smi mmiotrace (1.16 MB, application/octet-stream)
2015-03-23 19:26 UTC, SMF
no flags Details
kernel 4.0.4 nouveau driver with patches applied (49.35 KB, text/plain)
2015-05-22 08:27 UTC, SMF
no flags Details
kernel 4.1-rc5 nouveau driver with patches applied (118.07 KB, text/plain)
2015-05-25 17:11 UTC, SMF
no flags Details
Kernel 4.1-rc6 (with 0x118 added to gm100.c) (113.51 KB, text/plain)
2015-06-01 12:24 UTC, SMF
no flags Details
Patch to enable partiial initialisation of Nouveau on Linux 4.3-rc3 (1.58 KB, text/plain)
2015-10-01 18:49 UTC, SMF
no flags Details
kernel 4.4 - dmesg: 950MX SMF 108 patch (68.14 KB, text/plain)
2016-04-20 04:02 UTC, Marco Trevisan (Treviño)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Barry Rowlingson 2015-03-12 11:19:04 UTC
Installed Linux Mint 17.1, installed all package updates to current (12/Mar/2015).

Reboot, dmesg reports unknown chipset from the nouveau kernel module:

[    1.048477] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP05.PEGP handle
[    1.048495] checking generic (d0000000 580000) vs hw (e0000000 10000000)
[    1.048497] checking generic (d0000000 580000) vs hw (f0000000 2000000)
[    1.049793] [drm] hdmi device  not found 8 0 1
[    1.049924] nouveau E[  DEVICE][0000:08:00.0] unknown chipset, 0x118010a2
[    1.049927] nouveau E[     DRM] failed to create 0x80000080, -22
[    1.050665] nouveau: probe of 0000:08:00.0 failed with error -22

X starts up, there's no mention of nouveau in the Xorg.0.log, and it uses the intel X driver because the system has i915 and nvidia graphics. With intel-driven X11 there's a GPU hang bug, so I wanted to get the nvidia working, first via nouveau.

lspci lists the intel graphics as VGA controller and the nvidia graphics as "3D controller":

# lspci
00:00.0 Host bridge: Intel Corporation Broadwell-U Host Bridge -OPI (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03)
00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3)
00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3)
00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3)
00:1c.4 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #5 (rev e3)
00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03)
00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
06:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 07)
08:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)

Details on the Nvidia are:

08:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 840M] [10de:1341] (rev a2)
	Subsystem: Dell Device [1028:0656]
	Flags: fast devsel, IRQ 16
	Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at d000 [size=128]
	Expansion ROM at f7000000 [disabled] [size=512K]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19


At some point in the past two days of messing with this laptop I have had the system recognise the card and "nouveau" be part of the Xorg log, but that may have been after installing the proprietary drivers or something else. At the moment I think the nouveau kernel is simply not recognising the chipset code of the card.
Comment 1 Ilia Mirkin 2015-03-12 19:34:43 UTC
There is presently no support in nouveau for this particular chip. However it _ought_ to be pretty similar to the GM107, so you can just add a

case 0x118:

right above the "case 0x117:" in drivers/gpu/drm/nouveau/core/engine/device/gm100.c (approximate path, going by memory). In hypothetical scenario where that works fine, you still wouldn't be able to use this for acceleration [but you would be able to use any displays direct-attached to the controller, if any].

For acceleration, you can either grab blob fw (see http://nouveau.freedesktop.org/wiki/NVC0_Firmware/), or you may want to build the (out-of-tree style) module available at

http://cgit.freedesktop.org/~darktama/nouveau

which just 2 days ago gained support for GM107 acceleration without any blob fw. All of these will require the extra "case" statement of course.

If you end up going through with any parts of this advice, let us know how it works out. We'd love to add support for this chip, but no one on the nouveau team presently has access to it.
Comment 2 Ben Skeggs 2015-03-12 23:41:10 UTC
An mmiotrace would be good as well.  Usually these chip revisions have minor differences in the default graphics engine state that we really should account for too.
Comment 3 SMF 2015-03-22 15:33:56 UTC
Created attachment 114524 [details]
part dmesg log

Hi,
I have a Lenovo Z70-50 with the Intel/Nvidia graphics and I am also interested in getting the gm108 component functional. I use Linux From Scratch for my system and so far I have had no luck with getting the Nvidia binary (NVIDIA-Linux-x86-346.47.run) fuctional ( I have also tried UBUNTU also without luck). I have however added the 0x118 case option to gm100.c in kernel 3.19.2 ( see attached partial dmesg log ) and I have a script ready to run the MMIOTrace on my LFS setup.

Have you had any luck obtaining the nv118_fuc409c firmware the nouveau modules is now requesting?
Comment 4 SMF 2015-03-22 16:17:18 UTC
further to my previous message I have just tried Ilia's extract_firmware.py on the 340.32 ( last supported version in the python script) binary and non of the firmware extracted match my kernel dmesg.
Comment 5 SMF 2015-03-22 20:56:24 UTC
Created attachment 114534 [details]
XOrg Log


Herewith my Xorg log showing a degree of functionality from the nouveau driver with the patched kernel.
Comment 6 Ilia Mirkin 2015-03-22 21:26:54 UTC
Without firmware, you won't get acceleration. (And my script only extracts pgraph fw from 325.15 which doesn't have maxwell firmware.) However you will get (open) firmware with Ben's latest tree:

http://cgit.freedesktop.org/~darktama/nouveau

Perhaps it could work. It sounds like just using the GM107 logic isn't quite enough, your log is full of

[    5.961431] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.962869] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.964311] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.965752] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.967194] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.968605] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.970034] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    5.970303] nouveau E[   PFIFO][0000:03:00.0] runlist 4 update timeout

Perhaps Ben knows what that is. Could you try to increase your kernel log size so that you get the start of those messages? May be interesting. [Also, please avoid attaching things gzipped, makes one _much_ less likely to read them since modern browsers force you to download... oh the Mozilla 0.99 days when it just displayed whatever in the browser...]
Comment 7 SMF 2015-03-22 23:00:45 UTC
Created attachment 114537 [details]
Full dmesg log

I have increased the kernel log buffers to maximum has you suggested and I now have a complete dmesg log from bootup.
Comment 8 SMF 2015-03-22 23:06:56 UTC
Created attachment 114538 [details]
dmesg alternate nouveau tree

In this log I have removed the 3.19.2 kernel nouveau.ko and build the software from the git source has you suggested. The new nouveau.ko module has loaded but I cannot see anything in the log to indicate any functionality ( I modified the gm100.c file has before), any suggestions has to what I have done wrong ?
Comment 9 Ilia Mirkin 2015-03-22 23:08:48 UTC
heh, yeah, you're gonna have a bad time with this:

[    1.834852] nouveau  [  DEVICE][0000:03:00.0] BOOT0  : 0x118010a2
[    1.834885] nouveau  [  DEVICE][0000:03:00.0] Chipset: GM108 (NV118)

How did you get that? I guess you copied the entire 0x117 section instead of just adding the "case 0x118" next to case 0x117? [not that there's anything wrong with that]

[    1.834915] nouveau  [  DEVICE][0000:03:00.0] Family : NV110
[    1.841397] nouveau  [   VBIOS][0000:03:00.0] using image from ACPI
[    1.841487] nouveau  [   VBIOS][0000:03:00.0] BIT signature found
[    1.841518] nouveau  [   VBIOS][0000:03:00.0] version 82.08.13.00.1c
[    1.841817] nouveau  [     PMC][0000:03:00.0] MSI interrupts enabled
[    1.841890] nouveau  [     PFB][0000:03:00.0] RAM type: DDR3
[    1.841898] nouveau E[    PBUS][0000:03:00.0] MMIO read of 0x00000000 FAULT at 0x6013d4 [ IBUS ]

That's the vga 0x3d4 port afaik... no display controller? no outputs in the dcb, so I guess that makes sense. Does it come up as a 3D Accelerator, or VGA compatible controller?

[    1.841966] nouveau  [     PFB][0000:03:00.0] RAM size: -1159778304 MiB

Seems like an awfully low amount of vram :) Can you boot with nouveau.debug=debug? That should provide some additional prints to work out how it gets to such a fun quantity.

[    1.841997] nouveau  [     PFB][0000:03:00.0]    ZCOMP: 0 tags
[    1.842052] nouveau E[    PBUS][0000:03:00.0] MMIO read of 0x00000000 FAULT at 0x10f65c [ IBUS ]
[    1.842169] nouveau E[    PBUS][0000:03:00.0] MMIO read of 0x00000000 FAULT at 0x17e280 [ IBUS ]
[    1.880555] nouveau  [  PTHERM][0000:03:00.0] FAN control: none / external
[    1.880602] nouveau  [  PTHERM][0000:03:00.0] internal sensor: no
[    1.880672] nouveau  [     CLK][0000:03:00.0] 07: core 405 MHz memory 810 MHz 
[    1.880798] nouveau  [     CLK][0000:03:00.0] 0a: core 270-1124 MHz memory 1600 MHz 
[    1.880951] nouveau  [     CLK][0000:03:00.0] 0f: core 270-1124 MHz memory 2002 MHz 
[    1.881116] nouveau  [     CLK][0000:03:00.0] --: core 13 MHz  
[    1.911386] nouveau  [  PGRAPH][0000:03:00.0] using external firmware
[    1.911429] nouveau 0000:03:00.0: Direct firmware load for nouveau/nv118_fuc409c failed with error -2
[    1.911472] request_firmware returned -2 (0xf2cb3b64 'nouveau/nv118_fuc409c' 0xf2687864)
[    1.912817] nouveau 0000:03:00.0: Direct firmware load for nouveau/fuc409c failed with error -2
[    1.914179] request_firmware returned -2 (0xf2cb3b64 'nouveau/fuc409c' 0xf2687864)
[    1.915536] nouveau E[  PGRAPH][0000:03:00.0] failed to load fuc409c
[    1.916912] vga_switcheroo: enabled
[    1.918346] [TTM] Zone  kernel: Available graphics memory: 413022 kiB
[    1.919713] [TTM] Zone highmem: Available graphics memory: 4097762 kiB
[    1.921085] [TTM] Initializing pool allocator
[    1.922452] nouveau  [     DRM] VRAM: -1159778304 MiB
[    1.923815] nouveau  [     DRM] GART: 1048576 MiB
[    1.925179] nouveau E[     DRM] Pointer to TMDS table invalid
[    1.926537] nouveau  [     DRM] DCB version 4.0
[    1.927891] nouveau E[     DRM] Pointer to flat panel table invalid
[    1.939229] nouveau E[   PFIFO][0000:03:00.0] write fault at 0x0000070000 [UNBOUND_INST_BLOCK] from BAR3/HOST_CPU_NB on channel 0x0000000000 [unknown]
[    1.941398] nouveau E[   PFIFO][0000:03:00.0] DROPPED_MMU_FAULT 0x00000000
[    1.942989] nouveau E[   PFIFO][0000:03:00.0] BIND_ERROR [ INVALID_CTX_TGT ]
[    1.944398] nouveau E[   PFIFO][0000:03:00.0] read fault at 0x0000000000 [UNBOUND_INST_BLOCK] from GR/VIP on channel 0x0000000000 [unknown]
[    1.945821] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK08 ]
[    1.948423] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]
[    1.951026] nouveau E[   PFIFO][0000:03:00.0] SCHED_ERROR [ UNK06 ]

I'm very willing to believe that these issues are all caused by the negative vram size.
Comment 10 Ilia Mirkin 2015-03-22 23:10:31 UTC
(In reply to SMF from comment #8)
> Created attachment 114538 [details]
> dmesg alternate nouveau tree
> 
> In this log I have removed the 3.19.2 kernel nouveau.ko and build the
> software from the git source has you suggested. The new nouveau.ko module
> has loaded but I cannot see anything in the log to indicate any
> functionality ( I modified the gm100.c file has before), any suggestions has
> to what I have done wrong ?

You appear to have built nvidiafb and it has taken over the device. It thinks that it's a

[    3.612411] nvidiafb: PCI nVidia NV34 framebuffer (64MB @ 0xB0000000)

and doubtful too much good can come of that. Please blacklist that module.
Comment 11 SMF 2015-03-23 08:21:58 UTC
Created attachment 114543 [details]
filtered syslog

with the nvidiafb out of the way the git nouveau driver is now functional. The dmesg output itself is full of the error messages so I have attached my debug filtered syslog file instead. Below is my info/notice/warning data filtered from syslog showing the general startup information from the nouveau module.

Mar 23 07:29:15 Mars kernel: [    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.19.2T ro root=/dev/sda7 video.use_native_backlight=1 nouveau.debug=debug
Mar 23 07:29:15 Mars kernel: [    3.111900] nouveau 0000:03:00.0: enabling device (0006 -> 0007)
Mar 23 07:29:15 Mars kernel: [    3.112067] nouveau  [  DEVICE][0000:03:00.0] BOOT0  : 0x118010a2
Mar 23 07:29:15 Mars kernel: [    3.112069] nouveau  [  DEVICE][0000:03:00.0] Chipset: GM107 (NV118)
Mar 23 07:29:15 Mars kernel: [    3.112071] nouveau  [  DEVICE][0000:03:00.0] Family : NV110
Mar 23 07:29:15 Mars kernel: [    3.120871] nouveau  [   VBIOS][0000:03:00.0] using image from ACPI
Mar 23 07:29:15 Mars kernel: [    3.120935] nouveau  [   VBIOS][0000:03:00.0] BIT signature found
Mar 23 07:29:15 Mars kernel: [    3.120939] nouveau  [   VBIOS][0000:03:00.0] version 82.08.13.00.1c
Mar 23 07:29:15 Mars kernel: [    3.121246] nouveau  [     PMC][0000:03:00.0] MSI interrupts enabled
Mar 23 07:29:15 Mars kernel: [    3.121306] nouveau  [     PFB][0000:03:00.0] RAM type: DDR3
Mar 23 07:29:15 Mars kernel: [    3.121308] nouveau  [     PFB][0000:03:00.0] RAM size: -1159778304 MiB
Mar 23 07:29:15 Mars kernel: [    3.121310] nouveau  [     PFB][0000:03:00.0]    ZCOMP: 0 tags
Mar 23 07:29:15 Mars kernel: [    3.160212] nouveau  [  PTHERM][0000:03:00.0] FAN control: none / external
Mar 23 07:29:15 Mars kernel: [    3.160227] nouveau  [  PTHERM][0000:03:00.0] internal sensor: no
Mar 23 07:29:15 Mars kernel: [    3.160285] nouveau  [     CLK][0000:03:00.0] 07: core 405 MHz memory 810 MHz 
Mar 23 07:29:15 Mars kernel: [    3.160719] nouveau  [     CLK][0000:03:00.0] 0a: core 270-1124 MHz memory 1600 MHz 
Mar 23 07:29:15 Mars kernel: [    3.161171] nouveau  [     CLK][0000:03:00.0] 0f: core 270-1124 MHz memory 2002 MHz 
Mar 23 07:29:15 Mars kernel: [    3.161324] nouveau  [     CLK][0000:03:00.0] --: core 13 MHz  
Mar 23 07:29:15 Mars kernel: [    3.192088] nouveau  [     DRM] VRAM: -1159778304 MiB
Mar 23 07:29:15 Mars kernel: [    3.192089] nouveau  [     DRM] GART: 1048576 MiB
Mar 23 07:29:15 Mars kernel: [    3.192103] nouveau  [     DRM] DCB version 4.0
Mar 23 07:29:15 Mars kernel: [    7.210976] nouveau  [     DRM] MM: using COPY for buffer copies
Mar 23 07:29:15 Mars kernel: [    7.210993] [drm] Initialized nouveau 1.2.2 20120801 for 0000:03:00.0 on minor 1

One final point I did originally add an "if" statement to change the device->cname to report GM108 in gm100.c I have now removed that and just added the 0x118 case statement as originally suggested, sorry.
Comment 12 SMF 2015-03-23 09:27:37 UTC
On the question of 3D Accelerator or VGA compatible controller lspci reports it as a 3D controller:

03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
	Subsystem: Lenovo Device 380d
	Flags: bus master, fast devsel, latency 0, IRQ 47
	Memory at c2000000 (32-bit, non-prefetchable) [size=16M]
	Memory at b0000000 (64-bit, prefetchable) [size=256M]
	Memory at c0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 3000 [size=128]
	Expansion ROM at <ignored> [disabled]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19
	Kernel driver in use: nouveau
Comment 13 EmilStephan 2015-03-23 16:57:42 UTC
Created attachment 114551 [details]
excerpt lspci -v and /v/l/m
Comment 14 EmilStephan 2015-03-23 17:00:13 UTC
Comment on attachment 114551 [details]
excerpt lspci -v and /v/l/m

This is a GM108 on a HP Envy17 j145ng.
Comment 15 Ilia Mirkin 2015-03-23 17:03:41 UTC
[26833.396432] nouveau D[     PFB][0000:07:00.0] 0x100800: 0x00000001
[26833.396435] nouveau D[     PFB][0000:07:00.0] parts 0x00000001 mask 0x00000000
[26833.396447] nouveau E[    PBUS][0000:07:00.0] MMIO read of 0x00000000 FAULT at 0x6013d4 [ IBUS ]
[26833.396448] nouveau D[     PFB][0000:07:00.0] 0: mem_amount 0xbadf3000

Both of you have basically the same thing. SMF: *please* stop filtering stuff out... I know you think you're helping, but in reality, it just makes everything more complicated.

The 0xbadf3000 is in response to the mmio error, but I'm a bit surprised that it's getting read from that register... should have been 0x11020c. Very odd... Perhaps the error decoding logic is off.

Either way, we'll need a mmiotrace to work this out.
Comment 16 SMF 2015-03-23 17:32:47 UTC
Created attachment 114553 [details]
mmiotrace

Herewith my attempt at a mmiotrace of the nouveau driver startup. If this is not correct please advise what is required.

thanks

Stuart
Comment 17 SMF 2015-03-23 18:11:23 UTC
Created attachment 114557 [details]
mmiotrace

This mmiotrace is from the NVIDIA-Linux-x86-346.47.run nvidia module. It does not seem to contain much information. The sequence tried was :

load module
start X
wait a while
stop X
unload module.
Comment 18 Ilia Mirkin 2015-03-23 18:11:54 UTC
SMF: That mmiotrace doesn't contain actual card init I'm afraid. Even running something like nvidia-smi while the mmiotrace is running may be enough to get it going though.

Contrary to what I said earlier about logs, you *should* compress mmiotraces... they're big and rarely interesting to look at with your bare eyes :) xz -9 works best.
Comment 19 SMF 2015-03-23 19:26:05 UTC
Created attachment 114560 [details]
nvidia-smi mmiotrace

herewith nvidia driver mmiotrace using nvidia-smi as trigger.
Comment 20 Ilia Mirkin 2015-03-23 19:41:22 UTC
That trace is interesting...

[0] 72.213698 MMIO32 R 0x000000 0x118010a2 PMC.ID => { STEPPING = 0xa2 | DEVICE_ID = 0x1 | CHIPSET = GM108 | FOUNDRY = TSMC }
[0] 72.213703 MMIO32 R 0x100800 0x00000001 PFFB.PART_CONFIG => { PART_COUNT = 0x1 | MEM_SPLIT_PART = 0 }
[0] 72.213708 MMIO32 R 0x11020c 0x00001000 PBFB[0].MEM_AMOUNT => 0x100000000
[0] 72.213712 MMIO32 R 0x100800 0x00000001 PFFB.PART_CONFIG => { PART_COUNT = 0x1 | MEM_SPLIT_PART = 0 }
[0] 72.213720 MMIO32 R 0x10f590 0x00000901 PBFB_BROADCAST+0x590 => 0x901
[0] 72.213726 MMIO32 R 0x101000 0x80400092 PSTRAPS.STRAPS0_PRIMARY => { VALUE = { PCI_SUB_BIOS | RAMCFG = 0x4 | CRYSTAL = 0 | DEVICE_ID_0_3 = 0 |
 BAR1_SIZE = 64MB | ROM_TYPE = SPI | FP_CONFIG = 0 | DEVICE_ID_4 = 0 | DEVICE_ID_5 = 0 | 0x80 } | OVERRIDE_ENABLE }

So this suggests that you (SMF) have 4GB of VRAM. Is that correct?
Comment 21 SMF 2015-03-23 20:15:11 UTC
Using cpu-z on windows the graphics tab shows the Intel device as having 4GB and the Nvidia devices is reported as 1GB.
Comment 22 SMF 2015-03-23 22:13:01 UTC
For what it is worth using demmio I now have the firmware from the mmiotrace.log.
Comment 23 SMF 2015-03-24 09:41:42 UTC
(In reply to SMF from comment #21)
> Using cpu-z on windows the graphics tab shows the Intel device as having 4GB
> and the Nvidia devices is reported as 1GB.

The literature that came with the laptop suggests that the VRAM is 4 GB (NVIDIA GT840M 4 GB) so I think the answer is YES. My orginal hesitation stems from the fact that the intel drm is reporting 2GB:

[    0.669881] Linux agpgart interface v0.103
[    0.669993] [drm] Initialized drm 1.1.0 20060810
[    0.670484] [drm] Memory usable by graphics device = 2048M
[    0.670569] [drm] Replacing VGA console driver
[    0.671121] Console: switching to colour dummy device 80x25
[    0.689829] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

That may be a miscalculion/limitation for this system. Could this be a consequence of this systems Intel/Nvidia hybrid setup?
Comment 24 SMF 2015-03-24 14:55:07 UTC
(In reply to SMF from comment #23)
> (In reply to SMF from comment #21)
> > Using cpu-z on windows the graphics tab shows the Intel device as having 4GB
> > and the Nvidia devices is reported as 1GB.
> 
> The literature that came with the laptop suggests that the VRAM is 4 GB
> (NVIDIA GT840M 4 GB) so I think the answer is YES. My orginal hesitation
> stems from the fact that the intel drm is reporting 2GB:
> 
> [    0.669881] Linux agpgart interface v0.103
> [    0.669993] [drm] Initialized drm 1.1.0 20060810
> [    0.670484] [drm] Memory usable by graphics device = 2048M
> [    0.670569] [drm] Replacing VGA console driver
> [    0.671121] Console: switching to colour dummy device 80x25
> [    0.689829] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
> 
> That may be a miscalculion/limitation for this system. Could this be a
> consequence of this systems Intel/Nvidia hybrid setup?

Does the fact that my kernel and os are built for 32bit pae limit the drm vram to less than that physically present i.e. limited to 2G in this case?
Comment 25 claus 2015-03-26 18:41:13 UTC
@Ilia ++

would it be any help for you if I provide a ssh access to a 940m notebook (i5 5200U) with any 64bit Linux for testing?
Comment 26 SMF 2015-03-29 09:03:59 UTC
(In reply to SMF from comment #24)
> (In reply to SMF from comment #23)
> > (In reply to SMF from comment #21)
> > > Using cpu-z on windows the graphics tab shows the Intel device as having 4GB
> > > and the Nvidia devices is reported as 1GB.
> > 
> > The literature that came with the laptop suggests that the VRAM is 4 GB
> > (NVIDIA GT840M 4 GB) so I think the answer is YES. My orginal hesitation
> > stems from the fact that the intel drm is reporting 2GB:
> > 
> > [    0.669881] Linux agpgart interface v0.103
> > [    0.669993] [drm] Initialized drm 1.1.0 20060810
> > [    0.670484] [drm] Memory usable by graphics device = 2048M
> > [    0.670569] [drm] Replacing VGA console driver
> > [    0.671121] Console: switching to colour dummy device 80x25
> > [    0.689829] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
> > 
> > That may be a miscalculion/limitation for this system. Could this be a
> > consequence of this systems Intel/Nvidia hybrid setup?
> 
> Does the fact that my kernel and os are built for 32bit pae limit the drm
> vram to less than that physically present i.e. limited to 2G in this case?

The value being returned by the intel driver is the GTT size not the total VRAM size (See explanation from Chris Wilson bug 89804).
Comment 27 SMF 2015-04-02 15:34:21 UTC
I have noticed that if the nouveau module is removed and re-added the second instance calculated the VRAM size correctly:

modprobe nouveau;rmmod nouveau;modprobe nouveau

Apr  2 16:15:20 Mars kernel: [   95.443268] ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:20 Mars kernel: [   95.443303] ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:20 Mars kernel: [   95.443400] i915 0000:00:02.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Apr  2 16:15:20 Mars kernel: [   95.443416] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:20 Mars kernel: [   95.443438] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:20 Mars kernel: [   95.443507] pci 0000:03:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Apr  2 16:15:20 Mars kernel: [   95.443508] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP05.PEGP handle
Apr  2 16:15:20 Mars kernel: [   95.443532] nouveau 0000:03:00.0: enabling device (0006 -> 0007)
Apr  2 16:15:20 Mars kernel: [   95.443681] nouveau  [  DEVICE][0000:03:00.0] BOOT0  : 0x118010a2
Apr  2 16:15:20 Mars kernel: [   95.443683] nouveau  [  DEVICE][0000:03:00.0] Chipset: GM107 (NV118)
Apr  2 16:15:20 Mars kernel: [   95.443685] nouveau  [  DEVICE][0000:03:00.0] Family : NV110
Apr  2 16:15:20 Mars kernel: [   95.447783] nouveau  [   VBIOS][0000:03:00.0] using image from ACPI
Apr  2 16:15:20 Mars kernel: [   95.447821] nouveau  [   VBIOS][0000:03:00.0] BIT signature found
Apr  2 16:15:20 Mars kernel: [   95.447823] nouveau  [   VBIOS][0000:03:00.0] version 82.08.13.00.1c
Apr  2 16:15:20 Mars kernel: [   95.448092] nouveau  [     PMC][0000:03:00.0] MSI interrupts enabled
Apr  2 16:15:20 Mars kernel: [   95.448145] nouveau  [     PFB][0000:03:00.0] RAM type: DDR3
Apr  2 16:15:20 Mars kernel: [   95.448147] nouveau  [     PFB][0000:03:00.0] RAM size: -1159778304 MiB
Apr  2 16:15:20 Mars kernel: [   95.448148] nouveau  [     PFB][0000:03:00.0]    ZCOMP: 0 tags
Apr  2 16:15:20 Mars kernel: [   95.486566] nouveau  [  PTHERM][0000:03:00.0] FAN control: none / external
Apr  2 16:15:20 Mars kernel: [   95.486579] nouveau  [  PTHERM][0000:03:00.0] internal sensor: no
Apr  2 16:15:20 Mars kernel: [   95.486618] nouveau  [     CLK][0000:03:00.0] 07: core 405 MHz memory 810 MHz 
Apr  2 16:15:20 Mars kernel: [   95.486674] nouveau  [     CLK][0000:03:00.0] 0a: core 270-1124 MHz memory 1600 MHz 
Apr  2 16:15:20 Mars kernel: [   95.486746] nouveau  [     CLK][0000:03:00.0] 0f: core 270-1124 MHz memory 2002 MHz 
Apr  2 16:15:20 Mars kernel: [   95.486874] nouveau  [     CLK][0000:03:00.0] --: core 13 MHz  
Apr  2 16:15:20 Mars kernel: [   95.517016] nouveau  [  PGRAPH][0000:03:00.0] using external firmware
Apr  2 16:15:20 Mars kernel: [   95.517393] request_firmware returned 0 (0xf15e5a84 'nouveau/nv118_fuc409c' 0xf2661864)
Apr  2 16:15:20 Mars kernel: [   95.517467] request_firmware returned 0 (0xf15e5a84 'nouveau/nv118_fuc409d' 0xf2661864)
Apr  2 16:15:20 Mars kernel: [   95.517658] request_firmware returned 0 (0xf15e5a84 'nouveau/nv118_fuc41ac' 0xf2661864)
Apr  2 16:15:20 Mars kernel: [   95.517727] request_firmware returned 0 (0xf15e5a84 'nouveau/nv118_fuc41ad' 0xf2661864)
Apr  2 16:15:20 Mars kernel: [   95.518153] vga_switcheroo: enabled
Apr  2 16:15:20 Mars kernel: [   95.518218] [TTM] Zone  kernel: Available graphics memory: 414084 kiB
Apr  2 16:15:20 Mars kernel: [   95.518219] [TTM] Zone highmem: Available graphics memory: 4098824 kiB
Apr  2 16:15:20 Mars kernel: [   95.518220] [TTM] Initializing pool allocator
Apr  2 16:15:20 Mars kernel: [   95.518226] nouveau  [     DRM] VRAM: -1159778304 MiB
Apr  2 16:15:20 Mars kernel: [   95.518227] nouveau  [     DRM] GART: 1048576 MiB
Apr  2 16:15:20 Mars kernel: [   95.518231] nouveau  [     DRM] DCB version 4.0
Apr  2 16:15:22 Mars kernel: [   97.537378] nouveau  [     DRM] MM: using COPY for buffer copies
Apr  2 16:15:22 Mars kernel: [   97.537398] [drm] Initialized nouveau 1.2.1 20120801 for 0000:03:00.0 on minor 1
Apr  2 16:15:27 Mars kernel: [  102.539882] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:27 Mars kernel: [  102.540090] ACPI: \_SB_.PCI0.RP05.PEGP: failed to evaluate _DSM
Apr  2 16:15:27 Mars kernel: [  102.540099] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:15:41 Mars kernel: [  117.332569] [TTM] Finalizing pool allocator
Apr  2 16:15:41 Mars kernel: [  117.332630] [TTM] Zone  kernel: Used memory at exit: 0 kiB
Apr  2 16:15:41 Mars kernel: [  117.332638] [TTM] Zone highmem: Used memory at exit: 0 kiB
Apr  2 16:15:41 Mars kernel: [  117.332644] vga_switcheroo: disabled
Apr  2 16:15:41 Mars kernel: [  117.335194] [drm] Module unloaded
Apr  2 16:17:01 Mars kernel: [  196.668965] ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:17:01 Mars kernel: [  196.669077] ACPI Warning: \_SB_.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:17:01 Mars kernel: [  196.669380] i915 0000:00:02.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Apr  2 16:17:01 Mars kernel: [  196.669441] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:17:01 Mars kernel: [  196.669526] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20141107/nsarguments-95)
Apr  2 16:17:01 Mars kernel: [  196.669793] pci 0000:03:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
Apr  2 16:17:01 Mars kernel: [  196.669798] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP05.PEGP handle
Apr  2 16:17:01 Mars kernel: [  196.670169] nouveau  [  DEVICE][0000:03:00.0] BOOT0  : 0x118010a2
Apr  2 16:17:01 Mars kernel: [  196.670175] nouveau  [  DEVICE][0000:03:00.0] Chipset: GM107 (NV118)
Apr  2 16:17:01 Mars kernel: [  196.670181] nouveau  [  DEVICE][0000:03:00.0] Family : NV110
Apr  2 16:17:01 Mars kernel: [  196.675480] nouveau  [   VBIOS][0000:03:00.0] using image from ACPI
Apr  2 16:17:01 Mars kernel: [  196.675518] nouveau  [   VBIOS][0000:03:00.0] BIT signature found
Apr  2 16:17:01 Mars kernel: [  196.675521] nouveau  [   VBIOS][0000:03:00.0] version 82.08.13.00.1c
Apr  2 16:17:01 Mars kernel: [  196.675704] nouveau  [     PMC][0000:03:00.0] MSI interrupts enabled
Apr  2 16:17:01 Mars kernel: [  196.675740] nouveau  [     PFB][0000:03:00.0] RAM type: DDR3
Apr  2 16:17:01 Mars kernel: [  196.675742] nouveau  [     PFB][0000:03:00.0] RAM size: 4096 MiB
Apr  2 16:17:01 Mars kernel: [  196.675744] nouveau  [     PFB][0000:03:00.0]    ZCOMP: 0 tags
Apr  2 16:17:01 Mars kernel: [  196.707235] nouveau  [  PTHERM][0000:03:00.0] FAN control: none / external
Apr  2 16:17:01 Mars kernel: [  196.707244] nouveau  [  PTHERM][0000:03:00.0] internal sensor: no
Apr  2 16:17:01 Mars kernel: [  196.707265] nouveau  [     CLK][0000:03:00.0] 07: core 405 MHz memory 810 MHz 
Apr  2 16:17:01 Mars kernel: [  196.707327] nouveau  [     CLK][0000:03:00.0] 0a: core 270-1124 MHz memory 1600 MHz 
Apr  2 16:17:01 Mars kernel: [  196.707406] nouveau  [     CLK][0000:03:00.0] 0f: core 270-1124 MHz memory 2002 MHz 
Apr  2 16:17:01 Mars kernel: [  196.707534] nouveau  [     CLK][0000:03:00.0] --: core 405 MHz memory 810 MHz 
Apr  2 16:17:01 Mars kernel: [  196.720937] nouveau  [  PGRAPH][0000:03:00.0] using external firmware
Apr  2 16:17:01 Mars kernel: [  196.720959] request_firmware returned 0 (0xf1a57a84 'nouveau/nv118_fuc409c' 0xf2661864)
Apr  2 16:17:01 Mars kernel: [  196.720972] request_firmware returned 0 (0xf1a57a84 'nouveau/nv118_fuc409d' 0xf2661864)
Apr  2 16:17:01 Mars kernel: [  196.720980] request_firmware returned 0 (0xf1a57a84 'nouveau/nv118_fuc41ac' 0xf2661864)
Apr  2 16:17:01 Mars kernel: [  196.720987] request_firmware returned 0 (0xf1a57a84 'nouveau/nv118_fuc41ad' 0xf2661864)
Apr  2 16:17:01 Mars kernel: [  196.721191] vga_switcheroo: enabled
Apr  2 16:17:01 Mars kernel: [  196.721256] [TTM] Zone  kernel: Available graphics memory: 414084 kiB
Apr  2 16:17:01 Mars kernel: [  196.721257] [TTM] Zone highmem: Available graphics memory: 4098824 kiB
Apr  2 16:17:01 Mars kernel: [  196.721258] [TTM] Initializing pool allocator
Apr  2 16:17:01 Mars kernel: [  196.721265] nouveau  [     DRM] VRAM: 4096 MiB
Apr  2 16:17:01 Mars kernel: [  196.721266] nouveau  [     DRM] GART: 1048576 MiB
Apr  2 16:17:01 Mars kernel: [  196.721270] nouveau  [     DRM] DCB version 4.0
Apr  2 16:17:01 Mars kernel: [  196.729665] nouveau  [     DRM] MM: using COPY for buffer copies
Apr  2 16:17:01 Mars kernel: [  196.729670] [drm] Initialized nouveau 1.2.1 20120801 for 0000:03:00.0 on minor 1

Two further points the second instance causes the laptop to lockup (unsurprisingly) and secondly is the GART value correct ?
Comment 28 Emil Velikov 2015-04-05 17:16:05 UTC
Small side note: the negative amount of ram as hex reads as 0xBADF3000. Although what makes me curious is why PBUS (or the equivalent sub-device for this chipset) does not produce a warning/intr.
Comment 29 claus 2015-04-08 05:54:16 UTC
nvidia just released a 940m Linux driver:
http://www.geforce.com/drivers/results/83686
Comment 30 Ben Skeggs 2015-05-21 05:20:02 UTC
(In reply to SMF from comment #27)
> I have noticed that if the nouveau module is removed and re-added the second
> instance calculated the VRAM size correctly:
> 
> modprobe nouveau;rmmod nouveau;modprobe nouveau
Can you please grab a mmiotrace of attempting to load nouveau the first time?  Perhaps also grab the second time too for comparison.

Thanks,
Ben.
Comment 31 Ben Skeggs 2015-05-21 05:32:19 UTC
(In reply to Ben Skeggs from comment #30)
> (In reply to SMF from comment #27)
> > I have noticed that if the nouveau module is removed and re-added the second
> > instance calculated the VRAM size correctly:
> > 
> > modprobe nouveau;rmmod nouveau;modprobe nouveau
> Can you please grab a mmiotrace of attempting to load nouveau the first
> time?  Perhaps also grab the second time too for comparison.
> 
> Thanks,
> Ben.

Also, another thing worth trying in the meantime is adding "nouveau.config=NvForcePost=1" to your kernel config options.
Comment 32 Ben Skeggs 2015-05-21 05:47:58 UTC
(In reply to Ben Skeggs from comment #31)
> (In reply to Ben Skeggs from comment #30)
> > (In reply to SMF from comment #27)
> > > I have noticed that if the nouveau module is removed and re-added the second
> > > instance calculated the VRAM size correctly:
> > > 
> > > modprobe nouveau;rmmod nouveau;modprobe nouveau
> > Can you please grab a mmiotrace of attempting to load nouveau the first
> > time?  Perhaps also grab the second time too for comparison.
> > 
> > Thanks,
> > Ben.
> 
> Also, another thing worth trying in the meantime is adding
> "nouveau.config=NvForcePost=1" to your kernel config options.

Even better, try this commit (and the previous one):

http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=cf5c2a749912102055844b51a40b3ef64210afe6
Comment 33 SMF 2015-05-22 08:27:43 UTC
Created attachment 115969 [details]
kernel 4.0.4 nouveau driver with patches applied

Ben,

Applying the two patches you suggested allows the GM108 to initialise and calculate the correct VRAM size (see attached log from 4.0.4 kernel).

thanks
Stuart.
Comment 34 SMF 2015-05-25 17:11:06 UTC
Created attachment 116031 [details]
kernel 4.1-rc5 nouveau driver with patches applied

For interest tested patches against kernel 4.1-rc5 (with nouveau debug on).
Comment 35 SMF 2015-06-01 12:24:33 UTC
Created attachment 116199 [details]
Kernel 4.1-rc6 (with 0x118 added to gm100.c)

Results with kernel 4.1-rc6.
Comment 36 SMF 2015-06-27 18:18:08 UTC
Interesting that the GM108 (0x118) appears to be not included in the reference headers supplied recently by Nvidia.

ref:

github.com/kfractal/nouveau/commit/0d942ce1fd1c0eaf70cdb6bf8633e982f0fe1922
Comment 37 martin 2015-07-17 15:43:33 UTC
Hi,
I´m having exactly the same issue here on a Dell E5450 with Intel HD5500 and Nvidia GeForce 830M. First on Ubuntu, I also tried on Arch with Kernel 4.1.2 from the Testing Repo --> No change so far. At bootup I still see Nouveau errors complaining about an unknown Maxwell chipset. 

I´m not a coder but if there are any logfiles or some terminal commands I can try to contribute I´m happy to help!

Martin
Comment 38 Andrei Borzenkov 2015-09-29 17:19:18 UTC
There is no gm100.c anymore in nouveau tree. Are any patches available that we could test? If it matters, primary use case is bumblebee, so just as rendering engine.
Comment 40 Andrei Borzenkov 2015-09-30 19:03:48 UTC
Using current kernel.org git as of dd36d7393d6310b0c1adefb22fba79c3cf8a577c and adding 0x118 to select 0x117 driver I get

[   67.595247] nouveau: module verification failed: signature and/or required key missing - tainting kernel
[   67.601091] MXM: GUID detected in BIOS
[   67.601144] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
[   67.601182] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
[   67.601330] pci 0000:03:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[   67.601331] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.RP05.PEGP handle
[   67.601380] nouveau 0000:03:00.0: enabling device (0006 -> 0007)
[   67.601421] nouveau 0000:03:00.0: NVIDIA GM107 (118000a2)
[   67.614439] nouveau 0000:03:00.0: bios: version 82.08.18.00.2a
[   67.698727] nouveau 0000:03:00.0: fb: 2048 MiB DDR3
[   67.698759] nouveau 0000:03:00.0: priv: HUB0: 6013d4 00005730 (1b408200)
[   67.698795] nouveau 0000:03:00.0: priv: HUB0: 10ecc0 ffffffff (1840822c)
[   68.975809] vga_switcheroo: enabled
[   68.975924] [TTM] Zone  kernel: Available graphics memory: 4031282 kiB
[   68.975925] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[   68.975936] [TTM] Initializing pool allocator
[   68.975940] [TTM] Initializing DMA pool allocator
[   68.975950] nouveau 0000:03:00.0: DRM: VRAM: 2048 MiB
[   68.975951] nouveau 0000:03:00.0: DRM: GART: 1048576 MiB
[   68.975953] nouveau 0000:03:00.0: DRM: Pointer to TMDS table invalid
[   68.975955] nouveau 0000:03:00.0: DRM: DCB version 4.0
[   68.975956] nouveau 0000:03:00.0: DRM: Pointer to flat panel table invalid
[   69.132692] nouveau 0000:03:00.0: DRM: MM: using COPY for buffer copies
[   69.132701] [drm] Initialized nouveau 1.3.0 20120801 for 0000:03:00.0 on minor 1

/dev/dri nodes are correctly created for a second card. Unfortunately attempt to actually run something on secondary GPU results in

[   184.755] (II) [drm] nouveau interface version: 1.3.0
[   184.755] (EE) Unknown chipset: NV118

While running up to date kernel is easy, getting up to date Xorg is probably more challenging (I'm writing this on Ubuntu 14.04). But kernel side looks promising. Please let me know if you need any additional logs from nouveau or nVidia driver.
Comment 41 Ilia Mirkin 2015-09-30 19:18:41 UTC
(In reply to Andrei Borzenkov from comment #40)
> /dev/dri nodes are correctly created for a second card. Unfortunately
> attempt to actually run something on secondary GPU results in
> 
> [   184.755] (II) [drm] nouveau interface version: 1.3.0
> [   184.755] (EE) Unknown chipset: NV118

The nouveau DDX won't do anything useful for maxwell. Use the modesetting driver. Do note that there are known problems with GLAMOR.

But chances are there are no outputs on the GM108 anyways, so that won't be an issue.
Comment 42 Andrei Borzenkov 2015-09-30 19:55:23 UTC
(In reply to Ilia Mirkin from comment #41)
> Use the modesetting driver.

Does not work - I do not get any output (but as said, I have quite dated Xorg). Anyway, the whole point of Optimus systems is to use discrete GPU for hardware acceleration; using generic driver seems to defeat it ...
Comment 43 Ilia Mirkin 2015-09-30 20:00:36 UTC
(In reply to Andrei Borzenkov from comment #42)
> (In reply to Ilia Mirkin from comment #41)
> > Use the modesetting driver.
> 
> Does not work - I do not get any output (but as said, I have quite dated
> Xorg). Anyway, the whole point of Optimus systems is to use discrete GPU for
> hardware acceleration; using generic driver seems to defeat it ...

How so?

With a modern Xorg you should be able to do 3 things:

(a) use modesetting + glamor on any hardware with libGL support to get X operation acceleration [which is not something you care about since you're not going to use the GM108 as a primary]
(b) use xrandr-based gpu offloading to get DRI2 offloading with DRI_PRIME=1
(c) use DRI3-based offloading with DRI_PRIME=1 assuming your intel ddx has that enabled

Note how nowhere in there is there any mention of a nouveau ddx.
Comment 44 SMF 2015-10-01 18:49:49 UTC
Created attachment 118577 [details]
Patch to enable partiial initialisation of Nouveau on Linux 4.3-rc3

If this is of any use to anyone the attached patch allows me to get the following initialisation on Linux 4.3-rc3.

[    2.961084] nouveau 0000:03:00.0: NVIDIA GM108 (118010a2)
[    3.178080] nouveau 0000:03:00.0: bios: version 82.08.13.00.1c
[    3.262110] nouveau 0000:03:00.0: fb: 4096 MiB DDR3
[    3.262127] nouveau 0000:03:00.0: priv: HUB0: 6013d4 0000573f (1e408200)
[    3.262173] nouveau 0000:03:00.0: priv: HUB0: 10ecc0 ffffffff (1d40822c)
[    3.297714] nouveau 0000:03:00.0: DRM: VRAM: 4096 MiB
[    3.297716] nouveau 0000:03:00.0: DRM: GART: 1048576 MiB
[    3.297718] nouveau 0000:03:00.0: DRM: Pointer to TMDS table invalid
[    3.297719] nouveau 0000:03:00.0: DRM: DCB version 4.0
[    3.297721] nouveau 0000:03:00.0: DRM: Pointer to flat panel table invalid
[    3.442864] nouveau 0000:03:00.0: DRM: MM: using COPY for buffer copies
[    3.442875] [drm] Initialized nouveau 1.3.0 20120801 for 0000:03:00.0 on minor 1
[    8.443777] nouveau 0000:03:00.0: DRM: evicting buffers...
[    8.443783] nouveau 0000:03:00.0: DRM: waiting for kernel channels to go idle...
[    8.443809] nouveau 0000:03:00.0: DRM: suspending client object trees...
[    8.445664] nouveau 0000:03:00.0: DRM: suspending kernel object tree...
[   21.947649] nouveau 0000:03:00.0: DRM: resuming kernel object tree...
[   22.031416] nouveau 0000:03:00.0: priv: HUB0: 6013d4 ffffffff (1a40822c)
[   22.072390] nouveau 0000:03:00.0: DRM: resuming client object trees...
[   27.371262] nouveau 0000:03:00.0: DRM: evicting buffers...
[   27.371269] nouveau 0000:03:00.0: DRM: waiting for kernel channels to go idle...
[   27.371296] nouveau 0000:03:00.0: DRM: suspending client object trees...
[   27.373164] nouveau 0000:03:00.0: DRM: suspending kernel object tree...
Comment 45 Marco Trevisan (Treviño) 2016-04-20 03:40:12 UTC
Nvidia 940MX is affected as well:

02:00.0 3D controller: NVIDIA Corporation Device 134d (rev a2)

[32394.818085] pci 0000:02:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[32394.818087] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG2.PEGP handle
[32394.818170] nouveau 0000:02:00.0: unknown chipset (1180d0a2)
[32394.818199] nouveau: probe of 0000:02:00.0 failed with error -12
Comment 46 Marco Trevisan (Treviño) 2016-04-20 04:02:02 UTC
Created attachment 123084 [details]
kernel 4.4 - dmesg: 950MX SMF 108 patch

Trying the patch by SMF gives out more or less the same output:

[34924.970827] pci 0000:02:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[34924.970830] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG2.PEGP handle
[34924.970935] nouveau 0000:02:00.0: NVIDIA GM108 (1180d0a2)
[34924.995153] nouveau 0000:02:00.0: bios: version 82.08.57.00.22
[34925.039282] nouveau 0000:02:00.0: fb: 2048 MiB DDR3
[34925.039291] nouveau 0000:02:00.0: priv: HUB0: 1200a0 00000001 (19408217)
[34925.039333] nouveau 0000:02:00.0: priv: HUB0: 10ecc0 ffffffff (1e40822c)
[34926.318695] vga_switcheroo: enabled
[34926.318863] [TTM] Zone  kernel: Available graphics memory: 16119644 kiB
[34926.318880] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[34926.318881] [TTM] Initializing pool allocator
[34926.318892] [TTM] Initializing DMA pool allocator
[34926.318899] nouveau 0000:02:00.0: DRM: VRAM: 2048 MiB
[34926.318900] nouveau 0000:02:00.0: DRM: GART: 1048576 MiB
[34926.318902] nouveau 0000:02:00.0: DRM: Pointer to TMDS table invalid
[34926.318904] nouveau 0000:02:00.0: DRM: DCB version 4.0
[34926.318905] nouveau 0000:02:00.0: DRM: Pointer to flat panel table invalid
[34926.435387] nouveau 0000:02:00.0: DRM: MM: using COPY for buffer copies
[34926.435394] [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on minor 

See also attached dmesg
Comment 47 Ben Skeggs 2016-04-20 04:55:11 UTC
(In reply to Marco Trevisan (Treviño) from comment #46)
> Created attachment 123084 [details]
> kernel 4.4 - dmesg: 950MX SMF 108 patch
> 
> Trying the patch by SMF gives out more or less the same output:
> 
> [34924.970827] pci 0000:02:00.0: optimus capabilities: enabled, status
> dynamic power, hda bios codec supported
> [34924.970830] VGA switcheroo: detected Optimus DSM method
> \_SB_.PCI0.PEG2.PEGP handle
> [34924.970935] nouveau 0000:02:00.0: NVIDIA GM108 (1180d0a2)
> [34924.995153] nouveau 0000:02:00.0: bios: version 82.08.57.00.22
> [34925.039282] nouveau 0000:02:00.0: fb: 2048 MiB DDR3
> [34925.039291] nouveau 0000:02:00.0: priv: HUB0: 1200a0 00000001 (19408217)
> [34925.039333] nouveau 0000:02:00.0: priv: HUB0: 10ecc0 ffffffff (1e40822c)
> [34926.318695] vga_switcheroo: enabled
> [34926.318863] [TTM] Zone  kernel: Available graphics memory: 16119644 kiB
> [34926.318880] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
> [34926.318881] [TTM] Initializing pool allocator
> [34926.318892] [TTM] Initializing DMA pool allocator
> [34926.318899] nouveau 0000:02:00.0: DRM: VRAM: 2048 MiB
> [34926.318900] nouveau 0000:02:00.0: DRM: GART: 1048576 MiB
> [34926.318902] nouveau 0000:02:00.0: DRM: Pointer to TMDS table invalid
> [34926.318904] nouveau 0000:02:00.0: DRM: DCB version 4.0
> [34926.318905] nouveau 0000:02:00.0: DRM: Pointer to flat panel table invalid
> [34926.435387] nouveau 0000:02:00.0: DRM: MM: using COPY for buffer copies
> [34926.435394] [drm] Initialized nouveau 1.3.1 20120801 for 0000:02:00.0 on
> minor 
> 
> See also attached dmesg

Can you also run something with "DRI_PRIME=1" (to use the NVIDIA GPU) and see if you get any additional dmesg output from nouveau?

I've been looking at an older GM108 trace to try and add support for it (I don't have the hw myself), and see some things in that that need fixing and should cause errors from the hw if the graphics engine is used.

Thanks,
Ben.
Comment 48 Marco Trevisan (Treviño) 2016-04-20 05:10:13 UTC
Nothing particular.
Enabling debug option, when running glxgears (which indeed gets a speedup) I just get things such as:

[39145.588483] nouveau: DRM:00000000:00000002: suspend children...
[39145.588486] nouveau: DRM:00000000:00000002: suspend running...
[39145.588488] nouveau: DRM:00000000:00000002: suspend completed in 3us
[39145.588491] nouveau: DRM:00000000:00000080: suspend running...
[39146.089636] nouveau: DRM:00000000:00000080: suspend completed in 501355us
[39146.089638] nouveau: DRM:00000000:00000000: suspend running...
[39146.089638] nouveau: DRM:00000000:00000000: suspend completed in 501363us
Comment 49 Asad Mehmood 2016-04-26 10:56:19 UTC
Not sure if correct bug bu
lspci:
07:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
	Subsystem: Hewlett-Packard Company Device 21a0
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at b5000000 (32-bit, non-prefetchable) [size=16M]
	Memory at a0000000 (64-bit, prefetchable) [size=256M]
	Memory at b0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 5000 [size=128]
	Expansion ROM at <ignored> [disabled]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19
	Kernel modules: nouveau

using rawhide, with nouveau skeggsb:master

insmod nouveau.ko runpm=0
sleep 10
rmmod nouveau.ko

dmesg:
[  154.072779] nouveau: module verification failed: signature and/or required key missing - tainting kernel
[  154.186565] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[  154.186825] ACPI Warning: \_SB.PCI0.GFX0._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[  154.187853] i915 0000:00:02.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[  154.187972] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[  154.188213] ACPI Warning: \_SB.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20160108/nsarguments-95)
[  154.189673] pci 0000:07:00.0: optimus capabilities: enabled, status dynamic power, hda bios codec supported
[  154.189681] VGA switcheroo: detected Optimus DSM method \_SB_.PCI0.PEG0.PEGP handle
[  154.189777] nouveau 0000:07:00.0: enabling device (0006 -> 0007)
[  154.190144] nouveau 0000:07:00.0: NVIDIA GM108 (118010a2)
[  154.209966] nouveau 0000:07:00.0: bios: version 82.08.14.00.0e
[  154.301465] nouveau 0000:07:00.0: priv: HUB0: 6013d4 00005723 (1d408200)
[  154.301583] nouveau 0000:07:00.0: fb: 2048 MiB DDR3
[  154.301920] nouveau 0000:07:00.0: priv: HUB0: 10ecc0 ffffffff (1d40822c)
[  154.339347] vga_switcheroo: enabled
[  154.341211] [TTM] Zone  kernel: Available graphics memory: 4036698 kiB
[  154.341213] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[  154.341215] [TTM] Initializing pool allocator
[  154.341267] [TTM] Initializing DMA pool allocator
[  154.341487] nouveau 0000:07:00.0: DRM: VRAM: 2048 MiB
[  154.341490] nouveau 0000:07:00.0: DRM: GART: 1048576 MiB
[  154.341493] nouveau 0000:07:00.0: DRM: Pointer to TMDS table invalid
[  154.341495] nouveau 0000:07:00.0: DRM: DCB version 4.0
[  154.341497] nouveau 0000:07:00.0: DRM: Pointer to flat panel table invalid
[  154.403182] nouveau 0000:07:00.0: fifo: write fault at 0000102000 engine 05 [BAR2] client 08 [HOST_CPU_NB] reason 02 [PTE] on channel -1 [007fd76000 unknown]
[  154.466319] nouveau 0000:07:00.0: fifo: read fault at 0000100000 engine 04 [BAR1] client 07 [HOST_CPU] reason 00 [PDE] on channel -1 [007fd5d000 unknown]
[  154.466333] nouveau 0000:07:00.0: fifo: PBDMA1: 80060000 [PBPTR PBENTRY SIGNATURE] ch 0 [007fb84000 DRM] subc 0 mthd 0000 data 00000000
[  154.466439] nouveau 0000:07:00.0: fifo: PBDMA1: 00820000 [PBPTR DEVICE] ch 0 [007fb84000 DRM] subc 7 mthd 3bec data 03000302
[  154.466458] nouveau 0000:07:00.0: fifo: read fault at fffebf5000 engine 0b [HOST4] client 06 [HOST] reason 03 [VA_LIMIT_VIOLATION] on channel 0 [007fb84000 DRM]
[  154.492673] nouveau 0000:07:00.0: fifo: PBDMA0: 80020000 [PBPTR SIGNATURE] ch 0 [007fb84000 DRM] subc 7 mthd 3ffc data ffffdfff
[  154.492695] nouveau 0000:07:00.0: fifo: read fault at 0000100000 engine 04 [BAR1] client 07 [HOST_CPU] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  154.492705] nouveau 0000:07:00.0: fifo: PBDMA0: 00020000 [PBPTR] ch 0 [007fb84000 DRM] subc 0 mthd 0000 data 00000000
[  154.492720] nouveau 0000:07:00.0: fifo: read fault at fffebf5000 engine 07 [HOST0] client 06 [HOST] reason 03 [VA_LIMIT_VIOLATION] on channel 0 [007fb84000 DRM]
[  154.492966] nouveau 0000:07:00.0: DRM: MM: using COPY for buffer copies
[  154.492977] [drm] Initialized nouveau 1.3.1 20120801 for 0000:07:00.0 on minor 1
[  154.492984] nouveau 0000:07:00.0: fifo: write fault at 0000000000 engine 04 [BAR1] client 08 [HOST_CPU_NB] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  164.555908] nouveau 0000:07:00.0: fifo: write fault at 0000000000 engine 04 [BAR1] client 08 [HOST_CPU_NB] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  164.556029] nouveau 0000:07:00.0: fifo: read fault at 0000100000 engine 04 [BAR1] client 07 [HOST_CPU] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  164.556068] nouveau 0000:07:00.0: fifo: write fault at 0000100000 engine 04 [BAR1] client 08 [HOST_CPU_NB] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  164.572192] nouveau 0000:07:00.0: fifo: write fault at 0000000000 engine 04 [BAR1] client 08 [HOST_CPU_NB] reason 0c [UNSUPPORTED_KIND] on channel -1 [007fd5d000 unknown]
[  164.572210] nouveau 0000:07:00.0: fifo: DROPPED_MMU_FAULT 00000000
[  164.591364] [TTM] Finalizing pool allocator
[  164.591643] [TTM] Finalizing DMA pool allocator
[  164.593527] [TTM] Zone  kernel: Used memory at exit: 0 kiB
[  164.593545] [TTM] Zone   dma32: Used memory at exit: 0 kiB
[  164.593570] vga_switcheroo: disabled
[  164.605845] [drm] Module unloaded
[  165.290184] irq 17: nobody cared (try booting with the "irqpoll" option)
[  165.290190] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           OE   4.6.0-0.rc4.git3.1.fc25.x86_64 #1
[  165.290192] Hardware name: Hewlett-Packard HP ENVY TS 15 Notebook PC/1967, BIOS F.66 09/22/2015
[  165.290194]  0000000000000086 41e7614639a7b651 ffff880255e03e38 ffffffff81459d15
[  165.290197]  ffff8802524eee00 ffff8802524eeea0 ffff880255e03e68 ffffffff8112b185
[  165.290200]  ffff8802524eee00 0000000000000000 0000000000000011 ffffffff81fb6980
[  165.290202] Call Trace:
[  165.290204]  <IRQ>  [<ffffffff81459d15>] dump_stack+0x86/0xc1
[  165.290212]  [<ffffffff8112b185>] __report_bad_irq+0x35/0xc0
[  165.290214]  [<ffffffff8112b504>] note_interrupt+0x234/0x270
[  165.290216]  [<ffffffff811285b3>] handle_irq_event_percpu+0x243/0x370
[  165.290218]  [<ffffffff81128719>] handle_irq_event+0x39/0x60
[  165.290220]  [<ffffffff8112bbaf>] handle_fasteoi_irq+0x8f/0x160
[  165.290223]  [<ffffffff81038526>] handle_irq+0x76/0x130
[  165.290226]  [<ffffffff818d0601>] do_IRQ+0x61/0x120
[  165.290229]  [<ffffffff818ce3d6>] common_interrupt+0x96/0x96
[  165.290230]  <EOI>  [<ffffffff817270ca>] ? cpuidle_enter_state+0x11a/0x370
[  165.290235]  [<ffffffff817270c3>] ? cpuidle_enter_state+0x113/0x370
[  165.290237]  [<ffffffff81727357>] cpuidle_enter+0x17/0x20
[  165.290240]  [<ffffffff8110503a>] call_cpuidle+0x2a/0x50
[  165.290242]  [<ffffffff81105489>] cpu_startup_entry+0x2f9/0x420
[  165.290244]  [<ffffffff8105af93>] start_secondary+0x173/0x1b0
[  165.290246] handlers:
[  165.290248] [<ffffffff81663fc0>] usb_hcd_irq
[  165.290250] Disabling IRQ #17


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.