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

GPU infos aren't shown when Discrete GPU has been removed from dashboard #1501

Open
Ace-Radom opened this issue Nov 26, 2024 · 5 comments · May be fixed by #1502
Open

GPU infos aren't shown when Discrete GPU has been removed from dashboard #1501

Ace-Radom opened this issue Nov 26, 2024 · 5 comments · May be fixed by #1502
Labels
bug Something isn't working

Comments

@Ace-Radom
Copy link
Contributor

Ace-Radom commented Nov 26, 2024

Version

2.24.2

OS

Windows 11

Device

LOQ 15IRH8

BIOS version

LZCN38WW

What is wrong?

Discussed in #1488.

Ekran görüntüsü 2024-11-13 202128
Sometimes my GPU info doesn't show up, it's not disabled and I'm using it with the monitor. I don't remember if it's connected to the last update. Is this a problem or is it me?

Originally posted by @KerimSaman in #1488

What did you try already?

Add & remove Discrete GPU item on dashboard, connect an external monitor to force dGPU on under hybrid mode.

How to reproduce the bug?

  1. Go to Dashboard.
  2. Click Customize.
  3. Remove Discrete GPU under Graphics section.
  4. Apply the new dashboard setting.
  5. Restart LLT.
  6. GPU infos aren't shown on dashboard.
  7. Click Customize and add Discrete GPU item back.
  8. GPU infos are shown correctly.

What is the behavior that you expected?

GPU infos should be shown regardless of whether Discrete GPU is on dashboard or not.

Logs

This log is provided by @KerimSaman: log_2024_11_18_13_55_54.txt

This log is created on my device during bug reproduce: log_2024_11_26_15_10_09.txt

Additional information

Reproduce environment:

  • Version: 2.24.2
  • OS: Windows 11 23H2
  • Device: Legion R9000p 2021H
  • BIOS Version: GKCN64WW

Should be fixed by #1502.

@Ace-Radom Ace-Radom added the bug Something isn't working label Nov 26, 2024
@Ace-Radom
Copy link
Contributor Author

Ace-Radom commented Nov 26, 2024

This bug is most likely caused by GPUController uninitialized. Currently GPUController is started by DiscreteGPUControl on startup.

protected override async Task OnRefreshAsync()
{
if (!_gpuController.IsSupported())
throw new InvalidOperationException("Unsupported operation");
if (!IsVisible)
return;
await _gpuController.StartAsync();
}

But SensorsControl doesn't call GPUController to start, which means GPUController._state is GPUState.Unknown and won't be refreshed. And when SensorsControl tries to get GPU infos with AbstractSensorsController.GetGPUInfoAsync() method, GPUController.GetLastKnownStateAsync() returns GPUState.Unknown which causes the method to break directly.

private async Task<GPUInfo> GetGPUInfoAsync()
{
if (await gpuController.GetLastKnownStateAsync().ConfigureAwait(false) is GPUState.PoweredOff or GPUState.Unknown)
return GPUInfo.Empty;

@Ace-Radom
Copy link
Contributor Author

FYI: @KerimSaman

@KerimSaman
Copy link

For someone who wants to use the dashboard in a simpler way, this might work.

@Ace-Radom
Copy link
Contributor Author

Here is the installer created by gh actions.
If chrome marks it as a virus and cannot keep the installer (that's what chrome on my device does all the days) here is also one built in my local environment: LenovoLegionToolkitSetup.zip.

@KerimSaman
Copy link

image

Here is the installer created by gh actions. If chrome marks it as a virus and cannot keep the installer (that's what chrome on my device does all the days) here is also one built in my local environment: LenovoLegionToolkitSetup.zip.

Yes it works, discrete GPU is off and GPU information still shows. Good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants