# NVIDIA with the 4.14 kernel

## siknasa9

Honestly, not sure how I'm the only person (that I can find) having this issue, but I can't get NVIDIIA of any version to compile with kernel 4.14 (came into it late. started with 4.14.3 and have tried all up to 4.14.11). I get the error below and can't seem to figure it out:

```
/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:346:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]

     nvkms_suspend,

     ^~~~~~~~~~~~~

/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:346:5: note: (near initialization for ‘nvkms_rm_callbacks’)

/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:346:5: error: invalid initializer

/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:346:5: note: (near initialization for ‘nvkms_rm_callbacks.<anonymous>’)

/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:347:5: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]

     nvkms_resume

     ^~~~~~~~~~~~

/var/tmp/portage/x11-drivers/nvidia-drivers-387.34/work/kernel/nvidia-modeset/nvidia-modeset-linux.c:347:5: note: (near initialization for ‘nvkms_rm_callbacks’)

cc1: some warnings being treated as errors

```

Thanks.

----------

## asturm

You must upgrade. See also: https://forums.gentoo.org/viewtopic-t-1074832.html

----------

## siknasa9

Guess I'll just wait. I don't like installing outside of portage... Makes things messy. Thanks.

----------

## fedeliallalinea

 *siknasa9 wrote:*   

> Guess I'll just wait. I don't like installing outside of portage... Makes things messy. Thanks.

 

 *Tyler_Durden wrote:*   

> Or you can simply use nvidia-drivers 390.12 without any additional patches.

 

 *yzg wrote:*   

> I can confirm that that x11-drivers/nvidia-drivers-390.12 compiles and runs on kernel 4.14.11-r2

 

In portage tree is present version 390.12

----------

## siknasa9

Umm... I don't see it.

```
[U] x11-drivers/nvidia-drivers

     Available versions:  304.137(0/304)^md 340.104(0/340)^md 375.82(0/375)^md 378.13-r1(0/378)^md 381.22-r1(0/381)^md 384.90(0/384)^md (~)384.98(0/384)^md 387.22(0/387)^md (~)387.34(0/387)^md {+X acpi compat +driver gtk3 +kms multilib pax_kernel static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}

     Installed versions:  387.22(0/387)^md(07:27:19 PM 11/10/2017)(X acpi driver gtk3 kms multilib tools uvm -compat -pax_kernel -static-libs -wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="linux -FreeBSD")

     Homepage:            http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx

     Description:         NVIDIA Accelerated Graphics Driver

```

----------

## fedeliallalinea

You running eix-update after every emerge --sync?

----------

## jd2066

 *siknasa9 wrote:*   

> Umm... I don't see it.

 

It appears nvidia-drivers version 390.12 is masked by keywords so that might be why it doesn't show up.

----------

## fedeliallalinea

 *jd2066 wrote:*   

> It appears nvidia-drivers version 390.12 is masked by keywords so that might be why it doesn't show up.

 

No, with eix you can see stable, unstable and masked packages

```
[U] x11-drivers/nvidia-drivers

     Available versions:  304.137(0/304)^md 340.104(0/340)^md 375.82(0/375)^md 378.13-r1(0/378)^md 381.22-r1(0/381)^md 384.90(0/384)^md (~)384.98(0/384)^md (~)384.111(0/384)^md 387.22(0/387)^md (~)387.34(0/387)^md (~)390.12(0/390)^md {+X acpi compat +driver gtk3 +kms multilib pax_kernel static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}

     Installed versions:  387.22^md(15:08:20 04. 01. 18)(X acpi driver kms multilib tools -compat -gtk3 -pax_kernel -static-libs -uvm -wayland ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" KERNEL="linux -FreeBSD")

     Homepage:            http://www.nvidia.com/ http://www.nvidia.com/Download/Find.aspx

     Description:         NVIDIA Accelerated Graphics Driver
```

----------

## siknasa9

 *fedeliallalinea wrote:*   

> You running eix-update after every emerge --sync?

 

Yep, I do indeed run eix-update after every emerge --sync. I actually have it aliased as alias sync="layman -S && emaint sync -A && eix-update" in bashrc. So I just have to type sync and it does it all. I wonder if there's an overlay with the latest NVIDIA...

----------

## fedeliallalinea

```
# ls /usr/portage/x11-drivers/nvidia-drivers/

files         nvidia-drivers-304.137.ebuild  nvidia-drivers-378.13-r1.ebuild  nvidia-drivers-384.90.ebuild  nvidia-drivers-387.34.ebuild

Manifest      nvidia-drivers-340.104.ebuild  nvidia-drivers-381.22-r1.ebuild  nvidia-drivers-384.98.ebuild  nvidia-drivers-390.12.ebuild

metadata.xml  nvidia-drivers-375.82.ebuild   nvidia-drivers-384.111.ebuild    nvidia-drivers-387.22.ebuild
```

I don't know why your eix not show correct versions but 390.12 is present in official portage tree (see also here). Try to run eix-update separatly

----------

## siknasa9

I actually hadn't synced in a few days. Perhaps the server on my side of the world doesn't update as quickly because I synced yesterday and there it was. I dunno. Compiling now. Thanks for the help y'all.

----------

