# UEFI + Nvidia = weird problems

## AlfaGTV

I recently converted my workstation from BIOS to UEFI / grub2. My system boots (no console) and starts kde, but when I run the simple command ls -l in / folder I get KILLED. And some of my drives are not accessible. 

octo-core / # ls -l

Killed

dmesg give me this:

```

BUG: unable to handle kernel NULL pointer dereference at           (null)

[   59.834060] IP: [<ffffffff811846ec>] xattr_resolve_name+0xc/0x70

[   59.834065] PGD 41df81067 PUD 41df82067 PMD 0 

[   59.834067] Oops: 0000 [#1] SMP 

[   59.834069] Modules linked in: nvidia_modeset(PO) nvidia(PO) nvidia_drm(PO)

[   59.834073] CPU: 2 PID: 3125 Comm: file.so Tainted: P           O    4.4.39-gentoo #6

[   59.834075] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./970 Pro3 R2.0, BIOS P2.80 05/31/2016

[   59.834076] task: ffff88042b04e600 ti: ffff880416e48000 task.ti: ffff880416e48000

[   59.834078] RIP: 0010:[<ffffffff811846ec>]  [<ffffffff811846ec>] xattr_resolve_name+0xc/0x70

[   59.834080] RSP: 0018:ffff880416e4bd40  EFLAGS: 00010286

[   59.834081] RAX: ffff88042a6e4000 RBX: ffff8800bd400a80 RCX: 0000000000000000

[   59.834082] RDX: 0000000000000000 RSI: ffff880416e4bd50 RDI: 0000000000000000

[   59.834083] RBP: ffff880416e4bd40 R08: ffffffff81184750 R09: ffff880416e4bdc0

[   59.834084] R10: 8080808080808080 R11: 0000000000000000 R12: 0000000000000000

[   59.834085] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

[   59.834086] FS:  00007f3be26e2740(0000) GS:ffff88043ec80000(0000) knlGS:0000000000000000

[   59.834087] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033

[   59.834088] CR2: 0000000000000000 CR3: 000000041c60a000 CR4: 00000000000406e0

[   59.834089] Stack:

[   59.834090]  ffff880416e4bd70 ffffffff81184785 ffff880416e4bdc0 ffff880416e4bdc0

[   59.834092]  ffff8800bd400a80 ffff88042bb58090 ffff880416e4bda8 ffffffff81184b9d

[   59.834093]  0000000000000000 ffff880416e4bdc0 0000000000000000 0000000000000000

[   59.834095] Call Trace:

[   59.834097]  [<ffffffff81184785>] generic_getxattr+0x35/0x70

[   59.834099]  [<ffffffff81184b9d>] vfs_getxattr+0x9d/0xc0

[   59.834100]  [<ffffffff81184fa0>] getxattr+0x150/0x1e0

[   59.834103]  [<ffffffff811581cf>] ? kmem_cache_alloc+0x2f/0x150

[   59.834105]  [<ffffffff8117036c>] ? getname_flags+0x5c/0x200

[   59.834106]  [<ffffffff81170388>] ? getname_flags+0x78/0x200

[   59.834108]  [<ffffffff81185081>] path_getxattr+0x51/0x80

[   59.834109]  [<ffffffff811859ff>] SyS_getxattr+0xf/0x20

[   59.834112]  [<ffffffff8178f9d7>] entry_SYSCALL_64_fastpath+0x12/0x6a

[   59.834113] Code: 00 00 eb 98 83 fe dc b8 00 00 00 00 48 89 53 18 0f 45 c6 eb 87 66 2e 0f 1f 84 00 00 00 00 00 4c 8b 0e 55 48 89 e5 4d 85 c9 74 50 <48> 8b 07 4c 8d 47 08 48 85 c0 74 3a 48 8b 10 0f b6 0a 84 c9 74 

[   59.834129] RIP  [<ffffffff811846ec>] xattr_resolve_name+0xc/0x70

[   59.834131]  RSP <ffff880416e4bd40>

[   59.834132] CR2: 0000000000000000

[   59.834134] ---[ end trace 6a2b2211c93f5dc2 ]---

```

My kernel:

mathias@octo-core ~ $ uname -a 

Linux octo-core 4.4.39-gentoo #6 SMP Mon Feb 27 20:34:33 CET 2017 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux

I've tried different nvidia drivers but always get the same problem. Is there something wrong with my kernel configuration?

My kernel config: http://alfagtv.be/web/kernel-config.txt

[Moderator edit: added [code] tags to preserve output layout. -Hu]

----------

## Logicien

You use the Vesa framebuffer. I would prefer the Efi framebuffer to boot in Efi mode.

```
CONFIG_FB_VESA=y

# CONFIG_FB_EFI is not set
```

For stuff who compile Linux kernel modules like the proprietary Nvidia drivers, VirtualBox, etc, if I use the ~ version of them I use the ~ version of the Linux kernel too.

Look at Gentoo Forums :: View topic - [HOWTO] UEFI, nvidia - made simple(fb)

----------

## AlfaGTV

 *Logicien wrote:*   

> You use the Vesa framebuffer. I would prefer the Efi framebuffer to boot in Efi mode.
> 
> ```
> CONFIG_FB_VESA=y
> 
> ...

 

I've just compiled 4.9.6-gentoo and the errors in my first post are gone, my sata drives are accessible again  :Smile: 

Hmm, I thought nvidia didn't support the kernel EFI framebuffer? I still don't have a console, I tried with EFI enabled (vesa disabled) and EFI disabled but it does not seem to make a difference.

I'll try some more options, and have another look at the link you posted   :Rolling Eyes: 

----------

