-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[BUG] CPU占用高 #994
Labels
bug
Something isn't working
Comments
ubuntu 也存在同样的问题,strace看到存在大量的poll系统调用
看样子像是webkit的问题 |
我现在的解解决办法是用最新版本的clash 然后把内核文件换成1.81, 目前看来貌似没啥问题了. |
可以暂时先用1.18.1这个版本的内核,后面OK了再升级成更高版本的内核.
原始邮件
发件人:"zhuyuanping"< ***@***.*** >;
发件时间:2024/5/16 17:16
收件人:"clash-verge-rev/clash-verge-rev"< ***@***.*** >;
抄送人:"liuchao1899"< ***@***.*** >;"Author"< ***@***.*** >;
主题:Re: [clash-verge-rev/clash-verge-rev] [BUG] CPU占用高 (Issue #994)
1.18.1版本之后的内核都有这个严重问题
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
用了楼上的方法好像正常了~
|
我尝试了1.6.4的版本,在我自己的笔记本上面编译了,然后在另一台台式上面安装了,结果笔记本打开面板的时候高占用,但是台式没有类似的情况,然后我把流量图显关掉,CPU占用就降下去了。
|
这是我修改的部分,只是为了解决ubuntu 20.04无法使用的问题,并没有解决CPU高占用 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 50433c1..ddf4f6d 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -679,9 +679,6 @@ name = "bytes"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
-dependencies = [
- "serde",
-]
[[package]]
name = "cairo-rs"
@@ -806,7 +803,7 @@ dependencies = [
"parking_lot",
"percent-encoding",
"port_scanner",
- "reqwest 0.12.4",
+ "reqwest",
"runas",
"serde",
"serde_json",
@@ -2384,19 +2381,6 @@ dependencies = [
"tower-service",
]
-[[package]]
-name = "hyper-tls"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
-dependencies = [
- "bytes",
- "hyper 0.14.28",
- "native-tls",
- "tokio",
- "tokio-native-tls",
-]
-
[[package]]
name = "hyper-tls"
version = "0.6.0"
@@ -3165,12 +3149,6 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
-[[package]]
-name = "minisign-verify"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881"
-
[[package]]
name = "miniz_oxide"
version = "0.7.2"
@@ -4331,48 +4309,6 @@ dependencies = [
"memchr",
]
-[[package]]
-name = "reqwest"
-version = "0.11.27"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62"
-dependencies = [
- "base64 0.21.7",
- "bytes",
- "encoding_rs",
- "futures-core",
- "futures-util",
- "h2 0.3.26",
- "http 0.2.12",
- "http-body 0.4.6",
- "hyper 0.14.28",
- "hyper-tls 0.5.0",
- "ipnet",
- "js-sys",
- "log 0.4.21",
- "mime",
- "native-tls",
- "once_cell",
- "percent-encoding",
- "pin-project-lite",
- "rustls-pemfile 1.0.4",
- "serde",
- "serde_json",
- "serde_urlencoded",
- "sync_wrapper",
- "system-configuration",
- "tokio",
- "tokio-native-tls",
- "tokio-util",
- "tower-service",
- "url",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "wasm-streams",
- "web-sys",
- "winreg 0.50.0",
-]
-
[[package]]
name = "reqwest"
version = "0.12.4"
@@ -4390,7 +4326,7 @@ dependencies = [
"http-body-util",
"hyper 1.3.1",
"hyper-rustls",
- "hyper-tls 0.6.0",
+ "hyper-tls",
"hyper-util",
"ipnet",
"js-sys",
@@ -4401,7 +4337,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"rustls",
- "rustls-pemfile 2.1.2",
+ "rustls-pemfile",
"rustls-pki-types",
"serde",
"serde_json",
@@ -4548,15 +4484,6 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "rustls-pemfile"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
-dependencies = [
- "base64 0.21.7",
-]
-
[[package]]
name = "rustls-pemfile"
version = "2.1.2"
@@ -5317,8 +5244,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "047aefcc7721bfb8024a9bc39d4719112262610502de7a224fa62c4570cd78d4"
dependencies = [
"anyhow",
- "base64 0.21.7",
- "bytes",
"cocoa 0.24.1",
"dirs-next",
"dunce",
@@ -5333,9 +5258,7 @@ dependencies = [
"http 0.2.12",
"ico 0.2.0",
"ignore",
- "indexmap 1.9.3",
"infer 0.9.0",
- "minisign-verify",
"nix 0.26.4",
"notify-rust",
"objc",
@@ -5347,7 +5270,6 @@ dependencies = [
"rand 0.8.5",
"raw-window-handle",
"regex 1.10.4",
- "reqwest 0.11.27",
"rfd",
"semver 1.0.22",
"serde",
@@ -5363,14 +5285,12 @@ dependencies = [
"tauri-utils",
"tempfile",
"thiserror",
- "time",
"tokio",
"url",
"uuid",
"webkit2gtk",
"webview2-com",
"windows 0.39.0",
- "zip",
]
[[package]]
@@ -6374,19 +6294,6 @@ version = "0.2.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
-[[package]]
-name = "wasm-streams"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129"
-dependencies = [
- "futures-util",
- "js-sys",
- "wasm-bindgen",
- "wasm-bindgen-futures",
- "web-sys",
-]
-
[[package]]
name = "wayland-backend"
version = "0.3.3"
@@ -7057,16 +6964,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "winreg"
-version = "0.50.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
-dependencies = [
- "cfg-if",
- "windows-sys 0.48.0",
-]
-
[[package]]
name = "winreg"
version = "0.52.0"
@@ -7369,17 +7266,6 @@ dependencies = [
"syn 2.0.60",
]
-[[package]]
-name = "zip"
-version = "0.6.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
-dependencies = [
- "byteorder",
- "crc32fast",
- "crossbeam-utils",
-]
-
[[package]]
name = "zvariant"
version = "4.0.2"
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 7a91650..7398668 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -37,7 +37,7 @@ serde = { version = "1.0", features = ["derive"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" }
auto-launch = { git="https://github.com/zzzgydi/auto-launch", branch = "main" }
-tauri = { version = "1.6", features = [ "fs-read-file", "fs-exists", "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "icon-ico", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all", "devtools"] }
+tauri = { version = "1.6", features = [ "fs-read-file", "fs-exists", "path-all", "protocol-asset", "dialog-open", "notification-all", "icon-png", "icon-ico", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "window-all", "devtools"] }
[target.'cfg(windows)'.dependencies]
runas = "=1.2.0"
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 738135c..ce642fe 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -11,7 +11,7 @@ mod feat;
mod utils;
use crate::utils::{init, resolve, server};
-use tauri::{api, SystemTray};
+use tauri::SystemTray;
fn main() -> std::io::Result<()> {
// 单例检测
@@ -114,10 +114,6 @@ fn main() -> std::io::Result<()> {
tauri::RunEvent::ExitRequested { api, .. } => {
api.prevent_exit();
}
- tauri::RunEvent::Updater(tauri::UpdaterEvent::Downloaded) => {
- resolve::resolve_reset();
- api::process::kill_children();
- }
tauri::RunEvent::WindowEvent { label, event, .. } => {
if label == "main" {
match event {
diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs
index 7bfa9c1..88d2989 100644
--- a/src-tauri/src/utils/resolve.rs
+++ b/src-tauri/src/utils/resolve.rs
@@ -12,6 +12,7 @@ use serde_yaml::Mapping;
use std::net::TcpListener;
use tauri::api::notification;
use tauri::{App, AppHandle, Manager};
+#[cfg(not(target_os = "linux"))]
use window_shadows::set_shadow;
pub static VERSION: OnceCell<String> = OnceCell::new();
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 3b909b7..18fe461 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -26,16 +26,12 @@
"copyright": "© 2022 zzzgydi All Rights Reserved",
"category": "DeveloperTool",
"shortDescription": "A Clash Meta GUI based on tauri.",
- "longDescription": "A Clash Meta GUI based on tauri."
- },
- "updater": {
- "active": true,
- "endpoints": [
- "https://mirror.ghproxy.com/https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-proxy.json",
- "https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update.json"
- ],
- "dialog": false,
- "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
+ "longDescription": "A Clash Meta GUI based on tauri.",
+ "targets": [
+ "deb",
+ "nsis",
+ "dmg"
+ ]
},
"allowlist": {
"shell": {
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述 / Describe the bug
win10系统,电脑在使用一段时间,或是静置一段时间后(差不多半个小时)会莫名的占用CPU变高导至电脑CPU风扇高转,内核1.18.1之后试过多个版本,只要换回1.18.1内核的版本(1.60和1.5.10)后问题消失。
复现步骤 / To Reproduce
静置电脑一段时间后
操作系统 / OS
Windows
操作系统版本 / OS Version
win10
日志 / Log
05-09 15:38:47INFO
[TCP] 127.0.0.1:12343(firefox.exe) --> rr3---sn-q4flrne7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:47INFO
[TCP] 127.0.0.1:12331(firefox.exe) --> rr3---sn-q4flrne7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:47INFO
[TCP] 127.0.0.1:12315(firefox.exe) --> yt3.ggpht.com:443 match Domain(yt3.ggpht.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:47INFO
[TCP] 127.0.0.1:12344(firefox.exe) --> youtube.com:443 match DomainKeyword(youtube) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:47INFO
[TCP] 127.0.0.1:12350(firefox.exe) --> rr1---sn-5hne6n6e.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:47INFO
[TCP] 127.0.0.1:12356 --> ocsp.pki.goog:80 match DomainSuffix(ocsp.pki.goog) using 🎯 全球直连[DIRECT]
05-09 15:38:48INFO
[TCP] 127.0.0.1:12335(firefox.exe) --> accounts.youtube.com:443 match DomainKeyword(youtube) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:48INFO
[TCP] 127.0.0.1:12342(firefox.exe) --> rr1---sn-q4fl6nz7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:48INFO
[TCP] 127.0.0.1:12360(firefox.exe) --> rr3---sn-q4flrne7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:48INFO
[TCP] 127.0.0.1:12364(firefox.exe) --> rr1---sn-5hne6n6e.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:48INFO
[TCP] 127.0.0.1:12358 --> lh6.googleusercontent.com:443 match DomainKeyword(google) using 🚀 节点选择[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12366(firefox.exe) --> rr1---sn-5hne6n6e.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12372(firefox.exe) --> lh5.googleusercontent.com:443 match DomainKeyword(google) using 🚀 节点选择[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12368(firefox.exe) --> rr3---sn-q4flrne7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12371(firefox.exe) --> lh6.googleusercontent.com:443 match DomainKeyword(google) using 🚀 节点选择[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12362(firefox.exe) --> rr3---sn-q4flrne7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12355 --> fonts.gstatic.com:443 match DomainSuffix(fonts.gstatic.com) using 🎯 全球直连[DIRECT]
05-09 15:38:49INFO
[TCP] 127.0.0.1:12354 --> fonts.gstatic.com:443 match DomainSuffix(fonts.gstatic.com) using 🎯 全球直连[DIRECT]
05-09 15:38:50INFO
[TCP] 127.0.0.1:12375(firefox.exe) --> rr1---sn-q4fl6nz7.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
05-09 15:38:50INFO
[TCP] 127.0.0.1:12379(firefox.exe) --> rr1---sn-5hne6n6e.googlevideo.com:443 match DomainSuffix(googlevideo.com) using 🌍 国外媒体[Twitter苏小柠|深港隧道|流媒体解锁_20]
The text was updated successfully, but these errors were encountered: