FS#52243 - [nvidia-340xx] 340.101-5 and Linux 4.9 : X doesn't start.

Attached to Project: Arch Linux
Opened by Frederic Bezies (fredbezies) - Thursday, 22 December 2016, 22:13 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 22 January 2017, 12:53 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: Simple to reproduce. Get both nvidia-340xx and linux 4.9-1. Reboot after install. Lightdm or any other DM won't start. Only workaround ? Either keep linux 4.8.xx kernel or switch to nouveau server for xorg.


Additional info:
Linux 4.9-1
nvidia-340xx-340.101-5


Steps to reproduce:

See description.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Sunday, 22 January 2017, 12:53 GMT
Reason for closing:  Fixed
Comment by Frederic Bezies (fredbezies) - Thursday, 22 December 2016, 22:30 GMT
Xorg.0.log.old with a no screen found error while trying to load Xorg with nvidia 340xx and linux 4.9 kernel :(

Comment by Roman Brusentsov (Gavcheg) - Friday, 23 December 2016, 19:10 GMT Comment by Frederic Bezies (fredbezies) - Friday, 23 December 2016, 19:19 GMT
Will test this patch asap.
Comment by Frederic Bezies (fredbezies) - Friday, 23 December 2016, 20:12 GMT
Applied this small patch, and guess what? It works !

So there is the patch to apply and make nvidia-340xx working with linux 4.9 kernel :

http://pastebin.com/raw/mSwYvy1L

--- kernel/nv-drm.c 2016-12-15 12:41:26.000000000 +0100
+++ kernel/nv-drm.c 2016-12-15 12:58:48.000000000 +0100
@@ -115,7 +115,11 @@
};

static struct drm_driver nv_drm_driver = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ .driver_features = DRIVER_GEM | DRIVER_PRIME | DRIVER_LEGACY,
+#else
.driver_features = DRIVER_GEM | DRIVER_PRIME,
+#endif
.load = nv_drm_load,
.unload = nv_drm_unload,
.fops = &nv_drm_fops,

Comment by David McInnis (daavve) - Saturday, 31 December 2016, 19:20 GMT
Applying the above patch fixed my problem.

Thanks!

-Dave
Comment by David McInnis (daavve) - Sunday, 01 January 2017, 04:52 GMT
Thanks again!

-Dave
Comment by Frederic Bezies (fredbezies) - Saturday, 07 January 2017, 09:38 GMT
Well, 10 minutes of building this legacy driver because of linux 4.9.1 upgrade on testing. How great :(
Comment by David McInnis (daavve) - Tuesday, 10 January 2017, 21:23 GMT
Module building takes only a minute or so on my local machine. But I agree it is a bit tedious to manually rebuild the driver after every new kernel release. I wonder why this patch isn't applied in the official repo. Maybe because this is an upstream bug?

-Dave
Comment by Frederic Bezies (fredbezies) - Wednesday, 11 January 2017, 13:16 GMT
Indeed, because it is an upstream bug, and also because it is a legacy driver? Just an educated guess for the legacy driver part.
Comment by John (graysky) - Saturday, 21 January 2017, 14:41 GMT
I can confirm that the patch in post #4 fixes this issue on an nvidia ion running x86_64/nvidia-340xx. Before finding this FS, I downgraded to the lts packages. Please accept the patch into our package.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 21 January 2017, 19:33 GMT
The package in testing has the patch applied. Need some testers.
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 22 January 2017, 12:53 GMT
I got confirmation through email that this works now.

Loading...