Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nvidia-364.12 ( Wayland + DRM/KMS-ready driver ! )
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Tue Mar 22, 2016 7:26 am    Post subject: nvidia-364.12 ( Wayland + DRM/KMS-ready driver ! ) Reply with quote

Hello everyone,

So our blazing fast package maintainers have already put an ebuild for x11-drivers/nvidia-drivers-364.12 which is the very first nvidia driver which supports all at once :

Wayland ( Weston needs changes to support the driver so it's still too early : ref )
DRM + KMS ( nvidia own implementation without an fbdev driver for high-res tty ? see ref )
Vulkan
GLNVD by default


It installs fine with kernel 4.4.6 and openGL still works so let's investigate together the other features !

I had limited time to play with it so far but I'll report with any findings and update the wiki along the way.

Have a nice day !
_________________
Gentoo stable (with bits of ~amd64) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]


Last edited by Myu on Tue Mar 22, 2016 8:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
Juippisi
Guru
Guru


Joined: 30 Sep 2005
Posts: 324
Location: /home

PostPosted: Tue Mar 22, 2016 9:44 am    Post subject: Re: nvidia-364.12 ( Wayland + DRM/KMS-ready driver ! ) Reply with quote

Myu wrote:
It installs fine with kernel 4.4.6 and openGL still works


All I wanted to hear. Thanks for putting this out, time to sync and update!
Back to top
View user's profile Send private message
gordonp
Tux's lil' helper
Tux's lil' helper


Joined: 23 May 2005
Posts: 89

PostPosted: Tue Mar 22, 2016 1:34 pm    Post subject: How to use? Reply with quote

OK - I emerge'd 364.12, and I've read nVidia's notes and README for KMS info:

http://www.nvidia.com/download/driverResults.aspx/100577/en-us
http://us.download.nvidia.com/XFree86/Linux-x86_64/364.12/README/index.html

But I'm kinda lost :-(
My real goal in all this is to use X11 (not Wayland), but to get a nicer console on my large monitor - right now, the console has really-huge fonts, and is pretty much unusable. It ~used~ to work, some time ago, with uvesafb, but no longer.

Here are my USE-flags:

Code:
[ebuild   R   ~] x11-drivers/nvidia-drivers-364.12:0/364::gentoo  USE="X acpi driver gtk3 kms multilib tools -compat -pax_kernel -static-libs -uvm -wayland" 0 KiB
[ebuild   R    ] sys-kernel/gentoo-sources-4.1.15-r1:4.1.15-r1::gentoo  USE="-build -experimental -kdbus -symlink" 0 KiB


But my first problem is that I cannot find nvidia-drm.ko :-( Is there a specific USE-flag needed?

Thanks!
Back to top
View user's profile Send private message
chrisyu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 206
Location: China

PostPosted: Tue Mar 22, 2016 4:03 pm    Post subject: Reply with quote

Change file nvidia-drivers-364.12.ebuild, line #127

to
Code:

use kms && MODULE_NAMES+=" nvidia-modeset(video:${S}/kernel) nvidia-drm(video:${S}/kernel)"


Re-emerge, reboot, lsmod, then we get nvidia-drm .
But still don't know what to do.

But it's a step forward, right? :D

I tried
Code:

modprobe -r nvidia-drm ; modprobe nvidia-drm modeset=1


But it printed some kernel panic messages.
Since it's late, I have to test later.
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Tue Mar 22, 2016 4:45 pm    Post subject: Reply with quote

Hi everyone

(edited after findings)

So I've a X11 system booted with nvidia-drm running it seems, TTY resolution is still enormous as before.

Code:

[    2.156724] nvidia: module license 'NVIDIA' taints kernel.
[    2.164752] nvidia-nvlink: Nvlink Core is being initialized, major device number 248
[    2.172984] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  364.12  Wed Mar 16 20:44:12 PDT 2016
[    2.177420] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    2.858437] nvidia-modeset: Allocated GPU:0 (GPU-cb14a0f5-e4d3-2dfd-930b-16c2c145622e) @ PCI:0000:01:00.0



Steps :

0. Make a BACKUP of /usr/portage/x11-drivers/nvidia-drivers-364.12, you never know.
1. Apply @chrisyu modification ( thanks! )
2. ebuild nvidia-drivers-364.12 manifest
3. emerge =nvidia-drivers-364.12 ( nvidia-drm.ko is now at /lib64/modules/$(uname -r)/video/nvidia-drm.ko )
4. add this to /etc/modprobe.d/nvidia.conf :

Code:
options nvidia_drm modeset=1


I'll keep investigating regarting the TTY resolution

edit : The arch wiki mention on the KMS page

Quote:
The proprietary NVIDIA driver supports KMS (since 364.12). However, it lacks an fbdev driver for the high-resolution console.

_________________
Gentoo stable (with bits of ~amd64) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 3574
Location: Germany

PostPosted: Wed Mar 23, 2016 12:59 am    Post subject: Reply with quote

Just a good info-link from nvidia-forum
NVIDIA 364.12 release: Vulkan, GLVND, DRM KMS, and EGLStreams
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 129

PostPosted: Wed Mar 23, 2016 3:36 am    Post subject: Reply with quote

anybody figure out how to use vulkan yet? i installed the new nvidia-beta driver and i have talos on steam. i enabled the public beta for talos and launched it as 64 bit, but when i switch to the vulkan api in game i get "Cannot set display mode" and I see the line "Vulkan error: Cannot find a compatible vulkan ICD!"

my first guess is that my launch options for steam are the issue, i launch steam with the script:
Code:
#!/bin/bash
export DISPLAY=:0
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib"
exec ~/.local/share/Steam/steam.sh "$@"


I did a search for vulkan to see if there was a folder somewhere that I need to include in this launch script but I didn't see anything.
Back to top
View user's profile Send private message
Saundersx
Apprentice
Apprentice


Joined: 11 Apr 2005
Posts: 244

PostPosted: Wed Mar 23, 2016 6:50 am    Post subject: Reply with quote

xtx wrote:
anybody figure out how to use vulkan yet? i installed the new nvidia-beta driver and i have talos on steam. i enabled the public beta for talos and launched it as 64 bit, but when i switch to the vulkan api in game i get "Cannot set display mode" and I see the line "Vulkan error: Cannot find a compatible vulkan ICD!"

my first guess is that my launch options for steam are the issue, i launch steam with the script:
Code:
#!/bin/bash
export DISPLAY=:0
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib"
exec ~/.local/share/Steam/steam.sh "$@"


I did a search for vulkan to see if there was a folder somewhere that I need to include in this launch script but I didn't see anything.


I'm betting this is related https://bugs.gentoo.org/show_bug.cgi?id=578040
Back to top
View user's profile Send private message
xtx
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2011
Posts: 129

PostPosted: Wed Mar 23, 2016 3:31 pm    Post subject: Reply with quote

Saundersx wrote:
xtx wrote:
anybody figure out how to use vulkan yet? i installed the new nvidia-beta driver and i have talos on steam. i enabled the public beta for talos and launched it as 64 bit, but when i switch to the vulkan api in game i get "Cannot set display mode" and I see the line "Vulkan error: Cannot find a compatible vulkan ICD!"

my first guess is that my launch options for steam are the issue, i launch steam with the script:
Code:
#!/bin/bash
export DISPLAY=:0
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib/opengl/nvidia/lib"
exec ~/.local/share/Steam/steam.sh "$@"


I did a search for vulkan to see if there was a folder somewhere that I need to include in this launch script but I didn't see anything.


I'm betting this is related https://bugs.gentoo.org/show_bug.cgi?id=578040


Good catch, almost definitely the issue. Thanks, I'll keep my eyes on the bug report
Back to top
View user's profile Send private message
mouacyk
n00b
n00b


Joined: 23 Mar 2009
Posts: 13

PostPosted: Wed Mar 23, 2016 7:48 pm    Post subject: Reply with quote

After modifying the driver ebuild and patching weston, I still end up with an error when running weston-launch:
Code:

[ 5338.262318] vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=none,decodes=none:owns=io+mem
[ 5338.262416] nvidia-nvlink: Nvlink Core is being initialized, major device number 250
[ 5338.262437] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  364.12  Wed Mar 16 21:11:26 PDT 2016
[ 5338.263459] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  364.12  Wed Mar 16 20:44:12 PDT 2016
[ 5338.263950] [drm] [nvidia-drm] [GPU ID 0x00000200] Loading driver
[ 5338.824705] nvidia-modeset: Allocated GPU:0 (GPU-595b3d36-aaea-d916-d4ce-4efa80c7c223) @ PCI:0000:02:00.0
[ 5338.886475] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 5338.886476] [drm] No driver support for vblank timestamp query.
[ 5350.257392] [drm:nvidia_drm_gem_import_nvkms_memory [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000200] Failed to import NVKMS memory to GEM object


Edit: Had to run the good old fashion way with full parameters.
Code:
weston -B drm-backend.so --tty=1 --use-egldevice --current-mode


Screenshot: http://i63.tinypic.com/dmuyz7.png
Back to top
View user's profile Send private message
Myu
Apprentice
Apprentice


Joined: 22 Oct 2014
Posts: 162
Location: Belgium

PostPosted: Thu Mar 24, 2016 4:27 pm    Post subject: Reply with quote

@mouacyk : Nicely done ! Could you describe how exactly you've patched weston ? With version 1.9 or 1.10 ?


x11-drivers/nvidia-drivers-364.12-r1
now includes the -drm.ko needed fixes + another fix for Vulkan.
_________________
Gentoo stable (with bits of ~amd64) / Games ! (Linux & vfio-pci ) // Xfce

Feel free to PM me if you would like a simple ebuild and I'll see what I can do :]
Back to top
View user's profile Send private message
mouacyk
n00b
n00b


Joined: 23 Mar 2009
Posts: 13

PostPosted: Thu Mar 24, 2016 5:23 pm    Post subject: Reply with quote

Version 1.10 - I cloned the latest weston git sources and applied each of the 7 patches that NVidia posted. 2 or 3 of the patches didn't apply completely, so had to edit manually. After all patch is done, build and install the patched weston locally.

Haven't bothered with xwayland yet, because there are use flag conflicts with egl and opengl on my system. However, a quick build of qtwayland without egl and wayland-compositor allowed running some qt apps from within weston, such as kate and kcalc.
Back to top
View user's profile Send private message
Celes_Eternal
n00b
n00b


Joined: 23 Dec 2014
Posts: 46

PostPosted: Sat Apr 02, 2016 11:58 pm    Post subject: Reply with quote

Hello guys,

Anybody know why i can't upgrade more than 361.28-r2, even with keyword and mask?
I didn't found any informations, but i have the ebuild in /usr/portage/...
I know i have some change to do, like upgrading my kernel. But why emerge say nothing about 364?

Thanks
Back to top
View user's profile Send private message
dweezil-n0xad
Apprentice
Apprentice


Joined: 30 Oct 2006
Posts: 156
Location: Ostend, Belgium

PostPosted: Sun Apr 03, 2016 10:29 am    Post subject: Reply with quote

what is the emerge output when you try the new version?
Code:
emerge =x11-drivers/nvidia-drivers-364.12-r1 -1av

_________________
i7-4790K | 16GB DDR3 | GTX 970 | 500GB SSD
ASUS N56VV | i7-3630QM | 12GB DDR3 | GT 750M | 256GB SSD
Back to top
View user's profile Send private message
Celes_Eternal
n00b
n00b


Joined: 23 Dec 2014
Posts: 46

PostPosted: Tue Apr 05, 2016 3:17 pm    Post subject: Reply with quote

Sorry to be so late :cry:
Thanks, it seem that i had to create a package.unmask, just mask other versions was not enough...
First time i do that. Anyway, my question has nothing to do here, sorry...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum