Linux LCDproc CFA-63x Fan Temp & Enhancements Driver with Source

lordimac

New member
I will send you the logs as soon as possible and enable my private messages (didn't know I turned them off).
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

lordimac

New member
Allright, here we go!

I downloaded lcdproc-0.5.7.tar.gz from lcdproc Sourceforge Site, your zip files CF63oddtf-201302121837.zip and oddtf-201404-makefiles.zip from this thread.

I unpacked lcdproc-0.5.7.tar.gz and inside the folder i unpacked CF63oddtf-201302121837.zip and oddtf-201404-makefiles.zip. I replaced the 2 files CF63oddtf-server_drivers_Makefile.am.patch and CF63oddtf-acinclude.m4.patch.

After this I executed patch-apply. The log of this:

limserver lcdproc-0.5.7 # ./patch-apply
patching file server/drivers/Makefile.am
patching file acinclude.m4
patching file docs/LCDd.8.in
patching file docs/lcdproc-user/drivers.docbook
patching file docs/lcdproc-user/lcdproc-user.docbook
Running aclocal ...
am-wrapper: aclocal: warning: auto-detected versions not found (1.14); falling back to latest available
grep: configure.in: Datei oder Verzeichnis nicht gefunden
Running automake ...
Running autoconf ...
After this I run the following configure:

./configure --prefix=/usr --sysconfdir=/etc --enable-drivers=CF63oddtf,CFontzPacket --enable-debug
You can find the configure log here: http://pastebin.com/7TLqMFvU

After this make & make install.

Compile log: http://pastebin.com/1KhST5JG

LCDd.conf: http://pastebin.com/HWBijLz7 (changed ReportLevel to 5 and driver to CF63oddtf after the paste bin)

Startup Log: http://pastebin.com/1LMiPe7D

If you need something else, please tell me how I can help to solve the error. I'm not very confirm with debugging. :( Thank you!


edit: I tried do undefined your lines, undefined everything (commented out the lines 14, 19, 27, 30, 32, 37), make clean and build again but same error. :(
 
Last edited:

lordimac

New member
Oh dear ... thats it ... sometimes it can be so easy :( Feeling dumb now... Thank you very much! Will now try the new options in the next days.
 
No problem. Code in the driver to detect a meaningless speed, provide a default / guess / usable speed, and log an informative message instead of failing mysteriously is aparently not working: & for me either. If I set Speed=14 I get:
Jul 12 16:30:40 furniture kernel: [ 91.786514] LCDd[5460]: segfault at e ip 00007f86dfe47d8a sp 00007fffbd53d890 error 4 in libc-2.13.so[7f86dfe02000+182000]
 

lordimac

New member
Ok, still have problems with the driver. :(

If I try to run the lcdproc client with the CF63oddtf driver I get "Error reading config file" from the lcdproc client. It works with CFontzPacket driver. Something wrong or did I misunderstood something? Also the LEDs seem to be unsupported. If I open a telnet connection to the LCDd and try "output 1" no LED turns on.

edit:

Screens With the Driver - Client
This feature violates the server - client model of lcdproc. It can be disabled entirely by undefining DRIVER_CLIENT in server/drivers/CF63oddtf.h
Ohhhh because of this. So I think I will use the logging and disable this feature. But with logging I don't have an actual real time value of RPM and/or temp. I could log the value every second, but this is much amount of data, isn't it? Or is there any way to get the real time value with lcdproc client?

edit2: Can't convert the docs to html. Error: http://pastebin.com/s3UVZ8yL <-- Fixed this with Update app-text/docbook-xml-dtd-4.5-r1

edit3: Setting some fan values in LCDd.conf works fine, haven't tested the temp values yet. But can't see anything on the display. :( (Except the normal things like connected clients...)

edit4: Are there any special Telnet commands for this driver to read the value of temp sensors, rpm, etc. and set fan power, etc.?
 
Last edited:
Ohhhhh: I can't guess why the DRIVER_CLIENT functions would cause an error with the lcdproc client reading its' config file. ( I haven't used the regular lcdproc client in years, with CFPacket or Oddtf ). I mean, the manner in which the PROTOCOL CHEATING subset of DRIVER_CLIENT functions does an end run around some overhead should not to my knowledge interfere with any other client connecting to the LCDd server.

edit3: If you want the driver to create screens about fans and temperatures, I recommend the DRIVER_CLIENT functions and PROTOCOL CHEATING. I've thought about using rdtool to create a short term auto - truncating round robin style log that a client could parse, but never done it. I've also poked around at making CF63oddtf register as an lmsensors device, but never followed through.

I've not used Telnet with LCDd and am unfamilar with any examples of it.

I'm fairly buisy with other things in the short term here, but your attention and note taking may be the best proofreading the driver has recieved. Please keep it up.
 

lordimac

New member
You are welcome, I'm using the Crystalfontz display for about 2 years now as "normal" display and finally want to make use of the scab which I bought together with the display. ;-) I'm thanking you also for your work with writing an own driver for this!

PROTOCOL_CHEATING and CLIENT_CHILD are defined in my CF63oddtf.h, but I don't get the rpm of a fan on the display. Still the Clients: 0/Screens: 0 Message.

This is my Config at the moment. Easy without any fan controlling yet. http://pastebin.com/Sq9q6RrC

No LED Light. :-(

With Telnet commands it would be possible to write an dedicated lcdproc client for your driver. I can imagine a webinterface for this with access to temperatures, controling the fans, etc.
 
Last edited:
Set ReportLevel to 4 in LCDd.conf and restart LCDd. There should be a lot of information on temperature detectoin, fan configuration, and client screen creation in syslog. This morning mine looks like this for fan1:
Jul 17 06:33:49 furniture LCDd: fan_init read leds=f1r. fan1 uses all leds for report value
Jul 17 06:33:49 furniture LCDd: fan_init did not read a f1_Temp by temperature name or number.
Jul 17 06:33:49 furniture LCDd: fan_init f1, WattNode, u watts, rpt 1, pow 100, p_log 0, div 38, fs 0, T (null), TA (null), off 0.0000, full 0.0000, a_sec 30, dt_l (null)
And latter a table of what screens it is creating:
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 01 l 01 230 LCDd% not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 01 l 02 240 Wow% not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 01 l 03 250 wine% not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 01 l 04 310 1start not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 02 l 05 320 |2 not-yet|
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 02 l 06 330 |3 not-yet|
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 02 l 07 340 |4 not-yet|
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 02 l 08 350 |5 not-yet|
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 03 l 09 360 6 not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 03 l 10 370 7 not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 03 l 11 380 8end not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 03 l 12 390 ^radfan not-yet
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 04 l 13 391 |8end not-yet|
Jul 17 06:33:49 furniture LCDd: cli_scrn scn 04 l 14 7000 |WattNode not-yet|
 

lordimac

New member
So far, no cli_scrn found.

edit: Nevermind, rebuild the client, looks like I messed up something else before with undefining. Even the lcdproc client works now... Feeling so dumb again. Sorry! :(

But still no LED Lights.

Got the LEDs working. There is something wrong in the documentation:

fNUM_led= { o | p | r | b }
To use the 4 leds separately, ensure there is no active leds= line in LCDd.conf, and use f[1-4]_led= for each led. 'o'=off; 'p' shows power %; 'r' shows reports as % of total range reported so far; 'b' blink randomly. Leds 1-4 are bound to fans 1-4 and cannot be assigned to a different fan number.
Actually, according to CF63oddtf.h it's something else:

0=off; 1=power; 2=report; 3=blink random
It works with the number als value. :)

edit2: Too early, it works after the start of LCDd but then the LEDs turn off again when the screen switches. Weird...
 
Last edited:

lordimac

New member
Hey, thanks again for your hard work! Just want to let you know that everything works fine for now. :) Even the LEDs since the fans are now sensor controlled. Using only 1 Sensor at the moment, have 2 other as "spare" and will install them later.

LCDd.conf: http://pastebin.com/ej5sMTLA
Startup Log: http://pastebin.com/MuzmvtF7

What do you think?

PS: If you ever have some amount of time and you are bored, some telnet commands would be really great. For example set the fan power to 100% without restarting the LCDd. But it's of course up to you. :)

PPS: Found a small problem, at the moment the CPU and 1HDD sensors are showing up twice on the lcd but they are defined only once.

edit: If I change "lm1_Lcd=0" and "1HDD_Lcd=0" these sensors are still shown on the display. Is this because they are a reference for the 2 fans?
 
Last edited:

lordimac

New member
Hi, is it possible to clean the Logfile if I start/restart LCDProc? I could use logrotate for this, but then also the 1st and 2nd line would be missing inside the CSV File. Want to build a graph for it in Javascript. Don't know anything about C. :-(

edit: Nevermind, Google rocks. ;-) Changed the line 3592 in CF63oddtf.c to (replaced the "r" with "w"):

p->log_fd=fopen(p->logfile, "w");
 
Last edited:

lordimac

New member
Hi, running a new system now, switched from Gentoo to Ubuntu. Running 14.04 now but I have a Problem with lcdproc running your oddtf driver.

LCDd crashes with message "*** stack smashing detected ***: LCDd terminated"

This is the full debug log when I start LCDd manually:

http://pastebin.com/aKgzbW64

After this I have to click "enter" again so LCDd continues starting with the following log:

http://pastebin.com/KmG6btad

Any idea why this happens or how we can fix it? CFontzPacket driver works fine.

Best regards

edit: Okay, okay ... managed this. Sometimes I'm very suprised about my google skills... It's because of some new GCC security features. I set "-fno-stack-protector" as CFLAG and it works. Maybe a dirty solution, I don't know.
 
Last edited:
Hello, I just noticed your comments & request for help from February 2015! I can't say how that slipped passed me then. Fortunately you seem quite proficient in researching, reading (sometimes contradictory) instructions, experimenting & debugging.

I've never gotten the message "*** stack smashing detected ***: LCDd terminated" & suspect that the logfile reporting system is not precise enough ( timing & thread wise ) to tell if the -stack-protector warning is coming at the last function that published a log. This sort of error needs to be caught while running LCDd under GDB, or maybe tracked by running LCDd under valgrind. ( & I am not starting that today; just poking at things while transitioning to debian jessie & 4. kernel ) If you lower report level and turn off optional features of oddtf, like TIMING_REPORT and LIVE_TIMING you might eliminate that error -- either because the error is in one of those blocks of code; or because the driver will run faster and possibly some que or buffer will not overflow.

Thankyou for your diligence and well written feedback. I'm glad it's all on record here and i'll work it into oddtf eventually.
 
I haven't done any coding in ages. Today I'm just reinstalling for myself after a drive crash. My what a long and messy thread.
I'm rebuilding on a socket 1366 machine & 64 bit Debian Jessie w/ 3.16 kernel.
I used lcdproc 0.5.7 from here: http://heanet.dl.sourceforge.net/project/lcdproc/lcdproc/0.5.7/lcdproc-0.5.7.tar.gz , and the file CF63oddtf-201302121837.zip from this thread (above, by date). After extracting 0.5.7, and unzipping Cf*odd*zip in that directory, then unzip today's (misspelled) attachment to overwrite the 201302121 versions of CF63oddtf-server_drivers_Makefile.am.patch and CF63oddtf-acinclude.m4.patch. ./configure -prefix=/usr --enable-drivers=CF63oddtf Then make.

I got two errors today on building that seemed to go away with a mere make clean && make; go figure.

Sep 21 12:33:26 rattle kernel: [ 609.505890] LCDd[1993]: segfault at 10 ip 00007f7d92788e12 sp 00007ffe9b7eb2f0 error 4 in libc-2.19.so[7f7d9270f000+1a1000]
LCDd: malloc.c:3695: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed.
 
Top