Bug 70208 - Nouveau driver doesn't find vbios for Geforce GT 750M on Asus N750JV laptop
Summary: Nouveau driver doesn't find vbios for Geforce GT 750M on Asus N750JV laptop
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-06 18:42 UTC by Joey 4712
Modified: 2013-11-09 20:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Full dmesg when trying to modprobe the nouveau driver (70.74 KB, text/plain)
2013-10-06 18:43 UTC, Joey 4712
no flags Details
Full dmesg when using the nvidia driver (73.96 KB, text/plain)
2013-10-06 18:44 UTC, Joey 4712
no flags Details
retry 16 times to retrieve the vbios from ACPI (3.28 KB, patch)
2013-10-06 19:46 UTC, Emil Velikov
no flags Details | Splinter Review
Full dmesg with patch from attachment 87207 applied (70.74 KB, text/plain)
2013-10-06 20:45 UTC, Joey 4712
no flags Details
count DISPLAY_3D devices while considering dsm/optimus presence (1.07 KB, patch)
2013-10-06 21:42 UTC, Emil Velikov
no flags Details | Splinter Review
Full dmesg with the count DISPLAY_3D devices patch (73.61 KB, text/plain)
2013-10-06 21:51 UTC, Joey 4712
no flags Details
Full dmesg with the count DISPLAY_3D devices and starting X (77.53 KB, text/plain)
2013-10-06 21:55 UTC, Joey 4712
no flags Details
Full dmesg with additional stub opcode 0xaa patch (72.49 KB, text/plain)
2013-10-06 22:11 UTC, Joey 4712
no flags Details
cleaner approach to patch 87214 (2.16 KB, patch)
2013-10-06 23:11 UTC, Emil Velikov
no flags Details | Splinter Review
Xorg.0.log with Error initialising acceleration message (59.44 KB, text/plain)
2013-10-07 10:43 UTC, Joey 4712
no flags Details

Description Joey 4712 2013-10-06 18:42:06 UTC
When modprobing the nouveau module I get the following dmesg output: (driver not able to find the vbios)

[ 1001.055090] MXM: GUID detected in BIOS
[ 1001.055508] nouveau  [  DEVICE][0000:01:00.0] BOOT0  : 0x0e7240a2
[ 1001.055511] nouveau  [  DEVICE][0000:01:00.0] Chipset: GK107 (NVE7)
[ 1001.055512] nouveau  [  DEVICE][0000:01:00.0] Family : NVE0
[ 1001.057047] nouveau  [   VBIOS][0000:01:00.0] checking PRAMIN for image...
[ 1001.057056] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
[ 1001.057057] nouveau  [   VBIOS][0000:01:00.0] checking PROM for image...
[ 1001.057109] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
[ 1001.057109] nouveau  [   VBIOS][0000:01:00.0] checking ACPI for image...
[ 1001.057110] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
[ 1001.057111] nouveau  [   VBIOS][0000:01:00.0] checking PCIROM for image...
[ 1001.057164] nouveau 0000:01:00.0: Invalid ROM contents
[ 1001.057188] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
[ 1001.057189] nouveau  [   VBIOS][0000:01:00.0] checking PLATFORM for image...
[ 1001.057190] nouveau  [   VBIOS][0000:01:00.0] ... signature not found
[ 1001.057191] nouveau E[   VBIOS][0000:01:00.0] unable to locate usable image
[ 1001.057210] nouveau E[  DEVICE][0000:01:00.0] failed to create 0x10000001, -22
[ 1001.057229] nouveau E[     DRM] failed to create 0x80000080, -22
[ 1001.057388] nouveau: probe of 0000:01:00.0 failed with error -22

The nvidia GPU will then not be detected by X.

The nvidia blob driver is working on the same machine.
Comment 1 Joey 4712 2013-10-06 18:43:44 UTC
Created attachment 87204 [details]
Full dmesg when trying to modprobe the nouveau driver
Comment 2 Joey 4712 2013-10-06 18:44:29 UTC
Created attachment 87205 [details]
Full dmesg when using the nvidia driver
Comment 3 Emil Velikov 2013-10-06 19:36:42 UTC
From the MMIO trace - the binary driver seems to be retrying in a very unusual manner to retrieve the vbios from ACPI.
[mem 0x00000000c9e25000-0x00000000cab27fff] ACPI NVS


acpi_vbios() {
  W 0x088050 0x00000000 PPCI.ROM_SHADOW_ENABLE <= 0

  origin = 0xc9eca000;
  size = 0x1000;

  MAP $origin $size
  UNMAP

  base = origin;

  for (i = 0; i < ??; i++) {
    for (j = 0; j < 8; j++) {
      for (k = 1; k <= 8; k++) {
        MAP $base+(k*$size) $size
        UNMAP
      }
      MAP $base $size
      SLEEP 0.182000ms
      UNMAP
    }
    base += 8*$size;
  }
}

Not entirely sure if it succeeds though, but after this sequence it seems to be doing all sorts of stupid stuff as init script tables do.
  R 0x000000 0x0e7240a2 PMC.ID
  W 0x000000 0x0e7240a2 
etc.
Comment 4 Emil Velikov 2013-10-06 19:46:08 UTC
Created attachment 87207 [details] [review]
retry 16 times to retrieve the vbios from ACPI

Give this patch a try, and attach the resulting dmesg. Thanks
Comment 5 Joey 4712 2013-10-06 20:45:20 UTC
Created attachment 87210 [details]
Full dmesg with patch from attachment 87207 [details] [review] applied

In addition to the patch an additional line of debug output was added which shows the "JOEY: Yes this is the patched module"... Please just ignore this line of debug output in the dmesg :-)
Comment 6 Emil Velikov 2013-10-06 21:42:30 UTC
Created attachment 87214 [details] [review]
count DISPLAY_3D devices while considering dsm/optimus presence
Comment 7 Joey 4712 2013-10-06 21:51:22 UTC
Created attachment 87215 [details]
Full dmesg with the count DISPLAY_3D devices patch
Comment 8 Joey 4712 2013-10-06 21:55:28 UTC
Created attachment 87216 [details]
Full dmesg with the count DISPLAY_3D devices and starting X

When starting X with the patch it now crashes. See dmesg for details.
Comment 9 Emil Velikov 2013-10-06 21:58:26 UTC
Feel free to try the DISPLAY_3D patch and make sure that you have

From 5495e39fb3695182b9f2a72fe4169056cada37a1 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@redhat.com>
Date: Tue, 10 Sep 2013 02:11:01 +0000
Subject: drm/nouveau/bios/init: stub opcode 0xaa
Comment 10 Joey 4712 2013-10-06 22:11:34 UTC
Created attachment 87217 [details]
Full dmesg with additional stub opcode 0xaa patch

In addition to the count DISPLAY_RD devices patch now I applied this patch:

http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?h=drm-nouveau-next&id=5495e39fb3695182b9f2a72fe4169056cada37a1
Comment 11 Joey 4712 2013-10-06 22:17:51 UTC
Good news: with the "count DISPLAY_3D devices" patch and http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?h=drm-nouveau-next&id=5495e39fb3695182b9f2a72fe4169056cada37a1 applied nouveau loads successfully and I can now also start X without crashing.
Comment 12 Emil Velikov 2013-10-06 23:11:18 UTC
Created attachment 87218 [details] [review]
cleaner approach to patch 87214

Another patch that does the same thing, without iterating though all the pci devices twice :) Currently only VGA and 3D devices are selected via the mask, although it may be easily changed in the future :)
Comment 13 Joey 4712 2013-10-06 23:12:55 UTC
Tested about 30 minutes running things with "DRI_PRIME=1 someprogramm" and everything is working fine now. Also running full gnome 3 session with DRI_PRIME=1 now.
Comment 14 Joey 4712 2013-10-06 23:19:38 UTC
Note: I did not test it with the newer patch 87218 yet. (will do so during the next days if I find the time)
Comment 15 Joey 4712 2013-10-07 10:41:28 UTC
Spoken too soon :-)

By accident I also "fixed" my haswell's internal intel DRI and so the system is now running much faster than before, but still powered by the intel's rendering.

I'm surprised how fast the build in haswell's intel rendering is already :-)


But for the nouveau: It fails to initialise the acceleration, as far as I can see.

The /var/log/Xorg.0.log shows: (i will attach the full log)

[    75.892] (II) NOUVEAU(G0): Opened GPU channel 0
[    77.893] (EE) NOUVEAU(G0): Failed to initialise context object: 2D_NVC0 (0)
[    77.893] (EE) NOUVEAU(G0): Error initialising acceleration.  Falling back to NoAccel
[    77.893] (==) NOUVEAU(G0): Backing store disabled
[    77.893] (==) NOUVEAU(G0): Silken mouse enabled
[    77.893] (==) NOUVEAU(G0): DPMS enabled
[    77.893] (II) NOUVEAU(G0): RandR 1.2 enabled, ignore the following RandR disabled message.


And so "DRI_PRIME=1 glxinfo | grep OpenGL" shows that it is running on intel only:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 3.1 (Core Profile) Mesa 9.2.0
OpenGL core profile shading language version string: 1.40
OpenGL core profile context flags: (none)
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 9.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
Comment 16 Joey 4712 2013-10-07 10:43:07 UTC
Created attachment 87232 [details]
Xorg.0.log with Error initialising acceleration message
Comment 17 Emil Velikov 2013-10-07 14:48:11 UTC
Joey can we keep one bug per report please. It's quite easy to jump on the wagon and describe any issue and/or glitch within the same report, but it's never a good idea :)

Thanks
Comment 18 Joey 4712 2013-10-07 15:19:32 UTC
Emil, you're right, sorry ... As the subject from this report already tells this one is about the vbios issue which is already solved by the patch and we should have a look at the other issue separately :-) (Will try to check this on IRC and open a new bug if required)
Comment 19 Fred New 2013-10-08 07:16:54 UTC
FWIW, I had problem building the kernel with the second version of the patch (87214) for Fedora 20 beta TC1 using rpmbuild, but then I'm a lightweight when it comes to actual programming:

drivers/gpu/drm/nouveau/nouveau_acpi.c: In function 'nouveau_pci_get_class_masked':
drivers/gpu/drm/nouveau/nouveau_acpi.c:276:2: error: implicit declaration of function 'pci_get_dev_by_id' [-Werror=implicit-function-declaration]
  return pci_get_dev_by_id(&id, from);
  ^
drivers/gpu/drm/nouveau/nouveau_acpi.c:276:2: warning: return makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
make[4]: *** [drivers/gpu/drm/nouveau/nouveau_acpi.o] Error 1
make[3]: *** [drivers/gpu/drm/nouveau] Error 2
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
Comment 20 Fred New 2013-10-08 07:31:21 UTC
Oops, make that patch 87218 that had the problem.
Comment 21 Emil Velikov 2013-10-08 07:49:33 UTC
Ouch, yes. Seems like the function pci_get_dev_by_id() in undefined outside of drivers/pci

In that case I see two solution - iterate through each device type (vga/3d) or making the symbol accessible at a larger scale.
Comment 22 Ilia Mirkin 2013-10-10 20:38:37 UTC
(In reply to comment #15)
> But for the nouveau: It fails to initialise the acceleration, as far as I
> can see.
> 
> The /var/log/Xorg.0.log shows: (i will attach the full log)
> 
> [    75.892] (II) NOUVEAU(G0): Opened GPU channel 0
> [    77.893] (EE) NOUVEAU(G0): Failed to initialise context object: 2D_NVC0
> (0)
> [    77.893] (EE) NOUVEAU(G0): Error initialising acceleration.  Falling
> back to NoAccel
> [    77.893] (==) NOUVEAU(G0): Backing store disabled
> [    77.893] (==) NOUVEAU(G0): Silken mouse enabled
> [    77.893] (==) NOUVEAU(G0): DPMS enabled
> [    77.893] (II) NOUVEAU(G0): RandR 1.2 enabled, ignore the following RandR
> disabled message.

Agree with Emil. See bug 70354 -- it covers this problem. Let's keep this issue to just being about VBIOS failure.
Comment 23 Ilia Mirkin 2013-11-09 20:26:45 UTC
This is fixed by:

http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=4c60fac111961e7eb71a08928c22b43cff55f1fb

Which should appear in 3.13-rc1. Marking this as fixed.


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.