Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] NVK? #153

Open
boxyld opened this issue Feb 8, 2024 · 21 comments
Open

[QUESTION] NVK? #153

boxyld opened this issue Feb 8, 2024 · 21 comments
Labels
question Further information is requested

Comments

@boxyld
Copy link

boxyld commented Feb 8, 2024

What is your question?
[...]
Just wondering if i can use nvk drivers on this optimus tool

@boxyld boxyld added the question Further information is requested label Feb 8, 2024
@bayasdev
Copy link
Owner

bayasdev commented Feb 8, 2024

Hi @boxyld, unfortunately the only Nvidia hardware I own is a GTX1060 laptop so I've not had the opportunity to try it.

But I think the nvk driver follows the Linux rules and should support the standard switcherooctl.

Best regards.

@boxyld
Copy link
Author

boxyld commented Feb 10, 2024

https://m.youtube.com/watch?v=77u61iB6zpE&feature=youtu.be

Either the guide has something worng or sadly it doesn't work

Edit(the guide forgot that i need to switch nouveau first so i would try later)

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

Nvk should be kinda easy to implement I will try to see about it tomorrow.
Just need to ask to mesa/nouveau team if RD3D is working on nouveau or not since on my testing is allways stay D0, besides being set to auto

About switcherooctl not sure if still works.
Small note DRI_PRIME works so switcherooctl is not needed at all

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

Nvk should be kinda easy to implement I will try to see about it tomorrow. Just need to ask to mesa/nouveau team if RD3D is working on nouveau or not since on my testing is allways stay D0, besides being set to auto

About switcherooctl not sure if still works.

I’d love to test EnvyControl with Nvk but I don’t own Turing (or later) hardware as I work from a MacBook Pro and my Linux laptop has a GTX 1060.

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

@bayasdev envycontrol support change the state without reboot, I dont use envycontrol for a long time.
I was using superglxfctl because of that and vfio, now that I dont use vfio would be good to use envycontrol (I also dont know rust, that why Im chaging).

@MrDuartePT
Copy link

Nvk should be kinda easy to implement I will try to see about it tomorrow. Just need to ask to mesa/nouveau team if RD3D is working on nouveau or not since on my testing is allways stay D0, besides being set to auto
About switcherooctl not sure if still works.

I’d love to test EnvyControl with Nvk but I don’t own Turing (or later) hardware as I work from a MacBook Pro and my Linux laptop has a GTX 1060.

For my looking to the files it seems the nvidia rules also work on nouveau since it also expose the sames file so that dosent need changes the only think is just detect if nouveau or nvidia is loaded or not. And ajust some files.

The only thing user will need to set is nouveau or nvidia modset.

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

@bayasdev envycontrol support change the state without reboot, I dont use envycontrol for a long time.

I was using superglxfctl because of that and vfio, now that I dont use vfio would be good to use envycontrol (I also dont know rust).

No, EnvyControl requires rebooting the machine to switch between modes.

I think these tools like Optimus Manager work by killing the X server so it applies the new config on a hot state as Arch Linux doesn't need to rebuild the initramfs when kernel parameters change.

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

Nvk should be kinda easy to implement I will try to see about it tomorrow. Just need to ask to mesa/nouveau team if RD3D is working on nouveau or not since on my testing is allways stay D0, besides being set to auto

About switcherooctl not sure if still works.

I’d love to test EnvyControl with Nvk but I don’t own Turing (or later) hardware as I work from a MacBook Pro and my Linux laptop has a GTX 1060.

For my looking to the files it seems the nvidia rules also work on nouveau since it also expose the sames file so that dosent need changes the only think is just detect if nouveau or nvidia is loaded or not. And ajust some files.

The only thing user will need to set is nouveau or nvidia modset.

Nouveau should be modeset by default as it's an in-tree kernel module, supporting this would require a refactor of the logic so we don't mix nouveau with things that only apply to the proprietary driver.

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

@bayasdev envycontrol support change the state without reboot, I dont use envycontrol for a long time.
I was using superglxfctl because of that and vfio, now that I dont use vfio would be good to use envycontrol (I also dont know rust).

No, EnvyControl requires rebooting the machine to switch between modes.

I think these tools like Optimus Manager work by killing the X server so it applies the new config on a hot state as Arch Linux doesn't need to rebuild the initramfs when kernel parameters change.

Superglfx if you disable the dgpu or set the hybrid it basically reload the udev rules and then restart the display manager.
I don't know if that would be possible to do with envycontrol need to look it to it.
For at least integrated and hybrid would be interesting.

I just don't know what nvidia mode does since I never did to use it when switching the mux (if the mode where set to hybrid).

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

Nvk should be kinda easy to implement I will try to see about it tomorrow. Just need to ask to mesa/nouveau team if RD3D is working on nouveau or not since on my testing is allways stay D0, besides being set to auto

About switcherooctl not sure if still works.

I’d love to test EnvyControl with Nvk but I don’t own Turing (or later) hardware as I work from a MacBook Pro and my Linux laptop has a GTX 1060.

For my looking to the files it seems the nvidia rules also work on nouveau since it also expose the sames file so that dosent need changes the only think is just detect if nouveau or nvidia is loaded or not. And ajust some files.
The only thing user will need to set is nouveau or nvidia modset.

Nouveau should be modeset by default as it's an in-tree kernel module, supporting this would require a refactor of the logic so we don't mix nouveau with things that only apply to the proprietary driver.

Yup I notice that some commands would need to disable or change when nouveau is loaded and envycontrol need to check that. I would try to see if I get to a working "prototype".

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

@bayasdev envycontrol support change the state without reboot, I dont use envycontrol for a long time.

I was using superglxfctl because of that and vfio, now that I dont use vfio would be good to use envycontrol (I also dont know rust).

No, EnvyControl requires rebooting the machine to switch between modes.

I think these tools like Optimus Manager work by killing the X server so it applies the new config on a hot state as Arch Linux doesn't need to rebuild the initramfs when kernel parameters change.

Superglfx if you disable the dgpu or set the hybrid it basically reload the udev rules and then restart the display manager, I don't if that would be possible to do with envycontrol need to look it to it.

For at least integrated and hybrid would be interesting.

This is feasible from my POV, if you have enough bandwidth to implement this please send a PR.

I just don't know what nvidia mode does since I never did to use it when switching the mux (if the mode where set to hybrid).

It's basically a Xorg hack where your iGPU becomes a framebuffer device and your dGPU is now in charge of rendering everything.

@MrDuartePT
Copy link

Oh ok I dont need that since I use wayland.

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

Oh ok I dont need that since I use wayland.

AFAIK the only way to get the dGPU work as the primary renderer on Wayland is by having a physical MUX switch that effectively makes your laptop video outputs work like a desktop PC. Since Nvidia's proprietary bs is broken on Wayland hahahaha

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

Oh ok I dont need that since I use wayland.

AFAIK the only way to get the dGPU work as the primary renderer on Wayland is by having a physical MUX switch that effectively makes your laptop video outputs work like a desktop PC. Since Nvidia's proprietary bs is broken on Wayland hahahaha

I think is no possible to change the MUX Switch on the fly (Advanced Optimus) on nouveau as well, but I could be wrong. Also AO can't not work with some Internal display the presence of mux switch is not the only required (the display also affect, mine works tho on Windows, but some Legion 5 with different display model have problems).

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

Oh ok I dont need that since I use wayland.

AFAIK the only way to get the dGPU work as the primary renderer on Wayland is by having a physical MUX switch that effectively makes your laptop video outputs work like a desktop PC. Since Nvidia's proprietary bs is broken on Wayland hahahaha

I think is no possible to change the MUX Switch on the fly (Advanced Optimus) on nouveau as well, but I could be wrong.

If they expose the functions to the kernel it can be made possible for Nouveau devs but seeing how Nvidia was in the past smh

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

I also think that will never happen, was a news saying nvidia was doing it for linux, but well 1.5 year later and nothing.

@bayasdev
Copy link
Owner

bayasdev commented Mar 9, 2024

I also think that will never happen, was a news saying nvidia was doing it for linux, but well 1.5 year later and nothing.

Yup, Nvidia only supports Linux and FreeBSD because their cards are used for AI and super computing at datacenters.

@MrDuartePT
Copy link

And thing are kinda changing slow because some of there partner are demanding, because of RHEL kiling xorg support in the future. But the FreeBSD driver compare to the Linux one is a total mess.

@MrDuartePT
Copy link

MrDuartePT commented Mar 9, 2024

@bayasdev this lightdm script is use for:

NVIDIA_XRANDR_SCRIPT = '''#!/bin/sh

I dont use xorg and never use lightdm

For my understanding is to set NVIDIA and igpu as provider for lightdm, the problem I dont know what name nouveau give. @boxyld you can give the name of the xorg provider using the nouveau.

@boxyld
Copy link
Author

boxyld commented Mar 18, 2024

Oh...sorry for being late i'm not that active on github + i already quit using envycontrol and relay using hybrid mode on default archinstall script

But still i would love to try gain specially cuz i'm just a noob user that st

Maybe there's a lot of stuff that i need to learn

Yeah even i wasn't know to to switch to open source nvidia drivers in general and i have to learn it...it will take a while spically i'm not that active

@boxyld
Copy link
Author

boxyld commented Jul 30, 2024

Update after 4 months LMAO

anyway to make NVK works well we should replace nvidia-drm.modeset=1 to nouveau.config=NvGspRm=1

I switched to NVK manually without useing envycontrol

Anyway hope that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants