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

Thelio Mira fan is really loud #2

Open
Rintsi opened this issue May 5, 2021 · 14 comments
Open

Thelio Mira fan is really loud #2

Rintsi opened this issue May 5, 2021 · 14 comments

Comments

@Rintsi
Copy link

Rintsi commented May 5, 2021

I compiled and installed the driver but it didn't do anything to remedy the situation.

The fan is driving me nuts :D if there is anything that I can do to help resolve my issue, please let me know

@jackpot51
Copy link
Member

The driver doesn't automatically start yet. So you have to find the thelio-io.exe file it installs and run it

@Rintsi
Copy link
Author

Rintsi commented May 6, 2021

@jackpot51 did exactly that. The CMD clearly quickly jumps up to the screen, so it clearly executes the binary. However, nothing really happens after that :) I was half expecting something as an output, but the fan still keeps on going.

I'm not too familiar with the internals of Windows and would much rather do all my work in the Pop!_OS side, but I need some tools that just are not available for Linux...

Please advice

@Rintsi
Copy link
Author

Rintsi commented Jul 28, 2021

@jackpot51 Any way I could provide any data that would help with any debugging? I would be more than happy to help in order to get the driver installed properly

@Rintsi
Copy link
Author

Rintsi commented Jul 28, 2021

@jackpot51 Actually I managed to use Visual Studio 2019 Debug Console and got this:

System76 Thelio Mira (thelio-mira-r1)
thread 'main' panicked at 'failed to find any Thelio Io devices', src\main.rs:68:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

C:\Program Files\thelio-io\bin\thelio-io.exe (process 8084) exited with code 101.

Any pointers?

@draeath
Copy link
Contributor

draeath commented Aug 24, 2021

@Rintsi if you still need this:

See here for where the fan curve is associated with a hardware module (just the mira-r1 at the moment) and here for the defined fan profiles. (direct link to the current commits on those files, so they may be come outdated but the links should be maintained. Just use them to locate them in your own checkout of the source...)

You would want to edit FanCurve::standard() to try a more appropriate profile, or even define your own if you can figure this out?

I don't have Thelio hardware yet, but I do have a thelio-major-r2 coming eventually. I'll need to run Windows on it myself so I'll certainly be playing with this. Because of that, I have no idea if this will affect the front fan. Given the profiles are CPU specific, I suspect this just governs the CPU cooling? Maybe not, though.

EDIT: you can see the fan profiles in the Linux driver here, just in case. They look identical to me, for the standard profile. I didn't inspect the others.

@Rintsi
Copy link
Author

Rintsi commented Aug 25, 2021

@draeath Yeah, I've read the code and came to the same conclusion that the profile should be identical to that of Linux driver. But I think I have a hardware issue, because it started to behave similarly in Pop OS as well. I've yet to make a support ticket.

Earlier I managed to compile and run the executable and as mentioned it doesn't find the Thelio IO device and doesn't want to start, but yeah then after that it didn't work on Pop OS side either.

@draeath
Copy link
Contributor

draeath commented Sep 7, 2021

@Rintsi have you had any luck figuring out what is going on?

I should be able to get some hands-on work done myself soonish as I finally have received my hardware.

@Rintsi
Copy link
Author

Rintsi commented Sep 8, 2021

@draeath we've narrowed the issue to the HW. System76 sent me a new I/O board yesterday. I will inform to the issue once I get my hands on it and can verify that it affects the Windows driver situation as well. The shipping might take a while as I live in Finland

@draeath
Copy link
Contributor

draeath commented Sep 21, 2021

Had any luck with that new I/O board out of curiosity?

Anyway. Our thinking is on-point and implementing such a patch worked for me. I should note that I had a different than expected vendor/version string (perhaps related to a BIOS flash, see #7) but aside from that? The logic certainly works, it's just a matter of having the right strings ;)

If #7 clears up what is going on with my vendor/version strings, I plan to submit a PR for this.

@Rintsi
Copy link
Author

Rintsi commented Oct 18, 2021

@draeath I had some time to boot into windows again. I had a firmware upgrade issue that was resolved together with System76 Support. So now the driver can find the HW. However this now comes up:

System76 Thelio Mira (thelio-mira-r1)
Thelio Io at COM3
  reset: Ok(())
  revision: Ok("1.0.5")
  suspend: Ok(0)
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', src\main.rs:88:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@draeath
Copy link
Contributor

draeath commented Oct 18, 2021

Odd. Try adding RUST_BACKTRACE as a system environment variable, with value of 1, and reboot. See if you get anything more useful from the backtrace it should add when it next starts up (and hits that error).

(gotta put it in the system variables and not user, since the service runs in that context)

@Rintsi
Copy link
Author

Rintsi commented Nov 17, 2021

@draeath

System76 Thelio Mira (thelio-mira-r1)
Thelio Io at COM3
  reset: Ok(())
  revision: Ok("1.0.5")
  suspend: Ok(0)
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseFloatError { kind: Invalid }', src\main.rs:88:47
stack backtrace:
   0:     0x7ff6c70b752e - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff6c70b752e - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff6c70b752e - std::sys_common::backtrace::_print_fmt
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\sys_common\backtrace.rs:67
   3:     0x7ff6c70b752e - std::sys_common::backtrace::_print::{{impl}}::fmt
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\sys_common\backtrace.rs:46
   4:     0x7ff6c70cdabb - core::fmt::write
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\core\src\fmt\mod.rs:1078
   5:     0x7ff6c70b4108 - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\io\mod.rs:1517
   6:     0x7ff6c70ba24d - std::sys_common::backtrace::_print
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\sys_common\backtrace.rs:49
   7:     0x7ff6c70ba24d - std::sys_common::backtrace::print
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\sys_common\backtrace.rs:36
   8:     0x7ff6c70ba24d - std::panicking::default_hook::{{closure}}
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:208
   9:     0x7ff6c70b9cb4 - std::panicking::default_hook
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:225
  10:     0x7ff6c70bab5e - std::panicking::rust_panic_with_hook
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:591
  11:     0x7ff6c70ba681 - std::panicking::begin_panic_handler::{{closure}}
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:497
  12:     0x7ff6c70b7e8f - std::sys_common::backtrace::__rust_end_short_backtrace<closure-0,!>
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\sys_common\backtrace.rs:141
  13:     0x7ff6c70ba5d9 - std::panicking::begin_panic_handler
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:493
  14:     0x7ff6c70ccde0 - core::panicking::panic_fmt
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\core\src\panicking.rs:92
  15:     0x7ff6c70ccc13 - core::option::expect_none_failed
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\core\src\option.rs:1268
  16:     0x7ff6c70140b8 - alloc::alloc::box_free::h3ee08f7420e0ddf9
  17:     0x7ff6c70124d6 - smbioslib::core::undefined_struct::UndefinedStructTable::find_map::hc3e436434e041e8f
  18:     0x7ff6c701270c - std::rt::lang_start::{{closure}}::ha0ef2999d747d674
  19:     0x7ff6c70bad14 - core::ops::function::impls::{{impl}}::call_once
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\library\core\src\ops\function.rs:280
  20:     0x7ff6c70bad14 - std::panicking::try::do_call
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:379
  21:     0x7ff6c70bad14 - std::panicking::try
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panicking.rs:343
  22:     0x7ff6c70bad14 - std::panic::catch_unwind
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\panic.rs:396
  23:     0x7ff6c70bad14 - std::rt::lang_start_internal
                               at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b\/library\std\src\rt.rs:51
  24:     0x7ff6c7015517 - main
  25:     0x7ff6c70d3f38 - invoke_main
                               at D:\a01\_work\26\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  26:     0x7ff6c70d3f38 - __scrt_common_main_seh
                               at D:\a01\_work\26\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  27:     0x7fff27f87034 - BaseThreadInitThunk
  28:     0x7fff28162651 - RtlUserThreadStart

I finally again booted to Windows and here is the RUST_BACKTRACE=full output

@draeath
Copy link
Contributor

draeath commented Aug 7, 2022

I'm just coming back to look at this after brainstorming a few enhancements I maybe want to try implementing.

Can you run dmidecode (as root, from your Linux OS) and look for something like the following: (this example is from my laptop)

System Information
        Manufacturer: System76
        Product Name: Kudu
        Version: kudu4
        Serial Number: Not Applicable                  
        UUID: {redacted}
        Wake-up Type: Power Switch
        SKU Number: Not Applicable                  
        Family: Not Applicable

What do you see for Manufacturer, Product Name, and Version? Make sure you are looking at the "System Information" section and not the BIOS or such. It should be close to the top, on my laptop here it's the second entry in the tree.

I suspect the crash is occurring while parsing one of these fields.

@Rintsi
Copy link
Author

Rintsi commented Aug 9, 2022

Base Board Information
	Manufacturer: System76
	Product Name: Thelio Mira
	Version: thelio-mira-r1
	Serial Number: {redacted}
	Asset Tag: Default string
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: Default string
	Chassis Handle: 0x0003
	Type: Motherboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants