Skip to content

Commit

Permalink
Merge pull request #17 from wiiznokes/libcosmic
Browse files Browse the repository at this point in the history
Libcosmic
  • Loading branch information
wiiznokes authored Dec 3, 2023
2 parents 47e6784 + d76da98 commit a000c8d
Show file tree
Hide file tree
Showing 42 changed files with 2,805 additions and 2,037 deletions.
6 changes: 5 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ LMSENSORS_STATIC = "1"
LMSENSORS_INCLUDE_DIR = { value = "target/libsensors_build/include", relative = true }
LMSENSORS_LIB_DIR = { value = "target/libsensors_build/lib", relative = true }
RUST_LOG = "fan_control=debug,data=info,hardware=debug,ui=debug"
#RUST_BACKTRACE = "1"
#RUST_BACKTRACE = "full"

[build]
# Because compilation fails on Fedora 39 if not enabled
rustflags = ["-C", "relocation-model=dynamic-no-pic"]
64 changes: 0 additions & 64 deletions .config/config1.toml

This file was deleted.

32 changes: 0 additions & 32 deletions .config/config3.toml

This file was deleted.

28 changes: 0 additions & 28 deletions .config/config4.toml

This file was deleted.

2 changes: 1 addition & 1 deletion .config/config2.toml → .config/fake.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "control1"
input = "linear1"
id = "control1"
auto = false
active = true

[[Linear]]
name = "linear1"
Expand Down
92 changes: 92 additions & 0 deletions .config/lin.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[[Control]]
name = "pwm2 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm2"
input = "linear1"
active = true

[[Control]]
name = "pwm3 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm3"
input = "target1"
active = true

[[Control]]
name = "pwm4 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm4"
input = "flat1"
active = true


[[Flat]]
name = "flat1"
value = 100

[[Linear]]
name = "linear1"
input = "CPU"
minTemp = 10
minSpeed = 10
maxTemp = 70
maxSpeed = 100



[[Target]]
name = "target1"
input = "GPU"
idleTemp = 40
idleSpeed = 10
loadTemp = 70
loadSpeed = 100




[[CustomTemp]]
name = "CPU"
kind = "Average"
input = [
"TSI0_TEMP nct6798-isa-0290",
"AUXTIN1 nct6798-isa-0290",
]

[[CustomTemp]]
name = "GPU"
kind = "Average"
input = [
]



[[Temp]]
name = "TSI0_TEMP nct6798-isa-0290"
id = "nct6798-isa-0290-temp11_input"

[[Temp]]
name = "AUXTIN1 nct6798-isa-0290"
id = "nct6798-isa-0290-temp4_input"

[[Temp]]
name = "Tctl k10temp-pci-00c3"
id = "k10temp-pci-00c3-temp1_input"

[[Temp]]
name = "Tccd1 k10temp-pci-00c3"
id = "k10temp-pci-00c3-temp3_input"

[[Temp]]
name = "Composite nvme-pci-0100"
id = "nvme-pci-0100-temp1_input"


[[Fan]]
name = "fan2 nct6798-isa-0290"
id = "nct6798-isa-0290-fan2_input"

[[Fan]]
name = "fan3 nct6798-isa-0290"
id = "nct6798-isa-0290-fan3_input"

[[Fan]]
name = "fan4 nct6798-isa-0290"
id = "nct6798-isa-0290-fan4_input"
4 changes: 2 additions & 2 deletions .config/settings.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit = "Celsius"
update_delay = 0
update_delay = 1000
disable_pwm_value = 0
current_config = "config4.toml"
current_config = "win.toml"
28 changes: 28 additions & 0 deletions .config/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@


[[Control]]
name = "pwm2 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm2"
input = "flat1"
active = true

[[Control]]
name = "pwm3 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm3"
input = "flat2"
active = true

[[Control]]
name = "pwm4 nct6798-isa-0290"
id = "nct6798-isa-0290-pwm4"
input = "flat2"
active = true


[[Flat]]
name = "flat1"
value = 100

[[Flat]]
name = "flat2"
value = 0
92 changes: 92 additions & 0 deletions .config/win.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[[Control]]
name = "CPU"
id = "/lpc/nct6798d/control/1"
input = "linear1"
active = true

[[Control]]
name = "Fan #3"
id = "/lpc/nct6798d/control/2"
input = "flat1"
active = true

[[Control]]
name = "Fan #4"
id = "/lpc/nct6798d/control/3"
input = "flat1"
active = true


[[Control]]
name = "GPU Fan 1"
id = "/gpu-nvidia/0/control/1"
input = "target1"
active = true


[[Control]]
name = "GPU Fan 2"
id = "/gpu-nvidia/0/control/2"
input = "target1"
active = true



[[Flat]]
name = "flat1"
value = 100

[[Linear]]
name = "linear1"
input = "CPU"
minTemp = 10
minSpeed = 10
maxTemp = 70
maxSpeed = 100



[[Target]]
name = "target1"
input = "GPU"
idleTemp = 40
idleSpeed = 10
loadTemp = 70
loadSpeed = 100




[[CustomTemp]]
name = "CPU"
kind = "Average"
input = [
"Core (Tctl/Tdie)",
"CCD1 (Tdie)",
]

[[CustomTemp]]
name = "GPU"
kind = "Average"
input = [
"GPU Core",
"GPU Hot Spot"
]



[[Temp]]
name = "Core (Tctl/Tdie)"
id = "/amdcpu/0/temperature/2"

[[Temp]]
name = "CCD1 (Tdie)"
id = "/amdcpu/0/temperature/4"

[[Temp]]
name = "GPU Core"
id = "/gpu-nvidia/0/temperature/0"

[[Temp]]
name = "GPU Hot Spot"
id = "/gpu-nvidia/0/temperature/2"
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
}
},
"args": [
"-p",
"./.config"
//"-p",
//"./.config"
],
"cwd": "${workspaceFolder}"
},
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"rust-analyzer.showUnlinkedFileNotification": false,
"rust-analyzer.cargo.features": ["fake_hardware"]
//"rust-analyzer.cargo.features": ["fake_hardware"]
}
Loading

0 comments on commit a000c8d

Please sign in to comment.