wiiznokes / fan-control

Control your fans with different behaviors
GNU General Public License v3.0
159 stars 11 forks source link

[Bug?] [Windows 11 x64] Transparent no-responding main window #25

Open zhangjing-GitHub-Code opened 11 months ago

zhangjing-GitHub-Code commented 11 months ago

On Windows 11 x64 Chinese Home Edition run commands in MSYS2-MINGW64 (but rustup from cmd env previously) rustup show:

$ rustup show
Default host: x86_64-pc-windows-gnu
rustup home:  C:\Users\<name>\.rustup

installed toolchains
--------------------

stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc (default)

active toolchain
----------------

stable-x86_64-pc-windows-msvc (default)
rustc 1.74.0 (79e9716c9 2023-11-13)

Here's a ~debug~ RUST_LOG=info log:(DEBUG f***ed my term off by too long)

```$ RUST_LOG=info cargo run warning: E:\Document\GITHUB\fan-control\Cargo.toml: unused manifest key: profile.dev.aopt-level warning: E:\Document\GITHUB\fan-control\Cargo.toml: unused manifest key: profile.release.aopt-level Finished dev [unoptimized + debuginfo] target(s) in 0.55s Running `target\debug\fan-control.exe` [2023-12-07T05:41:44Z ERROR i18n_embed::requester] Unable to parse your locale: ParserError(InvalidLanguage) [2023-12-07T05:41:44Z INFO i18n_embed::requester] Current Locale: [] [2023-12-07T05:41:44Z ERROR i18n_embed::requester] Unable to parse your locale: ParserError(InvalidLanguage) [2023-12-07T05:41:44Z INFO i18n_embed::requester] Current Locale: [] [LHM] Server Started on 127.0.0.1:55555 [LHM] Client accepted! [2023-12-07T05:41:45Z INFO hardware::windows] check passed for 127.0.0.1:55555! [LHM] nbControl: 0 [LHM] nbFan: 0 [LHM] nbTemp: 15 [LHM] Sending hardware [LHM] Hardware send [2023-12-07T05:41:47Z WARN wgpu_hal::vulkan::instance] Unable to find layer: VK_LAYER_KHRONOS_validation [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] Instance version: 0x4020b0 [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] Enabling debug utils [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] Enabling device properties2 [2023-12-07T05:41:47Z WARN wgpu_hal::dx12::instance] Unable to enable D3D12 debug interface: 0x887A002D [2023-12-07T05:41:47Z WARN wgpu_hal::auxil::dxgi::factory] Unable to enable DXGI debug interface: 0x887A002D [2023-12-07T05:41:47Z INFO wgpu_hal::gles::egl] Unable to open libEGL: Library(LoadLibraryExW { source: Os { code: 126, kind: Uncategorized, message: "找不到指定的模块。" } }) [2023-12-07T05:41:47Z INFO iced_wgpu::window::compositor] Settings { present_mode: AutoVsync, internal_backend: Backends( VULKAN | GL | METAL | DX12 | DX11 | BROWSER_WEBGPU, ), default_font: Font { family: Name( "Fira Sans", ), weight: Normal, stretch: Normal, monospaced: false, }, default_text_size: 14.0, antialiasing: Some( MSAAx4, ), } [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Vulkan AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan } [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Vulkan AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan } [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Dx12 AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12 } [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Dx12 AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, driver: "", driver_info: "", backend: Dx12 } [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Dx12 AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12 } [2023-12-07T05:41:47Z INFO iced_wgpu::window::compositor] Available adapters: [ AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan, }, AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan, }, AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12, }, AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, driver: "", driver_info: "", backend: Dx12, }, AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12, }, ] [2023-12-07T05:41:47Z INFO wgpu_core::instance] Adapter Vulkan AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan } [2023-12-07T05:41:47Z INFO iced_wgpu::window::compositor] Selected: AdapterInfo { name: "Intel(R) UHD Graphics 730", vendor: 32902, device: 18066, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan, } [2023-12-07T05:41:47Z INFO iced_wgpu::window::compositor] Selected format: Bgra8UnormSrgb [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)] Inserted device layer VK_LAYER_RTSS (G:\software\RivaTuner_StatisticsServer\Vulkan\.\RTSSVkLayer64.dll) [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x1df95bd0080, name: ?) [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] GENERAL [Loader Message (0x0)] Inserted device layer VK_LAYER_OBS_HOOK (C:\ProgramData\obs-studio-hook\.\graphics-hook64.dll) [2023-12-07T05:41:47Z INFO wgpu_hal::vulkan::instance] objects: (type: INSTANCE, hndl: 0x1df95bd0080, name: ?) [2023-12-07T05:41:47Z WARN fontdb] Failed to load a font face 0 from 'C:\Windows\Fonts\mstmc.ttf' cause malformed font. [2023-12-07T05:41:47Z INFO cosmic_text::font::system::std] Parsed 566 font faces in 81ms. [2023-12-07T05:41:47Z INFO wgpu_core::device] Created buffer Valid((0, 1, Vulkan)) with BufferDescriptor { label: Some("glyphon params"), size: 16, usage: BufferUsages(COPY_DST | UNIFORM), mapped_at_creation: false } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created texture Valid((0, 1, Vulkan)) with TextureDescriptor { label: Some("glyphon atlas"), size: Extent3d { width: 256, height: 256, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: Rgba8UnormSrgb, usage: TextureUsages(COPY_DST | TEXTURE_BINDING), view_formats: [] } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created texture Valid((1, 1, Vulkan)) with TextureDescriptor { label: Some("glyphon atlas"), size: Extent3d { width: 256, height: 256, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: R8Unorm, usage: TextureUsages(COPY_DST | TEXTURE_BINDING), view_formats: [] } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created buffer Valid((1, 1, Vulkan)) with BufferDescriptor { label: Some("iced_wgpu::quad vertex buffer"), size: 32, usage: BufferUsages(VERTEX), mapped_at_creation: true } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created buffer Valid((2, 1, Vulkan)) with BufferDescriptor { label: Some("iced_wgpu::quad index buffer"), size: 12, usage: BufferUsages(INDEX), mapped_at_creation: true } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((0, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu.quad.solid.pipeline"), layout: Some((1, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 1, Vulkan), entry_point: "solid_vs_main" }, buffers: [VertexBufferLayout { array_stride: 8, step_mode: Vertex, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 0 }] }, VertexBufferLayout { array_stride: 68, step_mode: Instance, attributes: [VertexAttribute { format: Float32x4, offset: 0, shader_location: 1 }, VertexAttribute { format: Float32x2, offset: 16, shader_location: 2 }, VertexAttribute { format: Float32x2, offset: 24, shader_location: 3 }, VertexAttribute { format: Float32x4, offset: 32, shader_location: 4 }, VertexAttribute { format: Float32x4, offset: 48, shader_location: 5 }, VertexAttribute { format: Float32, offset: 64, shader_location: 6 }] }] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 1, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 1, Vulkan), entry_point: "solid_fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: SrcAlpha, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((1, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu.quad.gradient.pipeline"), layout: Some((2, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 2, Vulkan), entry_point: "gradient_vs_main" }, buffers: [VertexBufferLayout { array_stride: 8, step_mode: Vertex, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 0 }] }, VertexBufferLayout { array_stride: 148, step_mode: Instance, attributes: [VertexAttribute { format: Uint32x4, offset: 0, shader_location: 1 }, VertexAttribute { format: Uint32x4, offset: 16, shader_location: 2 }, VertexAttribute { format: Uint32x4, offset: 32, shader_location: 3 }, VertexAttribute { format: Uint32x4, offset: 48, shader_location: 4 }, VertexAttribute { format: Uint32x4, offset: 64, shader_location: 5 }, VertexAttribute { format: Float32x4, offset: 80, shader_location: 6 }, VertexAttribute { format: Float32x4, offset: 96, shader_location: 7 }, VertexAttribute { format: Float32x4, offset: 112, shader_location: 8 }, VertexAttribute { format: Float32x4, offset: 128, shader_location: 9 }, VertexAttribute { format: Float32, offset: 144, shader_location: 10 }] }] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 1, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 2, Vulkan), entry_point: "gradient_fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: SrcAlpha, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((2, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu::triangle::msaa pipeline"), layout: Some((3, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 3, Vulkan), entry_point: "vs_main" }, buffers: [] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 1, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 3, Vulkan), entry_point: "fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((3, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu::triangle::solid pipeline"), layout: Some((4, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 4, Vulkan), entry_point: "solid_vs_main" }, buffers: [VertexBufferLayout { array_stride: 24, step_mode: Vertex, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 0 }, VertexAttribute { format: Float32x4, offset: 8, shader_location: 1 }] }] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 4, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 4, Vulkan), entry_point: "solid_fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: SrcAlpha, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((4, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu.triangle.gradient.pipeline"), layout: Some((5, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 5, Vulkan), entry_point: "gradient_vs_main" }, buffers: [VertexBufferLayout { array_stride: 104, step_mode: Vertex, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 0 }, VertexAttribute { format: Uint32x4, offset: 8, shader_location: 1 }, VertexAttribute { format: Uint32x4, offset: 24, shader_location: 2 }, VertexAttribute { format: Uint32x4, offset: 40, shader_location: 3 }, VertexAttribute { format: Uint32x4, offset: 56, shader_location: 4 }, VertexAttribute { format: Uint32x4, offset: 72, shader_location: 5 }, VertexAttribute { format: Float32x4, offset: 88, shader_location: 6 }] }] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 4, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 5, Vulkan), entry_point: "gradient_fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: SrcAlpha, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created render pipeline Valid((5, 1, Vulkan)) with RenderPipelineDescriptor { label: Some("iced_wgpu::image pipeline"), layout: Some((6, 1, Vulkan)), vertex: VertexState { stage: ProgrammableStageDescriptor { module: (1, 6, Vulkan), entry_point: "vs_main" }, buffers: [VertexBufferLayout { array_stride: 8, step_mode: Vertex, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 0 }] }, VertexBufferLayout { array_stride: 36, step_mode: Instance, attributes: [VertexAttribute { format: Float32x2, offset: 0, shader_location: 1 }, VertexAttribute { format: Float32x2, offset: 8, shader_location: 2 }, VertexAttribute { format: Float32x2, offset: 16, shader_location: 3 }, VertexAttribute { format: Float32x2, offset: 24, shader_location: 4 }, VertexAttribute { format: Sint32, offset: 32, shader_location: 5 }] }] }, primitive: PrimitiveState { topology: TriangleList, strip_index_format: None, front_face: Cw, cull_mode: None, unclipped_depth: false, polygon_mode: Fill, conservative: false }, depth_stencil: None, multisample: MultisampleState { count: 1, mask: 18446744073709551615, alpha_to_coverage_enabled: false }, fragment: Some(FragmentState { stage: ProgrammableStageDescriptor { module: (1, 6, Vulkan), entry_point: "fs_main" }, targets: [Some(ColorTargetState { format: Bgra8UnormSrgb, blend: Some(BlendState { color: BlendComponent { src_factor: SrcAlpha, dst_factor: OneMinusSrcAlpha, operation: Add }, alpha: BlendComponent { src_factor: One, dst_factor: OneMinusSrcAlpha, operation: Add } }), write_mask: ColorWrites(RED | GREEN | BLUE | ALPHA) })] }), multiview: None } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created buffer Valid((3, 1, Vulkan)) with BufferDescriptor { label: Some("iced_wgpu::image vertex buffer"), size: 32, usage: BufferUsages(VERTEX), mapped_at_creation: true } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created buffer Valid((4, 1, Vulkan)) with BufferDescriptor { label: Some("iced_wgpu::image index buffer"), size: 12, usage: BufferUsages(INDEX), mapped_at_creation: true } [2023-12-07T05:41:47Z INFO wgpu_core::device] Created texture Valid((2, 1, Vulkan)) with TextureDescriptor { label: Some("iced_wgpu::image texture atlas"), size: Extent3d { width: 2048, height: 2048, depth_or_array_layers: 1 }, mip_level_count: 1, sample_count: 1, dimension: D2, format: Rgba8UnormSrgb, usage: TextureUsages(COPY_SRC | COPY_DST | TEXTURE_BINDING), view_formats: [] } [2023-12-07T05:41:47Z INFO wgpu_core::device] configuring surface with SurfaceConfiguration { usage: TextureUsages(RENDER_ATTACHMENT), format: Bgra8UnormSrgb, width: 1024, height: 768, present_mode: AutoVsync, alpha_mode: Auto, view_formats: [] } [2023-12-07T05:41:47Z INFO wgpu_core::device] Automatically choosing presentation mode by rule AutoVsync. Chose Fifo [2023-12-07T05:41:47Z INFO wgpu_core::device] Automatically choosing alpha mode by rule Auto. Chose Opaque ```

When I cargo runed, it seems completely detect the sensors and sent to frontend(15 sensors send), but the window is transparent(even no border), When placing mouse on it, the cursor is 'No response' icon, can be close on the task bar. curios: When you were coding in the libcosmic, I complied main then and can see main window. But in libcosmic br and now, the window is like this.

OH what? Now it has a rect white block(~1/4 size of my 1920x1080) on my left screen, but the no-response zone is bigger than it expanding below. 屏幕截图 2023-12-07 13521dsa2

wiiznokes commented 11 months ago

Hi, can you confirm your using the latest commit on main (git pull) ? Also, try to clean the project and rebuild it.

cargo clean
make lhm
cargo run --release

if it still don't works, try with the feature fake_hardware (use for testing, to be sure it's a UI bug)

cargo run --release --features fake_hardware 

Also, what GPU are you using?

zhangjing-GitHub-Code commented 11 months ago

Also, what GPU are you using?

Um, just reply first: CPU: Intel Core i5-12400 (Acer Shangqi X4270) GPU: Intel UHD Grapics 730 (CPU's GPU XD)