Thinkfan - how to configure?

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

kris-kris
Baby Hen
Posts: 18
Joined: Mon May 04, 2020 19:45
Location: Poland, Warsaw

Thinkfan - how to configure?

Post by kris-kris » Mon May 11, 2020 14:05

How to configure Thinkfan? I follow the instructions but cannot start Thinkfan. My lenovo x201 laptop.
https://thinkwiki.de/Thinkfan

Stupot
Sagely Hen
Posts: 1788
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Thinkfan - how to configure?

Post by Stupot » Mon May 11, 2020 15:11

Did you substitute equo for apt-get ?

Where did things start to go wrong. Please give us more information so we can attempt to help.

kris-kris
Baby Hen
Posts: 18
Joined: Mon May 04, 2020 19:45
Location: Poland, Warsaw

Re: Thinkfan - how to configure?

Post by kris-kris » Mon May 11, 2020 15:26

Code: Select all

$ $ sudo systemctl enable thinkfan.service
Failed to enable unit: Unit file thinkfan.service does not exist
I installed Thinkfan. I use equo. I can't configure it. I follow the steps described. I also installed lm-sensors.

Stupot
Sagely Hen
Posts: 1788
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Thinkfan - how to configure?

Post by Stupot » Mon May 11, 2020 18:50

It looks like maybe the service file isn't put in the right place?

Two service files are created:
/usr/lib64/systemd/system/thinkfan-wakeup.service
/usr/lib64/systemd/system/thinkfan.service

Given that these were installed by the package manager, they ought to be put in /lib/systemd/system/ instead.

If you move those files, as root, then you should be able to continue. I would also recommend filing a bug with Sabayon (it's really an upstream issue, but the developers can take care of that) to get the package sorted out.

kris-kris
Baby Hen
Posts: 18
Joined: Mon May 04, 2020 19:45
Location: Poland, Warsaw

Re: Thinkfan - how to configure?

Post by kris-kris » Tue May 12, 2020 6:41

I did as you wrote and it still doesn't work. I do not know what to do.

Code: Select all

~ $ sudo systemctl start thinkfan 
Job for thinkfan.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl status thinkfan.service" and "journalctl -xe" for details.
[email protected] ~ $ sudo systemctl status thinkfan.service
● thinkfan.service - Thinkfan, the minimalist fan control program
   Loaded: loaded (/lib/systemd/system/thinkfan.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/thinkfan.service.d
           └─override.conf
   Active: failed (Result: core-dump) since Tue 2020-05-12 08:33:01 CEST; 22s ago
  Process: 6024 ExecStart=/usr/sbin/thinkfan $THINKFAN_ARGS (code=dumped, signal=ABRT)

maj 12 08:33:01 sabayon systemd[1]: Starting Thinkfan, the minimalist fan control program...
maj 12 08:33:01 sabayon thinkfan[6024]: ERROR: Unhandled thinkfan::Bug: Segmentation fault..
maj 12 08:33:01 sabayon thinkfan[6024]: errno = No such file or directory.
maj 12 08:33:01 sabayon thinkfan[6024]: Backtrace:
maj 12 08:33:01 sabayon thinkfan[6024]: /usr/sbin/thinkfan(+0x2f453) [0x563bccfcd453]
                                        /usr/sbin/thinkfan(thinkfan::handle_uncaught()+0x18f) [0x563bccfcdf0f]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libstdc++.so.6(+0xb7486) [0x7fb23a932486]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libstdc++.so.6(+0xb64e9) [0x7fb23a9314e9]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libstdc++.so.6(__gxx_personality_v0+0x2e8) [0x7fb23a931e98]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc_s.so.1(+0x10d73) [0x7fb23a871d73]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libgcc_s.so.1(_Unwind_RaiseException+0x2b1) [0x7fb23a8722d1]
                                        /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/libstdc++.so.6(__cxa_throw+0x37) [0x7fb23a9326e7]
                                        /usr/sbin/thinkfan(thinkfan::sig_handler(int)+0x10a) [0x563bccfb7caa]
                                        /lib64/libc.so.6(+0x39100) [0x7fb23a6c4100]
                                        /usr/sbin/thinkfan(YAML::convert<YAML::wtf_ptr<thinkfan::Config> >::decode(YAML::Node const&, YAML::wtf_ptr<thinkfan::Config>&)+0x5b) [0x5>
                                        /usr/sbin/thinkfan(thinkfan::Config::try_read_config(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const>
                                        /usr/sbin/thinkfan(thinkfan::Config::read_config(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>
                                        /usr/sbin/thinkfan(main+0x1f9) [0x563bccfb6b99]
                                        /lib64/libc.so.6(__libc_start_main+0xeb) [0x7fb23a6aee4b]
                                        /usr/sbin/thinkfan(_start+0x2a) [0x563bccfb798a]
maj 12 08:33:01 sabayon thinkfan[6024]: This is probably a bug. Please consider reporting this at https://github.com/vmatare/thinkfan/issues. Thanks.
maj 12 08:33:01 sabayon systemd[1]: thinkfan.service: Control process exited, code=dumped, status=6/ABRT
maj 12 08:33:01 sabayon systemd[1]: thinkfan.service: Failed with result 'core-dump'.
maj 12 08:33:01 sabayon systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 12-31/31 (END)

Code: Select all

$ sudo journalctl -xe
-- Subject: Proces jednostki zakończył działanie
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
-- 
-- Proces ExecStart= należący do jednostki thinkfan.service zakończył działanie.
-- 
-- Kod wyjścia procesu: „dumped”, jego stan wyjścia: 6.
maj 12 08:33:01 sabayon systemd[1]: thinkfan.service: Failed with result 'core-dump'.
-- Subject: Jednostka się nie powiodła
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
-- 
-- Jednostka thinkfan.service przeszła do stanu „failed” (niepowodzenia)
-- z wynikiem „core-dump”.
maj 12 08:33:01 sabayon systemd[1]: Failed to start Thinkfan, the minimalist fan control program.
-- Subject: Zadanie uruchamiania dla jednostki thinkfan.service się nie powiodło
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
-- 
-- Zadanie uruchamiania dla jednostki thinkfan.service zostało ukończone z niepowodzeniem.
-- 
-- Identyfikator zadania: 2686, wynik zadania: failed.
maj 12 08:33:01 sabayon sudo[6021]: pam_unix(sudo:session): session closed for user root
maj 12 08:33:01 sabayon systemd-coredump[6026]: Process 6024 (thinkfan) of user 0 dumped core.
-- Subject: Proces 6024 (thinkfan) zrzucił plik core
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
-- Documentation: man:core(5)
-- 
-- Proces 6024 (thinkfan) uległ awarii i zrzucił plik core.
-- 
-- Zwykle wskazuje to na błąd programistyczny w danym programie i powinno zostać
-- zgłoszone jego producentowi jako błąd.
maj 12 08:33:01 sabayon systemd[1]: [email protected]: Succeeded.
-- Subject: Jednostka się powiodła
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
-- 
-- Jednostka [email protected] pomyślnie przeszła do stanu „dead” (martwego).
maj 12 08:33:24 sabayon sudo[6041]:  sabkris : TTY=pts/1 ; PWD=/home/sabkris ; USER=root ; COMMAND=/bin/systemctl status thinkfan.service
maj 12 08:33:24 sabayon sudo[6041]: pam_unix(sudo:session): session opened for user root by sabkris(uid=0)
maj 12 08:35:00 sabayon rtkit-daemon[1053]: Supervising 4 threads of 2 processes of 1 users.
maj 12 08:35:00 sabayon rtkit-daemon[1053]: Supervising 4 threads of 2 processes of 1 users.
maj 12 08:35:43 sabayon sudo[6041]: pam_unix(sudo:session): session closed for user root
maj 12 08:35:59 sabayon sudo[6131]:  sabkris : TTY=pts/1 ; PWD=/home/sabkris ; USER=root ; COMMAND=/bin/journalctl -xe
maj 12 08:35:59 sabayon sudo[6131]: pam_unix(sudo:session): session opened for user root by sabkris(uid=0)
lines 1199-1244/1244 (END)

kris-kris
Baby Hen
Posts: 18
Joined: Mon May 04, 2020 19:45
Location: Poland, Warsaw

Re: Thinkfan - how to configure?

Post by kris-kris » Tue May 12, 2020 19:41

I don't know how to report a bug. I got so mixed up in the system that I didn't want to fix myself anymore, so I installed Sabayon again. Thinkfan is an important package for lenovo, because it is much needed to manage fan speed, because without Thinkfan fan speed is badly managed.
I can't make Thinkfan work for now. It's difficult for me.
It would be nice if someone familiar with the topic of Sabayon dealt with this problem, because I can't handle it myself for now.

Fitzcarraldo
Sagely Hen
Posts: 8216
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Thinkfan - how to configure?

Post by Fitzcarraldo » Wed May 13, 2020 12:51

kris-kris wrote:I don't know how to report a bug.
https://bugs.sabayon.org/

Stupot
Sagely Hen
Posts: 1788
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Thinkfan - how to configure?

Post by Stupot » Sun May 17, 2020 19:09

kris-kris wrote:
Tue May 12, 2020 19:41
I don't know how to report a bug. I got so mixed up in the system that I didn't want to fix myself anymore, so I installed Sabayon again. Thinkfan is an important package for lenovo, because it is much needed to manage fan speed, because without Thinkfan fan speed is badly managed.
I can't make Thinkfan work for now. It's difficult for me.
It would be nice if someone familiar with the topic of Sabayon dealt with this problem, because I can't handle it myself for now.
Unfortunately, you're past where I can help you with. The stack trace seemed to imply it was a bug with the application. I don't have a lenovo and don't understand why this package is critical. Generally you can use the BIOS instead of needing some userspace utility to control fan speeds.

It looks like you need to create a thinkfan config file for it to work, and I have no expertise there.

kris-kris
Baby Hen
Posts: 18
Joined: Mon May 04, 2020 19:45
Location: Poland, Warsaw

Re: Thinkfan - how to configure?

Post by kris-kris » Wed May 20, 2020 9:55

Stupot wrote:
Sun May 17, 2020 19:09
I don't have a lenovo and don't understand why this package is critical.
Without Thinkfan, the maximum fan speed is 3700 rpm and even if the processor temperature exceeds 70°C, the speed is 3700 rpm, and this is too low. The maximum fan speed is 5,500 rpm or even 6,000 rpm. Thinkfan sets the fan speed I want at a specific temperature. And when the processor temperature exceeds 70°C, I set the fan speed faster and faster and the processor will not be overheated. At 3700 rpm and maximum CPU usage, the temperature reaches 95°C. Therefore, they need Thinkfan, because thanks to it the temperature does not exceed 75°C at the maximum load on the processor.

Fitzcarraldo
Sagely Hen
Posts: 8216
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Thinkfan - how to configure?

Post by Fitzcarraldo » Fri May 22, 2020 13:03

Only someone who actually has a Lenovo Thinkpad is likely to be able to help you, as the kernel module thinkpad_acpi will presumably not load on non-Lenovo hardware and, even if it did, would not work on non-Lenovo hardware.

The Sabayon Linux kernel image does appear to have been built with the module enabled:

Code: Select all

# equo install sabayon-sources
# grep -i think /usr/src/linux/.config | grep -v "#"
CONFIG_THINKPAD_ACPI=m
CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
CONFIG_THINKPAD_ACPI_VIDEO=y
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
Have a look at the Gentoo Linux Wiki article on installing and configuring THINKfan, as it might help you if you know what you're doing:

https://wiki.gentoo.org/wiki/Lenovo_Thi ... 0#Thinkfan

You'll have to ignore the Gentoo-specific parts of that article (i.e. merging the package from source code and running the service using OpenRC).

Post Reply