Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NVIDIA, nouvean, and opencl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 517

PostPosted: Thu Sep 19, 2024 7:36 pm    Post subject: NVIDIA, nouvean, and opencl Reply with quote

Hi folks

I only have the vaguest notion what OpenCL is, but I know that Darktable can use it. When I've tried it on my Fedora system, enabling OpenCL makes a huge difference to rendering performance. So I'd quite like to use it on Gentoo as well. But my Gentoo systems are much older, and have ancient NVIDIA GPUs.

I'm currently using the nouveau driver, which I believe is open source. I tried installing the proprietary NVIDIA driver, but `emerge` said "Your hardware is known not to work". So I didn't go any further with this.

So my question is: what do I have to do, on Gentoo, to make OpenCL work with the nouveau driver? I believe it's supported, in principle; at least, Google hints that it is. But I have no idea how to set it up in Gentoo.

Please be patient, if possible. I know next to nothing about graphics, and I don't even understand what most of the jargon means. On my Fedora system I just installed the proprietary NVIDIA driver and everything else just worked, as if by magic. Which is good, but not a learning experience.

BR, Lars.
Back to top
View user's profile Send private message
stefantalpalaru
n00b
n00b


Joined: 11 Jan 2009
Posts: 65
Location: Italy

PostPosted: Thu Sep 19, 2024 7:53 pm    Post subject: Re: NVIDIA, nouvean, and opencl Reply with quote

lars_the_bear wrote:
I tried installing the proprietary NVIDIA driver, but `emerge` said "Your hardware is known not to work".


You're supposed to look up the latest driver version known to support your card. If it's available in the main tree, you emerge it by specifying the corresponding slot - something like "nvidia-drivers:0/470".

If you're lucky, the kernel module will compile as is. If not, you're supposed to hunt down and apply patches for recent kernels (or downgrade the kernel).
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 517

PostPosted: Fri Sep 20, 2024 9:25 am    Post subject: Re: NVIDIA, nouvean, and opencl Reply with quote

stefantalpalaru wrote:

You're supposed to look up the latest driver version known to support your card. If it's available in the main tree, you emerge it by specifying the corresponding slot - something like "nvidia-drivers:0/470".


Thank you, but that's more hassle than I want to go through, if there's an alternative. I've seen many references to OpenCL support in Nouveau, going back many years; but I don't see any explanation how to use it.

If nobody around here knows much about this stuff -- which is fair enough -- I wonder where else I might ask?

BR, Lars.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2728
Location: Here and Away Again

PostPosted: Fri Sep 20, 2024 10:24 am    Post subject: Reply with quote

It's not that big of a hassle, I think.

When I was still using nvidia products, I think this page is what I referred to more than once:

https://www.nvidia.com/en-us/drivers/unix/legacy-gpu/

As for OpenCL, does this help you forward at all in case you haven't seen it yet?

https://wiki.gentoo.org/wiki/OpenCL
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 517

PostPosted: Mon Sep 23, 2024 8:59 am    Post subject: Reply with quote

@Chiitoo

Thank you. The OpenCL page you reference does not suggest that the nouveau driver can support OpenCL; there are plenty of Google hits, going back about ten years, that suggest that it can, but precious little in the way of detail. Perhaps this support, if there is any, is poorly developed? Or perhaps enabling it requires fussy steps that are not documented anywhere?

BR, Lars.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2851

PostPosted: Mon Sep 23, 2024 11:04 am    Post subject: Re: NVIDIA, nouvean, and opencl Reply with quote

stefantalpalaru wrote:
You're supposed to look up the latest driver version known to support your card.
Actually you don't need to, alongside that unspported message the ebuild *should* tell you and give you a line to add to /etc/portage/package.mask, it scans the supported-gpus.json that ships with nvidia-drivers to know. Albeit if the highest you can use is 390 or 340 you're better off with nouveau, 470 still has a decent life ahead as long as you're ok not using wayland (470 is still supported upstream and getting new releases, <=390 is not)

nouveau is very limited anyhow, it can't reclock most cards leaving them in low power mode (equals poor performance), vulkan support is still kind of early stages, no cuda, afaik opencl doesn't work either or not properly (even if it did, it would likely be poor performance as well in low power and there's little to gain from using it), can't do hardware acceleration for video decoding/encoding (aka vaapi/vdpau/nvenv/nvdec, well there's an exception to make vdpau work using a firmware extracted from old nvidia-drivers on "some" cards but I wouldn't count on that), etc... It also has problems with "some" monitors/setups and may not necessarily give a display at all. If it does, and a display and basic acceleration w/ OpenGL for a mostly responsive DE and maybe simple/old games, then it's fine though -- bit of a lifeboat when upstream nvidia drops support entirely.

It may improve now that it can use the GSP firmware and using nvidia's open source modules as reference, but that's not relevant for old cards which cannot use that.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 517

PostPosted: Mon Sep 23, 2024 11:57 am    Post subject: Re: NVIDIA, nouvean, and opencl Reply with quote

Ionen wrote:
stefantalpalaru wrote:
You're supposed to look up the latest driver version known to support your card.
Actually you don't need to, alongside that unspported message the ebuild *should* tell you and give you a line to add to /etc/portage/package.mask, it scans the supported-gpus.json that ships with nvidia-drivers to know. Albeit if the highest you can use is 390 or 340 you're better off with nouveau, 470 still has a decent life ahead as long as you're ok not using wayland (470 is still supported upstream and getting new releases, <=390 is not)


Thank you. The exact message I got when I tried to `emerge nvidia-drivers` is:

Code:

* You are installing a version of nvidia-drivers known not to work
 * with a GPU of the current system. If unwanted, add the mask:
 *   echo '>=x11-drivers/nvidia-drivers-391' > /etc/portage/package.mask/nvidia-drivers
 * ...then downgrade to a legacy[1] branch if possible (not all old versions
 * are available or fully functional, may need to consider nouveau[2]).


So I did what it said, and then `emerge` failed with this:

Code:

!!! All ebuilds that could satisfy "x11-drivers/nvidia-drivers" have been masked.
!!! One of the following masked packages is required to complete your request:
- x11-drivers/nvidia-drivers-560.35.03-r1::gentoo (masked by: package.mask, ~amd64 keyword)
- x11-drivers/nvidia-drivers-550.120::gentoo (masked by: package.mask, ~amd64 keyword)
- x11-drivers/nvidia-drivers-550.107.02-r1::gentoo (masked by: package.mask)
- x11-drivers/nvidia-drivers-550.40.71-r1::gentoo (masked by: package.mask, ~amd64 keyword)/var/db/repos/gentoo/profiles/package.mask:
# Ionen Wolkens <ionen@gentoo.org> (2021-10-09)
# Vulkan beta driver branch aimed at Vulkan developers for testing
# ...

- x11-drivers/nvidia-drivers-535.183.01-r1::gentoo (masked by: package.mask)
- x11-drivers/nvidia-drivers-525.147.05-r1::gentoo (masked by: package.mask)
- x11-drivers/nvidia-drivers-470.256.02-r1::gentoo (masked by: package.mask)
- x11-drivers/nvidia-drivers-390.157::gentoo (masked by: package.mask)
/var/db/repos/gentoo/profiles/package.mask:
# Ionen Wolkens <ionen@gentoo.org> (2023-03-30)
# NVIDIA dropped support for the 390.xx branch in December 2022[1].
# ...


I am unsure how to proceed here. I tried fiddling about with the masks and the keywords, but I don't really know what I'm doing.

Am I wasting my time? With the nouveau driver it isn't particularly reliable, but it does kind-of work.

BR, Lars.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2851

PostPosted: Mon Sep 23, 2024 12:07 pm    Post subject: Reply with quote

I see, need 390.. then that's unfortunate.
Quote:
Albeit if the highest you can use is 390 or 340 you're better off with nouveau
You *could* unmask it but 390.xx is honestly a mess and hardly works at this point (not sure if OpenCL still works with it too, maybe), as the mask message notes it's due for eventual removal from the tree. Your only "real" options are nouveau or getting new hardware.

I wouldn't waste your time with 390 or trying to get OpenCL to work, at this point should just be happy can still get a display with (at least) working opengl.

Edit: note that 390.xx would also need a <=6.1.x kernel to even compile without patches.
Back to top
View user's profile Send private message
lars_the_bear
Guru
Guru


Joined: 05 Jun 2024
Posts: 517

PostPosted: Mon Sep 23, 2024 12:19 pm    Post subject: Reply with quote

Ionen wrote:

I wouldn't waste your time with 390 or trying to get OpenCL to work, at this point should just be happy can still get a display with (at least) working opengl.


OK. New hardware is an option, if it's not too expensive.

The current set-up doesn't really work. Xorg crashes every time my monitor switches back on from a power-saving state. I can use the machine so long as I don't step away from it for more than five minutes. It's not ideal.

I started a new thread to ask about hardware.

BR, Lars.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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