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

Not working if the fan is not detected #206

Open
francescortu opened this issue Oct 22, 2022 · 18 comments
Open

Not working if the fan is not detected #206

francescortu opened this issue Oct 22, 2022 · 18 comments
Assignees
Labels
bug help wanted needs review Issue/PR needs response/review

Comments

@francescortu
Copy link

In my laptop nvidia-settings don't detect the fan speed, so when the extension start raise an error.

There is a way to deleted the fan query from the code?
I tried to deleted some things in the code but when I install the application, although there is no more error, do not shown the icons in the top bar.

Some suggestions?
Thanks

@francescortu francescortu changed the title Not working if the fan is not detected Not working if the fan is not detected 🐛 Oct 22, 2022
@francescortu francescortu changed the title Not working if the fan is not detected 🐛 Not working if the fan is not detected Oct 22, 2022
@derenv derenv added bug needs review Issue/PR needs response/review labels Nov 1, 2022
@jherubin
Copy link

jherubin commented Nov 6, 2022

I can confirm that after an upgrade to Ubuntu 22.04 I started getting an error notification popping up every 5 seconds related to the gpu fan speed. Here is the exact error from the journal:

Nov 06 11:37:50 mylaptop gnome-shell[4448]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.

I can change the stats tool to only show Nvidia SMI to suppres the errors. It returns when set to Nvidia Settings.

When I execute that query manually here are the results:

me@mylaptop:~$ nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t
graphics=0, memory=0, video=0, PCIe=0
43
287
4096

ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.

Hope that helps.

@merajmasuk
Copy link

On some systems nvidia-settings doesn't provide fan speed detection support. On my HP Pavilion laptop it says-

$ nvidia-settings -q all | grep GPUCurrentFanSpeed

ERROR: The requested operation is not available on target device


ERROR: The requested operation is not available on target device


ERROR: The requested operation is not available on target device


ERROR: The requested operation is not available on target device


ERROR: The requested operation is not available on target device


ERROR: The requested operation is not available on target device

I'm using Pop_OS! 22.04 with nvidia-settings version 510.47.03. The GPU is nVidia GeForce 940MX along with Intel HD Graphics (i.e. it's a hybrid GPU system).

@derenv
Copy link
Collaborator

derenv commented Nov 30, 2022

@merajmasuk @Francesc0rtu

Is there a reason any of you are using nvidia-settings over optimus as the provider? (I don't have a laptop with an Nvidia GPU or i would check to see the differences myself, i haven't used the extension itself in quite some time either)

(@jherubin are you also using a laptop?)

nvidia-settings won't be able to do fan queries on laptops where the GPU (discreet or iGPU i guess) doesn't have a separate fan/cooling system.

EDIT: follow up question, does the error crash the extension?

@jherubin
Copy link

jherubin commented Dec 9, 2022

@derenv Yes, I am using a laptop. It's a Dell XPS 9570 with a GeForce GTX 1050 Ti discrete GPU. For your follow-up question: When I get those errors it does not crash the extension.

@merajmasuk
Copy link

@derenv Nope, I'm not using Optimus that's for sure.

@francescortu
Copy link
Author

@derenv
No I also don't use Optimus. I have installed the nvidia driver recommended.
For sure the cooling system is not separate and the error doesn't crash the extension. However with nvidia-settings/ nvidia-smi I can retrieve all the information

@derenv derenv self-assigned this Dec 12, 2022
@derenv derenv removed the needs review Issue/PR needs response/review label Dec 12, 2022
derenv pushed a commit that referenced this issue Dec 12, 2022
- Added "parse()" function to "FanProperty" class, checks if output is equal to "ERROR: The requested operation is not available on target device" and responds accordingly
- A bunch of debug logging for testing
- Need to check the equivalent error from "nvidia-smi" if there are no fans (will apply to optimus too)
- Need to check if "N/A" message is reasonable

Signed-off-by: derenv <[email protected]>
@derenv
Copy link
Collaborator

derenv commented Dec 12, 2022

@jherubin @merajmasuk @Francesc0rtu I've implemented an initial fix, but the branch ("fan_not_detected") needs testing as i don't have equivalent hardware:

  • Does the fix work for you? i.e. does it catch the error and print "N/A" in the properties' slot?
  • Does it also work for nvidia-smi?
  • If not, what's the error message given? or is it an empty string?
    ^ this last one is important!

I've added a couple log statements in the new function just for testing/debugging (see the modified file) which you can view using 'journalctl' and/or 'journalctl | grep -e 'nvidia gnome extension"' in the command line (The latter won't catch any errors).

@derenv derenv added help wanted needs review Issue/PR needs response/review labels Dec 13, 2022
@francescortu
Copy link
Author

@derenv I tried, this is the result:

  • The fix doesn't work for me, do not print anything in the slots and the error is: " Error resolving target specification "(No targets match target specification), specified in query 'GPUCurrentFanSpeed'.
  • This is the log from the journal:
    "dic 17 12:15:47 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x55d77341d290 StLabel.monospace:insensitive ("100%")] which is not in the stage.
    "

@derenv
Copy link
Collaborator

derenv commented Dec 17, 2022

I tried, this is the result:

  • The fix doesn't work for me, do not print anything in the slots and the error is:
    " Error resolving target specification "(No targets match target specification), specified in query 'GPUCurrentFanSpeed'.

Huh.. If the nvidia-settings subprocess fails the error message should be different (see processor.js:49), and the fix in the new branch should catch a rubbish input from a nvidia-settings property (or at the very least print it out to the log, see settingsProperties.js:82).

  • This is the log from the journal:
    "dic 17 12:15:47 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x55d77341d290 StLabel.monospace:insensitive ("100%")] which is not in the stage."

Can you post the full journalctl log (not journalctl | grep -e 'nvidia gnome extension) starting from when you restart X11/Wayland after the make install? I'm unsure where the first error is generated and i don't think the second log entry is related to this issue.

@francescortu
Copy link
Author

The journal is:

dic 17 14:58:54 dell-fra gnome-shell[3299]: GNOME Shell started at Sat Dec 17 2022 14:58:51 GMT+0100 (CET)
dic 17 14:58:54 dell-fra gnome-shell[3299]: Registering session with GDM
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowGroup>:0x55588d87a310] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55588fb18740] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55588fb1c6e0] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55588fb19700] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55588fb1d4e0] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55588fb19af0] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55588fb1d860] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55588fe70750] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55588fe72360] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaWindowActorX11>:0x55588fe71320] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: Can't update stage views actor <unnamed>[<MetaSurfaceActorX11>:0x55588fe72de0] is on because it needs an allocation.
dic 17 14:58:54 dell-fra gnome-shell[3299]: DING: Detected async api for thumbnails
dic 17 14:58:54 dell-fra wpa_supplicant[835]: wlp0s20f3: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-62 noise=9999 txrate=270000
dic 17 14:58:54 dell-fra gnome-shell[3299]: DING: GNOME nautilus 42.2
dic 17 14:58:57 dell-fra wpa_supplicant[835]: wlp0s20f3: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-66 noise=9999 txrate=400000
dic 17 14:58:59 dell-fra wpa_supplicant[835]: wlp0s20f3: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-62 noise=9999 txrate=400000
dic 17 14:59:00 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.
dic 17 14:59:09 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.
dic 17 14:59:13 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x55589461aff0 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:13 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x5558916b0a00 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:13 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x5558945fd380 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:19 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x55588dc88ac0 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:19 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x5558912c3250 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:19 dell-fra gnome-shell[3299]: st_widget_get_theme_node called on the widget [0x555894523c80 StLabel.monospace:insensitive ("100%")] which is not in the stage.
dic 17 14:59:19 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.
dic 17 14:59:27 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'.
dic 17 14:59:36 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'

In addition I have tried to remove the Fan query from the src. Now the extension seems work, however I don't understand why is shown as in the picture and I cannot see the icons on the top bar.
Screenshot from 2022-12-17 15-08-36

@derenv
Copy link
Collaborator

derenv commented Dec 17, 2022

@Francesc0rtu Ah, it is being caught by processor.js:49

dic 17 14:59:36 dell-fra gnome-shell[3299]: error: Execution of nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t failed:: ERROR: Error resolving target specification '' (No targets match target specification), specified in query 'GPUCurrentFanSpeed'

nvidia-settings -q GPUUtilization -q [GPU]/GPUCoreTemp -q UsedDedicatedGPUMemory -q TotalDedicatedGPUMemory -q GPUCurrentFanSpeed -t

^The call to nvidia-settings will return a failure error status but still return the other values (GPUUtilization, GPUCoreTemp, UsedDedicatedGPUMemory, TotalDedicatedGPUMemory). This means it triggers the catch block in the execCommunicate() function (see subprocess.js:99)..

This is because the extension joins the properties into a single call - a possible solution could be to create another provider that acts as a duplicate of settingsProvider.js with only the fan settings property removed. I'll update the 'fan_not_detected' branch at some point today with a first implementation of this.

@derenv
Copy link
Collaborator

derenv commented Jan 2, 2023

New fix is now implemented in the 'fan_not_detected' branch! Sorry for the delay, i managed to have a bunch of issues with my VM's right before Christmas.

There's now 3 new options for providers, labelled a "Laptop" version that has no fan property. Let me know if this works for you.

@grantemj
Copy link

grantemj commented Jan 8, 2023

A potential way to mitigate things like this in the future is to have each individual thing be toggleable in the settings. If it's done that way you wouldn't have to have another option for "Laptop" (and potentially not need options in general & just go off of what's enabled).

@derenv
Copy link
Collaborator

derenv commented Jan 10, 2023

A potential way to mitigate things like this in the future is to have each individual thing be toggleable in the settings. If it's done that way you wouldn't have to have another option for "Laptop" (and potentially not need options in general & just go off of what's enabled).

You can already enable/disable each property by clicking on it - unsure if this was working for the people with the error or if it was breaking things!

@merajmasuk
Copy link

You can already enable/disable each property by clicking on it

Correct me if I'm wrong but I don't think it works that way. I think by clicking on you can only choose whether a property will be displayed on the panel or not.

Before:
image

After:
image

You can also see from the screenshot that the latest fix (the options with Laptop suffix) from fan_not_detected branch is working for me just fine.

@derenv
Copy link
Collaborator

derenv commented Feb 22, 2024

@kenohassler would appreciate your thoughts here!

branch fan_not_detected adds duplicate providers without fan statistics as this creates errors for some laptops, this needs further discussion:

  • should we have these as explicit providers? i.e. as branch fan_not_detected currently exists - solves the issue but is a bit verbose in terms of number of providers
  • or, as a single toggle in settings that sets a stored variable and an if-statement in the existing providers to not provide fan statistic - solves this issue and is simpler for anyone with this issue but is very specific
  • or, as @grantemj suggested, toggles for each statistic - bit more of a general solution, would probably make similar errors non-issues in future (but would be a bit more work to implement)

either way the branch needs rebased and updated, and should probably come after the changes in #213 and #214.

@kenohassler
Copy link
Collaborator

Hi @derenv,
I agree with you, duplicating the providers seems like a dirty fix. The cleanest solution would perhaps be to catch these errors and handle them without user interaction?
First glance, I'd say the Processor needs a rewrite so we can remove properties from it (it's ugly code anyways).
If that's too much effort, let's just do a global toggle instead 🤷

@derenv
Copy link
Collaborator

derenv commented Feb 22, 2024

@kenohassler

The cleanest solution would perhaps be to catch these errors and handle them without user interaction?

agreed, reducing the number of user settings is probably a good idea - it will definitely need a log entry though, so if the detection misbehaves users can report this via an issue.

First glance, I'd say the Processor needs a rewrite so we can remove properties from it (it's ugly code anyways).
If that's too much effort, let's just do a global toggle instead 🤷

I'll have a look at this in the near future, thanks for the starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted needs review Issue/PR needs response/review
Projects
Status: Needs triage
Development

No branches or pull requests

6 participants