neduard / acer_5750G_fan_maximiser

Max out Acer 5750G Fan Speed.
MIT License
38 stars 13 forks source link

Port linux is possible? thx #6

Open ghost opened 8 years ago

ghost commented 8 years ago

You can explain a little bit that makes your application? I do not understand the code well. Could you make a version for Linux ?. Thank you.

ghost commented 8 years ago

I have tired this but dont work: http://pastebin.com/UrbT7mqq

ljrk0 commented 8 years ago

You use the perl-script for Linux as described in the readme. I've hacked down a C-Implementation for Linux here: https://github.com/LeonardKoenig/acer_5750G_fan_maximiser/tree/prq_linux

It's not ready for merging yet though, I wanna go through it again, and check for correctness. It works for me though already.

Build with:

$ make

and execute with:

# ./fancontroller_linux -m
# ./fancontroller_linux -n

Be sure to execute as root

ljrk0 commented 8 years ago

I've created a pull request (https://github.com/neduard/acer_5750G_fan_maximiser/pull/7), the code is cleaned-up now and pretty much ready to use.

ghost commented 8 years ago
$ make
cc -DNDEBUG -std=c99 -Wall -pedantic -Wextra -Wshadow -Wconversion -o fancontroller_linux fancontroller_linux.c
fancontroller_linux.c: In function ‘wait_until_bitmask_is_value’:
fancontroller_linux.c:11:17: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=]
 #define ERRPREF "[" STRINGIFY(PROGNAME) "]: "
                 ^
fancontroller_linux.c:211:18: note: in expansion of macro ‘ERRPREF’
  fprintf(stderr, ERRPREF "Timeout waiting for mask %x with value %x on port %x\n",
ljrk0 commented 8 years ago

Forgot to add the change there too. Should work now.

ghost commented 8 years ago

Great!!, it work well now. Many many thanks!!!!

My model is: Acer Aspire 5750G in XUbuntu 16.04.1 LTS 64bits