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

Use of cache is not clear #167

Closed
cMancio00 opened this issue May 15, 2024 · 4 comments
Closed

Use of cache is not clear #167

cMancio00 opened this issue May 15, 2024 · 4 comments
Labels
question Further information is requested

Comments

@cMancio00
Copy link
Contributor

Don't know how to classify it, question or bug.

I wanted to use the new cache feature but I'm unsure that I understood how it works since it doesn't work in my pc.

I have a Dell Inc. Inspiron 16 7610, with i7-11800H a 3050ti and proprietary drivers. Everything works as intended in Integrated, hybrid and nvidia mode.

According to the readme I should be able to switch from Integrated to Nvidia (and viceversa?) without the need to reboot. However I have to reboot all the time.

This is what I've done to use the cache system:

Starting from hybrid mode

sudo envycontrol --cache-create

Using:

sudo envycontrol --cache-query

outputs:

{
    "nvidia_gpu_pci_bus": "PCI:1:0:0"
}

Now the cache is created so I can switch to Integrated mode and reboot with:

sudo envycontrol -s integrated

and then

reboot

After reboot I check that nvidia-smi outputs the error that no drivers are loaded and

envycontrol --query

gives of course integrated.

BTW I am still able to use my external display.

Now I was expecting that using:

sudo envycontrol -s nvidia

will switch mode without rebooting and nvidia-smi will work, but it is not the case.

Am I missing something? Maybe it will work with open source drivers?

Best regards

@cMancio00 cMancio00 added the question Further information is requested label May 15, 2024
@klmcwhirter
Copy link
Contributor

The cache is automatically created when you switch away from hybrid mode. There is no need to use the explicit command line options.

Steps

  • make sure you are in hybrid mode
  • sudo envycontrol -s integrated and reboot
    At this point the cache file has been created and you are in integrated mode.
    You can confirm the cache contents with sudo envycontrol --cache-query

The intent of the cache is to switch directly from integrated mode to nvidia mode without switching to hybrid mode first.
sudo envycontrol -s nvidia and REBOOT! The reboot is required to have the configuration changes take effect.

This works because the dGPU PCI Bus ID is cached so that the information is available when not in hybrid mode. The envycontrol app can then generate the /etc/X11/xorg.conf file with the correct bus id.

See lines switching to nvidia mode that need bus id.

But once those changes have been made, a reboot IS required as usual.

Hope that helps.

@cMancio00
Copy link
Contributor Author

Thanks for the clarification.
I'll do a pull request to add this information on the README that (in my opinion) it is not clear about this topic.
Best regards

@bayasdev
Copy link
Owner

Thanks for the clarification.

I'll do a pull request to add this information on the README that (in my opinion) it is not clear about this topic.

Best regards

Thanks @cMancio00, really appreciate it!

@klmcwhirter
Copy link
Contributor

@cMancio00 - I added some review comments to your PR. Please take a look.

Thanks for taking the time to provide feedback!

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