lcdproc / lcdproc

Client/server suite for controlling a wide variety of LCD devices
http://lcdproc.org/
GNU General Public License v2.0
109 stars 86 forks source link

G15 driver #208

Closed 5h4rk1337 closed 1 week ago

5h4rk1337 commented 11 months ago

Hi there, how can I make lcdproc work with my Logitech G15? I would love to see if my G15 would work with lcdproc. My goal is it, to have a system monitor on the LCD. The G15Daemon gives me just a clock.

OS: Pop 22.04 jammy Kernel: x86_64 Linux 6.5.6-76060506-generic

When I run ./configure --enable-drivers=all it says: checking for g15daemon_client.h... no configure: WARNING: libg15daemon_client.h not found, the g15 driver will lack g15daemon support checking for libg15render.h... no configure: WARNING: The g15driver needs libg15render.h

Found the Source Code of libg15render somewhere in the internet and uploaded it to GitHub. https://github.com/5h4rk1337/libg15render/tree/main

Thank you for your support <3

ancoron commented 10 months ago

@5h4rk1337 I went through the same issue at first and ended up with the following:

  1. git clone G15 tools from here: https://github.com/mike-petersen/g15tools/
  2. build and install libg15
  3. build and install libg15render (required a small patch for me)
  4. build and install LCDproc

I am on Arch Linux and package for the G15 render library simply misses the required g15font struct and a bunch of other functions used by LCDproc:

...which is based on:

Building the libg15 from g15tools was straight forward for me:

./bootstrap
./configure
make
sudo make install

Building the libg15render from g15tools required a bit more effort. First patch the configure.in:

diff --git a/libg15render/configure.in b/libg15render/configure.in
index 0f55d3b..8a989e6 100644
--- a/libg15render/configure.in
+++ b/libg15render/configure.in
@@ -17,8 +17,8 @@ AC_MSG_CHECKING(whether to enable FreeType2 support)
 AC_ARG_ENABLE(ttf, [  --enable-ttf             enable FreeType2 support],
        if [[[ "$enableval" = "yes" ]]]; then
                AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support])
-               CFLAGS="$CFLAGS `freetype-config --cflags`"
-               FTLIB="-lfreetype"
+               CFLAGS="$CFLAGS `pkgconf --cflags freetype2`"
+               FTLIB="`pkgconf --libs freetype2`"
                ttf_support="yes"
        else
                ttf_support="no"

...then you can build and install:

./bootstrap
./configure --enable-ttf --prefix=/usr/local
make
sudo make install

Please note that the --prefix here is required even if using the default, since otherwise the fonts directory will be set to NONE.

Now we can build LCDproc:

sh autogen.sh
LDFLAGS="-L/usr/local/lib" ./configure --enable-drivers=g15 --prefix=/usr/local
make
sudo make install

To make it all come together at runtime, we need to start the server like this:

LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/lcdproc" /usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf -f

The main reasons are:

Also make sure to configure the server:

--- LCDd.conf   2023-12-29 10:29:43.548527007 +0100
+++ /usr/local/etc/LCDd.conf    2023-12-29 13:19:55.314250138 +0100
@@ -34,7 +34,7 @@
 #            the driver modules and will thus not be able to
 #            function properly.
 # NOTE: Always place a slash as last character !
-DriverPath=server/drivers/
+DriverPath=

 # Tells the server to load the given drivers. Multiple lines can be given.
 # The name of the driver is case sensitive and determines the section
@@ -51,7 +51,7 @@
 #   Olimex_MOD_LCD1x9, picolcd, pyramid, rawserial, sdeclcd, sed1330,
 #   sed1520, serialPOS, serialVFD, shuttleVFD, sli, stv5730, svga, t6963,
 #   text, tyan, ula200, vlsys_m428, xosd, yard2LCD
-Driver=curses
+Driver=g15

 # Tells the driver to bind to the given interface. [default: 127.0.0.1]
 Bind=127.0.0.1
5h4rk1337 commented 3 weeks ago

Finally got time to test it. Unfortunately it failed.

Building the libg15 from g15tools worked fine after i installed libusb-dev.

In configure.in I used pkg-config instead of pkgconf. Seems to work well. Did this because I run pop_OS! (debian).

I think my problem is to compile lcdproc correctly. I got the source from https://github.com/lcdproc/lcdproc I run LDFLAGS="-L/usr/local/lib" ./configure --enable-drivers=g15 --prefix=/usr/local The output says:

configure: checking which drivers to compile...
checking for g15daemon_client.h... no
configure: WARNING: libg15daemon_client.h not found, the g15 driver will lack g15daemon support
checking for libg15render.h... yes
checking for g15r_initCanvas in -lg15render... yes
---------------------------------------
LCDd will be compiled with the drivers:
    -  g15
---------------------------------------

I compiled it anyways. I configured the server. But, like expected, LCDproc failed to start.

$ LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib/lcdproc" /usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf -f
LCDd 0.5dev, LCDproc Protocol 0.4
Copyright (C) 1998-2017 William Ferrell, Selene Scriven
                        and many other contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

g15: Sorry, cannot find a G15 keyboard
Driver [g15] init failed, return code -1
Could not load driver g15
There is no output driver
Critical error while initializing, abort.

Any idea why LCDproc is unable to find g15daemon_client.h and libg15daemon_client.h?

Thanks a lot!

ancoron commented 3 weeks ago

@5h4rk1337 You don't need the G15 daemon and it's just a warning for a reason during configuration of LCDproc.

Your real issue is:

...
g15: Sorry, cannot find a G15 keyboard
...

This means that the libg15 itself is not able to find (or access) your keyboard.

This may be caused by some device permission issues. E.g. for my G510, I have these udev rules (in /etc/udev/rules.d/logitech-g510.rules):

ACTION=="remove", GOTO="logitech_end"
ACTION=="unbind", GOTO="logitech_end"

ACTION=="add", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G510 Gaming Keyboard", \
    TAG+="uaccess", GROUP="wheel", MODE="0660"

ACTION=="add", SUBSYSTEM=="leds", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G510 Gaming Keyboard", \
    RUN+="/bin/chgrp -R wheel '/sys%p'", RUN+="/bin/chmod -R g=u '/sys%p'"
ACTION=="change", SUBSYSTEM=="leds", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G510 Gaming Keyboard", \
    ENV{TRIGGER}!="none", \
    RUN+="/bin/chgrp -R wheel /sys%p", RUN+="/bin/chmod -R g=u /sys%p"

# just to see that these rules are actually called...
KERNEL=="g15::kbd_backlight", SUBSYSTEM=="leds", ATTR{brightness}="200", ATTR{color}="#ff44cc"
KERNEL=="g15::power_on_backlight_val", SUBSYSTEM=="leds", ATTR{brightness}="200", ATTR{color}="#ff44cc"

LABEL="logitech_end"

The actual group (wheel in my example) might be something else on your distro and must be a group that your user is attached to.

5h4rk1337 commented 2 weeks ago

The display is working now. Thank you very much.

Added my user to the group plugdev.

/etc/udev/rules.d$ cat 99-logitech-g15.rules

ACTION=="remove", GOTO="logitech_end"
ACTION=="unbind", GOTO="logitech_end"

# Regel für Logitech G15 Gaming Keyboard (Hauptgerät)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c227", MODE="0666"

# Regel für das G15 Display oder zusätzliche Komponenten
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c223", MODE="0666"

ACTION=="add", KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G15 Refresh Keyboard", \
    TAG+="uaccess", GROUP="plugdev", MODE="0660"

ACTION=="add", SUBSYSTEM=="leds", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G15 Refresh Keyboard", \
    RUN+="/bin/chgrp -R plugdev '/sys%p'", RUN+="/bin/chmod -R g=u '/sys%p'"
ACTION=="change", SUBSYSTEM=="leds", \
    ATTRS{manufacturer}=="Logitech", ATTRS{product}=="G15 Refresh Keyboard", \
    ENV{TRIGGER}!="none", \
    RUN+="/bin/chgrp -R plugdev /sys%p", RUN+="/bin/chmod -R g=u /sys%p"

# just to see that these rules are actually called...
KERNEL=="g15::kbd_backlight", SUBSYSTEM=="leds", ATTR{brightness}="2"
KERNEL=="g15::lcd_backlight", SUBSYSTEM=="leds", ATTR{brightness}="2"

LABEL="logitech_end"

/etc/systemd/system$ cat LCDd.service

[Unit]
Description=LCDd server for lcdproc
After=network.target

[Service]
Type=simple
Environment="LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/lcdproc"
ExecStart=/usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf -f
Restart=on-failure

[Install]
WantedBy=multi-user.target

/etc/systemd/system$ cat lcdproc.service

[Unit]
Description=lcdproc Client
Requires=LCDd.service
After=LCDd.service

[Service]
ExecStart=/usr/local/bin/lcdproc
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=default.target

Unfortunately the buttons for the display do not work. Looks to me like the hid-lg-g15 driver is not working correctly.

lsmod | grep lg

hid_lg_g15             20480  0
hid                   180224  5 hid_logitech,usbhid,hid_generic,hid_lg_g15

sudo evtest /dev/input/by-id/usb-046d_G15_GamePanel_LCD- event-if00

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc227 version 0x111
Input device name: "Logitech Gaming Keyboard Gaming Keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 656 (?)
    Event code 657 (?)
    Event code 658 (?)
    Event code 659 (?)
    Event code 660 (?)
    Event code 661 (?)
    Event code 688 (?)
    Event code 691 (?)
    Event code 692 (?)
    Event code 693 (?)
    Event code 696 (?)
    Event code 697 (?)
    Event code 698 (?)
    Event code 699 (?)
    Event code 700 (?)
Properties:
Testing ... (interrupt to exit)
Event: time 1729982694.179431, type 1 (EV_KEY), code 696 (?), value 1
Event: time 1729982694.179431, -------------- SYN_REPORT ------------
Event: time 1729982694.331455, type 1 (EV_KEY), code 696 (?), value 0
Event: time 1729982694.331455, -------------- SYN_REPORT ------------
Event: time 1729982694.519405, type 1 (EV_KEY), code 697 (?), value 1
Event: time 1729982694.519405, -------------- SYN_REPORT ------------
Event: time 1729982694.650404, type 1 (EV_KEY), code 697 (?), value 0
Event: time 1729982694.650404, -------------- SYN_REPORT ------------
Event: time 1729982695.862417, type 1 (EV_KEY), code 698 (?), value 1
Event: time 1729982695.862417, -------------- SYN_REPORT ------------
Event: time 1729982696.018423, type 1 (EV_KEY), code 698 (?), value 0
Event: time 1729982696.018423, -------------- SYN_REPORT ------------
Event: time 1729982696.182401, type 1 (EV_KEY), code 699 (?), value 1
Event: time 1729982696.182401, -------------- SYN_REPORT ------------
Event: time 1729982696.329452, type 1 (EV_KEY), code 699 (?), value 0
Event: time 1729982696.329452, -------------- SYN_REPORT ------------
Event: time 1729982696.641399, type 1 (EV_KEY), code 700 (?), value 1
Event: time 1729982696.641399, -------------- SYN_REPORT ------------
Event: time 1729982696.727399, type 1 (EV_KEY), code 700 (?), value 0
Event: time 1729982696.727399, -------------- SYN_REPORT ------------

(EV_KEY), code 700 (?), value 0 should be something like KEY_KBD_LCD_MENU1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-lg-g15.c

LCDd.conf

[server]
ToggleRotateKey=Enter
PrevScreenKey=Left
NextScreenKey=Right

It's a bit annoying when you can't switch between screens with the touch of a button.

ancoron commented 2 weeks ago

@5h4rk1337 Yes, I also had that issue.

Since I wanted some other customizations in my setup with the multi-color G510, I ended up with going a different route:

  1. LCDproc server + client (clock only)
  2. custom local server in JavaScript (using lcdprocjs) to add and control LCDproc screens
  3. uinput-macropad to actually make use of the LCD keys
  4. shell wrapper to push commands from macropad to the custom local server

All services running under the SystemD user session.

I wish there was a more modern way to do the same, since many projects in this area are not really well maintained anymore, but that's what ended up working for me.

The custom stuff I've created is not published anywhere, since it is too much tailored to my setup.

5h4rk1337 commented 1 week ago

I asked Hans, the maintainer of the G15 Linux driver "hid_lg_g15", if he has any idea why the keys are not working properly.

Here is his answer:

It looks like everything is working as it should. The ? in evtest
simply means that you are using an older evtest version.

Maybe your lcdproc version is older too ?

The latest lcdproc code does support the keys ootb.

Note that you need something like this in LCDd.conf
for the keys to work to control the menu in lcdproc:

[server]
Driver=g15
Driver=linux_input

[linux_input]
Device="Logitech Gaming Keyboard Gaming Keys"
# Keymap for the G15's 5 LCD-menu buttons
key=0x2b8,Escape
key=0x2b9,Left
key=0x2ba,Up
key=0x2bb,Down
key=0x2bc,Enter

Regards,

Hans

My version of lcdproc is 0.5dev. I tried to compile version 0.5.9, but it always fails.

sh autogen.sh
Running aclocal ...
Running autoheader...
Running automake  ...
Running autoconf ...
configure.ac:72: warning: The macro `AC_PROG_CC_STDC' is obsolete.
configure.ac:72: You should run autoupdate.
./lib/autoconf/c.m4:1666: AC_PROG_CC_STDC is expanded from...
configure.ac:72: the top level
configure.ac:81: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:81: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:1084: AX_CFLAGS_GCC_OPTION_NEW is expanded from...
acinclude.m4:1155: AX_CFLAGS_GCC_OPTION is expanded from...
configure.ac:81: the top level
configure.ac:81: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:81: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:1084: AX_CFLAGS_GCC_OPTION_NEW is expanded from...
acinclude.m4:1155: AX_CFLAGS_GCC_OPTION is expanded from...
configure.ac:81: the top level
configure.ac:82: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:82: You should run autoupdate.
./lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:1084: AX_CFLAGS_GCC_OPTION_NEW is expanded from...
acinclude.m4:1155: AX_CFLAGS_GCC_OPTION is expanded from...
configure.ac:82: the top level
configure.ac:82: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:82: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:1084: AX_CFLAGS_GCC_OPTION_NEW is expanded from...
acinclude.m4:1155: AX_CFLAGS_GCC_OPTION is expanded from...
configure.ac:82: the top level
configure.ac:114: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:114: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:843: ETR_SYSV_IPC is expanded from...
configure.ac:114: the top level
configure.ac:115: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:115: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:873: ETR_UNION_SEMUN is expanded from...
configure.ac:115: the top level
configure.ac:179: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:179: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:179: the top level
configure.ac:202: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:202: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:1164: LCD_SA_RESTART is expanded from...
configure.ac:202: the top level
configure.ac:208: warning: The macro `AC_HEADER_TIME' is obsolete.
configure.ac:208: You should run autoupdate.
./lib/autoconf/headers.m4:743: AC_HEADER_TIME is expanded from...
configure.ac:208: the top level
configure.ac:214: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
configure.ac:214: You should run autoupdate.
./lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
configure.ac:214: the top level
configure.ac:238: warning: The macro `AC_TRY_RUN' is obsolete.
configure.ac:238: You should run autoupdate.
./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
acinclude.m4:669: AC_GET_FS_INFO is expanded from...
configure.ac:238: the top level
configure.ac:421: warning: The macro `AC_TRY_COMPILE' is obsolete.
configure.ac:421: You should run autoupdate.
./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
acinclude.m4:614: AC_CURSES_ACS_ARRAY is expanded from...
acinclude.m4:4: LCD_DRIVERS_SELECT is expanded from...
configure.ac:421: the top level
LDFLAGS="-L/usr/local/lib" ./configure --enable-drivers=g15 --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable debugging... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for xmlto... no
checking CFLAGS for gcc -Wno-unused-function... -Wno-unused-function
checking CFLAGS for gcc -ftrampolines... -ftrampolines
checking for gethostbyname... yes
checking for connect... yes
checking for inet_aton... yes
checking for kstat_open in -lkstat... no
checking for nanosleep in -lposix4... no
checking for getloadavg... yes
checking for swapctl... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/time.h... yes
checking for procfs.h... no
checking for sys/procfs.h... yes
checking for sys/loadavg.h... no
checking for utmpx.h... yes
checking for kvm_open in -lkvm... no
checking for kvm_open in -lkvm with -lelf... no
checking for sched.h... yes
checking for sys/types.h... (cached) yes
checking for machine/pio.h... no
checking for machine/sysarch.h... no
checking for sys/cpuvar.h... no
checking for machine/apm_bios.h... no
checking for System V IPC headers... yes
checking for union semun... no
checking for machine/cpufunc.h... no
checking for sched_setscheduler... yes
checking for sched_setscheduler in -lposix4... no
checking for sched_setscheduler in -lrt... yes
checking for i386_get_ioperm in -li386... no
checking for i386_get_ioperm in -lc... no
checking for iopl... yes
checking for ioperm... yes
checking for sys/io.h... yes
checking for a parallel port... yes
checking for linux/i2c-dev.h... yes
checking for dev/iicbus/iic.h... no
checking for linux/spi/spidev.h... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/io.h... (cached) yes
checking for errno.h... yes
checking for limits.h... yes
checking for kvm.h... no
checking for sys/param.h... yes
checking for sys/dkstat.h... no
checking for stdbool.h... yes
checking for sys/sysctl.h... no
checking for sys/pcpu.h... no
checking for SA_RESTART... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for uname... yes
checking for cfmakeraw... yes
checking for snprintf... yes
checking for getopt... yes
checking for your mounted filesystem table... /etc/mtab
checking for fcntl.h... (cached) yes
checking for sys/dustat.h... no
checking for sys/param.h... (cached) yes
checking for sys/statfs.h... yes
checking for sys/fstyp.h... no
checking for mnttab.h... no
checking for mntent.h... yes
checking for utime.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/filsys.h... no
checking for sys/fs_types.h... no
checking for sys/mount.h... yes
checking for getmntinfo... no
configure: checking how to get filesystem space usage...
checking for statvfs... yes
checking module extension... .so
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking if libusb support has been enabled... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libusb... yes
checking if libusb-1-0 support has been enabled... yes
checking for libusb-1.0 >= 1.0... yes
checking if libftdi support has been enabled... yes
checking for libftdi1 >= 0.8... yes
checking if X11 support has been enabled... yes
checking for x11... yes
checking if libhid support has been enabled... yes
checking for libhid >= 0.2.16... no
checking if PNG support has been enabled... yes
checking for libpng-config... /usr/bin/libpng-config
checking whether libpng is present and sane... yes
checking if freetype support has been enabled... yes
configure: WARNING: freetype does not seem to be installed
checking if ethlcd support has been enabled... yes
checking for doxygen... no
configure: checking which drivers to compile...
checking for g15daemon_client.h... no
configure: WARNING: The g15 driver needs g15daemon_client.h
checking for libg15render.h... yes
checking for g15r_initCanvas in -lg15render... yes
---------------------------------------
LCDd will be compiled with the drivers:
    -  g15
---------------------------------------
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating shared/Makefile
config.status: creating server/Makefile
config.status: creating server/commands/Makefile
config.status: creating server/drivers/Makefile
config.status: creating clients/Makefile
config.status: creating clients/lcdproc/Makefile
config.status: creating clients/lcdexec/Makefile
config.status: creating clients/lcdvc/Makefile
config.status: creating clients/examples/Makefile
config.status: creating clients/metar/Makefile
config.status: creating docs/Makefile
config.status: creating docs/Doxyfile
config.status: creating docs/lcdproc-dev/Makefile
config.status: creating docs/lcdproc-user/Makefile
config.status: creating docs/lcdproc-user/drivers/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/init-LCDd.LSB
config.status: creating scripts/init-lcdproc.LSB
config.status: creating scripts/init-lcdexec.LSB
config.status: creating scripts/init-lcdvc.LSB
config.status: creating scripts/init-LCDd.debian
config.status: creating scripts/init-lcdproc.debian
config.status: creating scripts/init-lcdexec.debian
config.status: creating scripts/init-lcdvc.debian
config.status: creating scripts/init-LCDd.rpm
config.status: creating scripts/init-lcdproc.rpm
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make
make  all-recursive
make[1]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9“ wird betreten
Making all in shared
make[2]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/shared“ wird betreten
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT LL.o -MD -MP -MF .deps/LL.Tpo -c -o LL.o LL.c
mv -f .deps/LL.Tpo .deps/LL.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT sockets.o -MD -MP -MF .deps/sockets.Tpo -c -o sockets.o sockets.c
sockets.c: In function ‘sock_printf_error’:
sockets.c:315:33: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
  315 |         strncpy(buf, huh, sizeof(huh)); // note: sizeof(huh) < MAXMSG
      |                                 ^
mv -f .deps/sockets.Tpo .deps/sockets.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT str.o -MD -MP -MF .deps/str.Tpo -c -o str.o str.c
mv -f .deps/str.Tpo .deps/str.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT configfile.o -MD -MP -MF .deps/configfile.Tpo -c -o configfile.o configfile.c
mv -f .deps/configfile.Tpo .deps/configfile.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT report.o -MD -MP -MF .deps/report.Tpo -c -o report.o report.c
mv -f .deps/report.Tpo .deps/report.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT snprintf.o -MD -MP -MF .deps/snprintf.Tpo -c -o snprintf.o snprintf.c
snprintf.c:487:19: warning: ‘credits’ defined but not used [-Wunused-const-variable=]
  487 | static const char credits[] = "\n\
      |                   ^~~~~~~
mv -f .deps/snprintf.Tpo .deps/snprintf.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I..   -Wall  -O3 -Wno-unused-function -ftrampolines -MT sring.o -MD -MP -MF .deps/sring.Tpo -c -o sring.o sring.c
mv -f .deps/sring.Tpo .deps/sring.Po
rm -f libLCDstuff.a
ar cru libLCDstuff.a LL.o sockets.o str.o configfile.o report.o snprintf.o sring.o 
ar: `u' Adressmodifizierer wurde ignoriert weil `D' Standard ist (siehe `U')
ranlib libLCDstuff.a
make[2]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/shared“ wird verlassen
Making all in clients
make[2]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients“ wird betreten
Making all in examples
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/examples“ wird betreten
make[3]: Für das Ziel „all“ ist nichts zu tun.
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/examples“ wird verlassen
Making all in lcdexec
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/lcdexec“ wird betreten
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT lcdexec.o -MD -MP -MF .deps/lcdexec.Tpo -c -o lcdexec.o lcdexec.c
mv -f .deps/lcdexec.Tpo .deps/lcdexec.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT menu.o -MD -MP -MF .deps/menu.Tpo -c -o menu.o menu.c
mv -f .deps/menu.Tpo .deps/menu.Po
gcc  -Wall  -O3 -Wno-unused-function -ftrampolines  -L/usr/local/lib -o lcdexec lcdexec.o menu.o ../../shared/libLCDstuff.a -ldl 
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/lcdexec“ wird verlassen
Making all in lcdproc
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/lcdproc“ wird betreten
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT mode.o -MD -MP -MF .deps/mode.Tpo -c -o mode.o mode.c
mv -f .deps/mode.Tpo .deps/mode.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT batt.o -MD -MP -MF .deps/batt.Tpo -c -o batt.o batt.c
mv -f .deps/batt.Tpo .deps/batt.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT chrono.o -MD -MP -MF .deps/chrono.Tpo -c -o chrono.o chrono.c
mv -f .deps/chrono.Tpo .deps/chrono.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu.o cpu.c
mv -f .deps/cpu.Tpo .deps/cpu.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT cpu_smp.o -MD -MP -MF .deps/cpu_smp.Tpo -c -o cpu_smp.o cpu_smp.c
mv -f .deps/cpu_smp.Tpo .deps/cpu_smp.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT disk.o -MD -MP -MF .deps/disk.Tpo -c -o disk.o disk.c
disk.c: In function ‘disk_screen’:
disk.c:102:56: warning: ‘%s’ directive writing up to 157695 bytes into a region of size 16 [-Wformat-overflow=]
  102 |                                 sprintf(table[i].dev, "%s", mnt[i].mpoint);
      |                                                        ^~
In file included from /usr/include/stdio.h:894,
                 from disk.c:15:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 1 and 157696 bytes into a destination of size 16
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
mv -f .deps/disk.Tpo .deps/disk.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c
mv -f .deps/load.Tpo .deps/load.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT mem.o -MD -MP -MF .deps/mem.Tpo -c -o mem.o mem.c
mv -f .deps/mem.Tpo .deps/mem.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT eyebox.o -MD -MP -MF .deps/eyebox.Tpo -c -o eyebox.o eyebox.c
mv -f .deps/eyebox.Tpo .deps/eyebox.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_Linux.o -MD -MP -MF .deps/machine_Linux.Tpo -c -o machine_Linux.o machine_Linux.c
machine_Linux.c: In function ‘machine_get_iface_stats’:
machine_Linux.c:579:17: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  579 |                 fgets(buffer, sizeof(buffer), file);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
machine_Linux.c:580:17: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  580 |                 fgets(buffer, sizeof(buffer), file);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
machine_Linux.c: In function ‘machine_get_procs’:
machine_Linux.c:425:37: warning: ‘%s’ directive writing up to 255 bytes into a region of size 122 [-Wformat-overflow=]
  425 |                 sprintf(buf, "/proc/%s/status", procdir->d_name);
      |                                     ^~
In file included from /usr/include/stdio.h:894,
                 from machine_Linux.c:16:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 14 and 269 bytes into a destination of size 128
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
mv -f .deps/machine_Linux.Tpo .deps/machine_Linux.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_OpenBSD.o -MD -MP -MF .deps/machine_OpenBSD.Tpo -c -o machine_OpenBSD.o machine_OpenBSD.c
mv -f .deps/machine_OpenBSD.Tpo .deps/machine_OpenBSD.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_FreeBSD.o -MD -MP -MF .deps/machine_FreeBSD.Tpo -c -o machine_FreeBSD.o machine_FreeBSD.c
mv -f .deps/machine_FreeBSD.Tpo .deps/machine_FreeBSD.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_NetBSD.o -MD -MP -MF .deps/machine_NetBSD.Tpo -c -o machine_NetBSD.o machine_NetBSD.c
mv -f .deps/machine_NetBSD.Tpo .deps/machine_NetBSD.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_Darwin.o -MD -MP -MF .deps/machine_Darwin.Tpo -c -o machine_Darwin.o machine_Darwin.c
mv -f .deps/machine_Darwin.Tpo .deps/machine_Darwin.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT machine_SunOS.o -MD -MP -MF .deps/machine_SunOS.Tpo -c -o machine_SunOS.o machine_SunOS.c
mv -f .deps/machine_SunOS.Tpo .deps/machine_SunOS.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../shared -DSYSCONFDIR=\"/usr/local/etc\" -DPIDFILEDIR=\"/var/run\"   -Wall  -O3 -Wno-unused-function -ftrampolines -MT iface.o -MD -MP -MF .deps/iface.Tpo -c -o iface.o iface.c
mv -f .deps/iface.Tpo .deps/iface.Po
gcc  -Wall  -O3 -Wno-unused-function -ftrampolines  -L/usr/local/lib -o lcdproc main.o mode.o batt.o chrono.o cpu.o cpu_smp.o disk.o load.o mem.o eyebox.o machine_Linux.o machine_OpenBSD.o machine_FreeBSD.o machine_NetBSD.o machine_Darwin.o machine_SunOS.o util.o iface.o ../../shared/libLCDstuff.a -ldl 
/usr/bin/ld: iface.o:(.bss+0x0): multiple definition of `iface'; main.o:(.bss+0x60): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:436: lcdproc] Fehler 1
make[3]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients/lcdproc“ wird verlassen
make[2]: *** [Makefile:369: all-recursive] Fehler 1
make[2]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9/clients“ wird verlassen
make[1]: *** [Makefile:467: all-recursive] Fehler 1
make[1]: Verzeichnis „/media/user/1TB-SSD/home/user/Downloads/g15/lcdproc-0.5.9“ wird verlassen
make: *** [Makefile:387: all] Fehler 2
5h4rk1337 commented 1 week ago

It is finally working. The missing piece was the linux_input driver. You have to compile lcdproc like this:

sh autogen.sh
LDFLAGS="-L/usr/local/lib" ./configure --enable-drivers=g15,linux_input --prefix=/usr/local
make
sudo make install

Before you reinstall it, make sure to back up your config files! And edit your LCDd.conf like Hans sad in his Mail.

ancoron commented 1 week ago

@5h4rk1337 Wonderful! With that I can also adjust my setup and make it a bit simpler, hopefully.