Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

NVIDIA, nouvean, and opencl

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

NVIDIA, nouvean, and opencl

  • Quote

Post by lars_the_bear » Thu Sep 19, 2024 7:36 pm

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.
Top
stefantalpalaru
Tux's lil' helper
Tux's lil' helper
Posts: 76
Joined: Sun Jan 11, 2009 10:35 pm
Location: Italy
Contact:
Contact stefantalpalaru
Website

Re: NVIDIA, nouvean, and opencl

  • Quote

Post by stefantalpalaru » Thu Sep 19, 2024 7:53 pm

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).
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

Re: NVIDIA, nouvean, and opencl

  • Quote

Post by lars_the_bear » Fri Sep 20, 2024 9:25 am

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.
Top
Chiitoo
Ninja Apprentice
Ninja Apprentice
User avatar
Posts: 3079
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

  • Quote

Post by Chiitoo » Fri Sep 20, 2024 10:24 am

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.
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

  • Quote

Post by lars_the_bear » Mon Sep 23, 2024 8:59 am

@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.
Top
Ionen
Developer
Developer
User avatar
Posts: 3014
Joined: Thu Dec 06, 2018 2:23 pm

Re: NVIDIA, nouvean, and opencl

  • Quote

Post by Ionen » Mon Sep 23, 2024 11:04 am

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.
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

Re: NVIDIA, nouvean, and opencl

  • Quote

Post by lars_the_bear » Mon Sep 23, 2024 11:57 am

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: Select all

* 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: Select all

!!! 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.
Top
Ionen
Developer
Developer
User avatar
Posts: 3014
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Mon Sep 23, 2024 12:07 pm

I see, need 390.. then that's unfortunate.
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.
Top
lars_the_bear
Guru
Guru
Posts: 537
Joined: Wed Jun 05, 2024 7:04 am

  • Quote

Post by lars_the_bear » Mon Sep 23, 2024 12:19 pm

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.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic