chenseanxy / FanControl.LiquidCtl

2 stars 0 forks source link

Fan Control crashes on launch #3

Open cytrus224 opened 2 years ago

cytrus224 commented 2 years ago

Fan Control 132 liquidctl v1.11.1

I tried different python versions, 3.7.9, 3.10.8, none seem to work. Heres some logs:

21.10.2022 19:55:41: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.LiquidCtlPlugin.Initialize()
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Open() w C:\Users\Remi\source\repos\FanControl\FanControl.Library\Domain\BackendProviders\Plugin\PluginBackendProvider.cs:wiersz 50
liquidctl status --json
[{"bus": "hid", "address": "\\\\?\\HID#VID_048D&PID_8297&Col02#6&1d60bfb1&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "Gigabyte RGB Fusion 2.0 8297 Controller", "status": []}, {"bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Liquid temperature", "value": 29.3, "unit": "°C"}, {"key": "Fan speed", "value": 910, "unit": "rpm"}, {"key": "Pump speed", "value": 2034, "unit": "rpm"}]}]
chenseanxy commented 1 year ago

Can you also add liquidctl list --json and liquidctl initialize --json results? Also I have released a version with more verbose logging to help debug this issue: https://github.com/chenseanxy/FanControl.LiquidCtl/releases/tag/v0.1.2b1

cytrus224 commented 1 year ago

results from newest version:

liquidctl list --json
[{"description": "Gigabyte RGB Fusion 2.0 8297 Controller", "vendor_id": 1165, "product_id": 33431, "release_number": 3, "serial_number": "", "bus": "hid", "address": "\\\\?\\HID#VID_048D&PID_8297&Col02#6&1d60bfb1&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}", "port": null, "driver": "RgbFusion2", "experimental": false}, {"description": "NZXT Kraken X (X42, X52, X62 or X72)", "vendor_id": 7793, "product_id": 5902, "release_number": 512, "serial_number": "49873154343", "bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "port": null, "driver": "Kraken2", "experimental": false}]
liquidctl initialize --json
ERROR: too many devices, filter or select one (see: liquidctl --help)

and also errorlogs from testing it out with fan control v136

18.11.2022 19:25:07: exec initialize
18.11.2022 19:25:07: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.LiquidCtlPlugin.Initialize()
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Open()
cytrus224 commented 1 year ago
liquidctl initialize -d 1 --json
WARNING: -d/--device is deprecated, prefer --match or other selection options
[{"bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Firmware version", "value": "6.2", "unit": ""}]}]

(device ID for kraken device is # 1)

chenseanxy commented 1 year ago

liquidctl initialize --json ERROR: too many devices, filter or select one (see: liquidctl --help)

Hmmm we might need a way to enable configuration for device selection... Lemme see if there is a way to skip this

chenseanxy commented 1 year ago

Not sure if this works: https://github.com/chenseanxy/FanControl.LiquidCtl/commit/22c7665cf4c3ed900d5331fa99e87f2f9d725c2c

You can download this temp build here: https://github.com/chenseanxy/FanControl.LiquidCtl/suites/9390392071/artifacts/442819320

cytrus224 commented 1 year ago

It launches, however i only see PUMP and FAN speeds in Speeds section. I tried to Refresh Sensors detection, so i could have control over them, however app crashes after like 1-2s without producing any logs

chenseanxy commented 1 year ago

Hmmm seems like the same issue as #2, lemme see if i can reproduce this

chenseanxy commented 1 year ago

Here seems to be the issue: the speeds are present, but the duty cycle isn't.. Can you specify which device you are currently using?

Here's mine liquidctl status:

[{"bus": "hid", "address": "\\\\?\\hid#vid_1e71&pid_2007#7&1f09b849&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X53, X63 or X73)", "status": [{"key": "Liquid temperature", "value": 35.4, "unit": "°C"}, {"key": "Pump speed", "value": 1162, "unit": "rpm"}, {"key": "Pump duty", "value": 25, "unit": "%"}]}]

Notice they Pump duty -> 25%, I believe without this channel, the device cannot be controlled

You could try controlling with raw liquidctl first: https://github.com/liquidctl/liquidctl#initializing-and-interacting-with-devices and if you got any success you could paste the commands here

Also the crash upon sensor detection refresh issue haven't been identified yet. However the plugin shouldn't need any form of manual refresh, all devices are detected upon startup.

cytrus224 commented 1 year ago

I'm using Kraxen x62 280mm AIO, will try controlling with liquidctl itself soonTM!

cytrus224 commented 1 year ago

Looks like controlling FAN speed works, i've set fans to 100% with this command: liquidctl --match kraken set fan speed 20 100 obraz

chenseanxy commented 1 year ago

Really looks like these x52 devices have no duty cycle reporting.. Which makes the duty cycle settings more difficult

Will see if there's an elegant solution to this..

cytrus224 commented 1 year ago

i guess you can only check RPM speed/temperature every time period for these Xx2 nzxt devices obraz

chenseanxy commented 1 year ago

New version! Added fake control channels to trick FanControl to enable control functionality..

Impl: https://github.com/chenseanxy/FanControl.LiquidCtl/commit/a6a390aefb4f378bbf8959ac67cb82265ddd587d Build avail here: https://github.com/chenseanxy/FanControl.LiquidCtl/suites/9392878392/artifacts/442991226

FanControl will only show the duty cycle at 0% since there's no way to collect the actual duty cycle, and will show discrepancy.

cytrus224 commented 1 year ago
19.11.2022 00:01:16: Adding temp sensor NZXT Kraken X (X42, X52, X62 or X72)_Liquid temperature
19.11.2022 00:01:16: Adding fan sensor NZXT Kraken X (X42, X52, X62 or X72)_Fan speed
19.11.2022 00:01:16: Adding fan sensor NZXT Kraken X (X42, X52, X62 or X72)_Pump speed
19.11.2022 00:01:16: FanControl.LiquidCtl.DeviceSensorFalse
19.11.2022 00:01:16: Interface fan has no control channel, using control only channel, real_channels=[NZXT Kraken X (X42, X52, X62 or X72)_Fan speed]
19.11.2022 00:01:16: Adding control only sensor NZXT Kraken X (X42, X52, X62 or X72)_fan duty
19.11.2022 00:01:16: FanControl.LiquidCtl.DeviceSensorFalse
19.11.2022 00:01:16: Interface pump has no control channel, using control only channel, real_channels=[NZXT Kraken X (X42, X52, X62 or X72)_Pump speed]
19.11.2022 00:01:16: Adding control only sensor NZXT Kraken X (X42, X52, X62 or X72)_pump duty
19.11.2022 00:01:19: Autofac.Core.DependencyResolutionException: An exception was thrown while activating FanControl.ViewModels.MainWindowViewModel. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(FanControl.Domain.IComputerAccessLayer, FanControl.Domain.IApplicationClock, FanControl.Domain.IApplicationContext, FanControl.Domain.IApplicationState, FanControl.Domain.IWindowsSettings, MaterialDesignThemes.Wpf.ISnackbarMessageQueue, FanControl.ViewModels.IFanCurveProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.ViewModels.ICustomSensorProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.Domain.IDialogService, FanControl.Domain.IUpdaterService, FanControl.Domain.ILogger)' on type 'MainWindowViewModel'. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   w Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0()
   w Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func`1 creator)
   w Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable`1 qualifyingId, Func`1 creator)
   w Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   w Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   w Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
   w Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   w Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   w Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
   w FanControl.App.<OnStartup>d__11.MoveNext()
19.11.2022 00:01:19: Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(FanControl.Domain.IComputerAccessLayer, FanControl.Domain.IApplicationClock, FanControl.Domain.IApplicationContext, FanControl.Domain.IApplicationState, FanControl.Domain.IWindowsSettings, MaterialDesignThemes.Wpf.ISnackbarMessageQueue, FanControl.ViewModels.IFanCurveProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.ViewModels.ICustomSensorProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.Domain.IDialogService, FanControl.Domain.IUpdaterService, FanControl.Domain.ILogger)' on type 'MainWindowViewModel'. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   w Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
19.11.2022 00:01:19: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
19.11.2022 00:01:21: Unhandled exception in FanControl v1.0.0.0
19.11.2022 00:01:21: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.<>c.<Close>b__13_0(PluginControlSensor x)
   w System.Collections.Generic.List`1.ForEach(Action`1 action)
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Close()
   w System.Collections.Generic.List`1.ForEach(Action`1 action)
   w FanControl.Domain.ComputerAccessLayer.Close()
   w Autofac.Core.Disposer.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w Autofac.Core.Lifetime.LifetimeScope.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w Autofac.Core.Container.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w FanControl.App.OnExit(ExitEventArgs e)
   w System.Windows.Application.DoShutdown()
   w System.Windows.Application.ShutdownImpl()
   w System.Windows.Application.ShutdownCallback(Object arg)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
chenseanxy commented 1 year ago

Is the app lanuching correctly? Looks like the exception is in Reset().. New build with more logs https://github.com/chenseanxy/FanControl.LiquidCtl/suites/9393060145/artifacts/443003761

cytrus224 commented 1 year ago

app is crashing on launching

19.11.2022 00:26:10: exec initialize all
19.11.2022 00:26:11: initialize all => [{"bus": "hid", "address": "\\\\?\\HID#VID_048D&PID_8297&Col02#6&1d60bfb1&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "Gigabyte RGB Fusion 2.0 8297 Controller", "status": [{"key": "Hardware name", "value": "IT8297-GIGABYTE V1.0.1.0", "unit": ""}, {"key": "Firmware version", "value": "1.0.1.0", "unit": ""}]}, {"bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Firmware version", "value": "6.2", "unit": ""}]}]
19.11.2022 00:26:11: exec status
19.11.2022 00:26:11: status => [{"bus": "hid", "address": "\\\\?\\HID#VID_048D&PID_8297&Col02#6&1d60bfb1&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "Gigabyte RGB Fusion 2.0 8297 Controller", "status": []}, {"bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Liquid temperature", "value": 29.4, "unit": "°C"}, {"key": "Fan speed", "value": 917, "unit": "rpm"}, {"key": "Pump speed", "value": 2040, "unit": "rpm"}]}]
19.11.2022 00:26:11: Adding temp sensor NZXT Kraken X (X42, X52, X62 or X72)_Liquid temperature
19.11.2022 00:26:11: Adding fan sensor NZXT Kraken X (X42, X52, X62 or X72)_Fan speed
19.11.2022 00:26:11: Adding fan sensor NZXT Kraken X (X42, X52, X62 or X72)_Pump speed
19.11.2022 00:26:11: Interface fan has no control channel, using control only channel, real_channels=[NZXT Kraken X (X42, X52, X62 or X72)_Fan speed]
19.11.2022 00:26:11: Adding control only sensor NZXT Kraken X (X42, X52, X62 or X72)_fan duty
19.11.2022 00:26:11: Interface pump has no control channel, using control only channel, real_channels=[NZXT Kraken X (X42, X52, X62 or X72)_Pump speed]
19.11.2022 00:26:11: Adding control only sensor NZXT Kraken X (X42, X52, X62 or X72)_pump duty
19.11.2022 00:26:11: exec status
19.11.2022 00:26:12: status => [{"bus": "hid", "address": "\\\\?\\HID#VID_048D&PID_8297&Col02#6&1d60bfb1&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "Gigabyte RGB Fusion 2.0 8297 Controller", "status": []}, {"bus": "hid", "address": "\\\\?\\HID#VID_1E71&PID_170E#7&12b9e089&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Liquid temperature", "value": 29.4, "unit": "°C"}, {"key": "Fan speed", "value": 916, "unit": "rpm"}, {"key": "Pump speed", "value": 2034, "unit": "rpm"}]}]
19.11.2022 00:26:13: exec set fan speed 0
19.11.2022 00:26:13: Autofac.Core.DependencyResolutionException: An exception was thrown while activating FanControl.ViewModels.MainWindowViewModel. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(FanControl.Domain.IComputerAccessLayer, FanControl.Domain.IApplicationClock, FanControl.Domain.IApplicationContext, FanControl.Domain.IApplicationState, FanControl.Domain.IWindowsSettings, MaterialDesignThemes.Wpf.ISnackbarMessageQueue, FanControl.ViewModels.IFanCurveProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.ViewModels.ICustomSensorProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.Domain.IDialogService, FanControl.Domain.IUpdaterService, FanControl.Domain.ILogger)' on type 'MainWindowViewModel'. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   w Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0()
   w Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func`1 creator)
   w Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable`1 qualifyingId, Func`1 creator)
   w Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   w Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   w Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request)
   w Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   w Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   w Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
   w FanControl.App.<OnStartup>d__11.MoveNext()
19.11.2022 00:26:13: Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(FanControl.Domain.IComputerAccessLayer, FanControl.Domain.IApplicationClock, FanControl.Domain.IApplicationContext, FanControl.Domain.IApplicationState, FanControl.Domain.IWindowsSettings, MaterialDesignThemes.Wpf.ISnackbarMessageQueue, FanControl.ViewModels.IFanCurveProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.ViewModels.ICustomSensorProvider`1[FanControl.ViewModels.MainWindowViewModel], FanControl.Domain.IDialogService, FanControl.Domain.IUpdaterService, FanControl.Domain.ILogger)' on type 'MainWindowViewModel'. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   w Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass12_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext ctxt, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   w Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   w Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
19.11.2022 00:26:13: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.Control..ctor(IControlSensor control, IControlConfig controlConfig, IFanCurveRepository fanCurveRepository, ISensorRepository sensorRepository)
   w FanControl.ViewModels.ControlViewModel..ctor(IControlSensor controlSensor, ObservableCollection`1 fanCurves, ObservableCollection`1 fanSensors, IApplicationClock applicationClock, Func`1 selectMatchingFan, Func`2 automaticSelectMatchingFan, Func`2 automaticStartDetectionFan, Func`2 automaticStopDetectionSingleFan, Func`2 showForceApplyDialog)
   w FanControl.ViewModels.MainWindowViewModel.<LoadSensors>b__133_4(IControlSensor cs)
   w System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   w FanControl.MVVM.Extentions.AddRange[T](ObservableCollection`1 observableCollection, IEnumerable`1 items)
   w FanControl.ViewModels.MainWindowViewModel..ctor(IComputerAccessLayer computerAccessLayer, IApplicationClock applicationClock, IApplicationContext applicationContext, IApplicationState applicationState, IWindowsSettings windowsSetting, ISnackbarMessageQueue messageQueue, IFanCurveProvider`1 fanCurveProvider, ICustomSensorProvider`1 customSensorProvider, IDialogService dialogService, IUpdaterService updaterService, ILogger logger)
   w lambda_method(Closure , Object[] )
   w Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
19.11.2022 00:26:17: exec set fan speed 0
19.11.2022 00:26:17: Unhandled exception in FanControl v1.0.0.0
19.11.2022 00:26:17: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Nie można niejawnie przekonwertować typu „Python.Runtime.PyObject” na „string”.
   w CallSite.Target(Closure , CallSite , Object )
   w FanControl.LiquidCtl.LiquidCtlExecutor.Execute[T](String arguments)
   w FanControl.LiquidCtl.ControlSensor.Reset()
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.<>c.<Close>b__13_0(PluginControlSensor x)
   w System.Collections.Generic.List`1.ForEach(Action`1 action)
   w FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Close()
   w System.Collections.Generic.List`1.ForEach(Action`1 action)
   w FanControl.Domain.ComputerAccessLayer.Close()
   w Autofac.Core.Disposer.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w Autofac.Core.Lifetime.LifetimeScope.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w Autofac.Core.Container.Dispose(Boolean disposing)
   w Autofac.Util.Disposable.Dispose()
   w FanControl.App.OnExit(ExitEventArgs e)
   w System.Windows.Application.DoShutdown()
   w System.Windows.Application.ShutdownImpl()
   w System.Windows.Application.ShutdownCallback(Object arg)
   w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   w System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
chenseanxy commented 1 year ago

Hey sorry for the late response, but seems like the issue is with 0% speed being issued.. Can you test out the following for me:

liquidctl set fan speed 0
liquidctl set pump speed 0
liquidctl set fan speed 5
liquidctl set pump speed 5
cytrus224 commented 1 year ago

I don't think it did anything. obraz

cytrus224 commented 1 year ago

https://github.com/liquidctl/liquidctl/blob/main/docs/kraken-x2-m2-guide.md#fan-and-pump-speeds Minimum duty/speed for fans are 25%, whereas pump is 50%(or 60%, not sure)

obraz obraz

cytrus224 commented 1 year ago

Updated to fancontrol v139 net7.0, same error happens as in https://github.com/chenseanxy/FanControl.LiquidCtl/issues/3#issuecomment-1320648161 . I made sure NZXT CAM is turned off. If its on, app doesn't produce any error popup and I only get these logs:

05.12.2022 19:10:47: exec initialize all 05.12.2022 19:10:48: initialize all => [] 05.12.2022 19:10:48: exec status 05.12.2022 19:10:48: status => [] 05.12.2022 19:10:48: exec status 05.12.2022 19:10:48: status => []

momala454 commented 1 year ago

i have also a crash on startup

03/01/2023 23:55:18: Python.Runtime.PythonException: No module named 'Plugins' à Python.Runtime.PythonException.ThrowLastAsClrException() à Python.Runtime.NewReferenceExtensions.BorrowOrThrow(NewReference& reference) à Python.Runtime.PyModule.Import(String name) à FanControl.LiquidCtl.LiquidCtlExecutor.Init() à FanControl.LiquidCtl.LiquidCtlPlugin.Initialize() à FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Open()

liquidctl list --json [{"description": "NZXT Kraken X (X42, X52, X62 or X72)", "vendor_id": 7793, "product_id": 5902, "release_number": 512, "serial_number": "xxx", "bus": "hid", "address": "\\?xxxx", "port": null, "driver": "Kraken2", "experimental": false}]

liquidctl status --json [{"bus": "hid", "address": "\xxxx", "description": "NZXT Kraken X (X42, X52, X62 or X72)", "status": [{"key": "Liquid temperature", "value": 40.1, "unit": "°C"}, {"key": "Fan speed", "value": 486, "unit": "rpm"}, {"key": "Pump speed", "value": 1970, "unit": "rpm"}]}]

python 3.11 your latest beta version 0.1.2b1 fancontrol 1.42