intel / intel-lpmd

GNU General Public License v2.0
102 stars 10 forks source link

can't start v0.0.4 - bad config file #41

Closed sirber closed 4 months ago

sirber commented 4 months ago

Failed to start intel_lpmd.service: Unit intel_lpmd.service has a bad unit file setting. See system logs and 'systemctl status intel_lpmd.service' for details.

the config file is the one by default

zhang-rui commented 4 months ago

which branch/commit are you using?

and how do you reproduce it?

zhang-rui commented 4 months ago

And does the problem exist with tag 0.0.3?

being24 commented 4 months ago

I had same error at ubuntu 22.04.

I tried v0.0.3 and get error.

Failed to restart init.service: Unit init.service not found.
Failed to restart intel_lpmd.service: Unit intel_lpmd.service has a bad unit file setting.
See system logs and 'systemctl status intel_lpmd.service' for details.
sirber commented 4 months ago

the config file exists and seems legit.

I just cloned it, compiled it and started it.

being24 commented 4 months ago

paste my all logs

$ git checkout v0.0.5
HEAD is now at 1a8e74a Merge pull request #42 from zhang-rui/main
$ make clean
Making clean in data
make[1]: ディレクトリ '/home/being/programs/intel-lpmd/data' に入ります
test -z "intel_lpmd.service org.freedesktop.intel_lpmd.service" || rm -f intel_lpmd.service org.freedesktop.intel_lpmd.service
make[1]: ディレクトリ '/home/being/programs/intel-lpmd/data' から出ます
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
test -z "intel_lpmd_control" || rm -f intel_lpmd_control
test -z "intel_lpmd_dbus_interface.h lpmd-resource.c" || rm -f intel_lpmd_dbus_interface.h lpmd-resource.c
test -z "intel_lpmd" || rm -f intel_lpmd
rm -f *.o
rm -f src/*.o
rm -f tools/*.o
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
$ ./autogen.sh prefix=/
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: configure.ac: not using Intltool
autoreconf: running: gtkdocize --copy
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
autoreconf: Leaving directory '.'
checking whether make supports nested variables... yes
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 to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gtk-doc... yes
checking for gtkdoc-check... gtkdoc-check.test
checking for gtkdoc-check... /usr/bin/gtkdoc-check
checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... no
checking for glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes

System paths:
  prefix: /
  exec_prefix: NONE
  systemdunitdir: /lib/systemd/system
  lpmd_binary: ${exec_prefix}/sbin/intel_lpmd
  lpmd_confdir: ${prefix}/etc/intel_lpmd
  lpmd_rundir: /intel_lpmd

checking for dbus-glib-1 >= 0.94... yes
./configure: line 3930: dbus_glib_global_set_disable_legacy_property_access: command not found
checking for dbus-1 >= 1.1 dbus-glib-1 >= 0.94... yes
checking for gio-unix-2.0 >= 2.22 gmodule-2.0... yes
checking for libxml-2.0 >= 2.4... yes
checking for libnl-3.0... yes
checking for libnl-genl-3.0... yes
checking for libsystemd... yes
checking for gdbus-codegen... /usr/bin/gdbus-codegen
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 for an ANSI C-conforming const... yes
checking for inline... inline
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 size_t... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating data/Makefile
config.status: creating data/intel_lpmd.service
config.status: creating data/org.freedesktop.intel_lpmd.service
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Now type 'make' to compile ..
$ make
  GEN      intel_lpmd_dbus_interface.h
WARNING: Using --header and --body at the same time is deprecated; use --body --prototypes instead
INFO: Reading /tmp/dbus-binding-tool-c-marshallers.HHCOP2...
  GEN      lpmd-resource.c
make  all-recursive
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
Making all in data
make[2]: ディレクトリ '/home/being/programs/intel-lpmd/data' に入ります
make[2]: 'all' に対して行うべき事はありません.
make[2]: ディレクトリ '/home/being/programs/intel-lpmd/data' から出ます
make[2]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
  CC       tools/intel_lpmd_control-intel_lpmd_control.o
  CCLD     intel_lpmd_control
  CC       src/intel_lpmd-lpmd_main.o
  CC       src/intel_lpmd-lpmd_proc.o
  CC       src/intel_lpmd-lpmd_dbus_server.o
  CC       src/intel_lpmd-lpmd_config.o
  CC       src/intel_lpmd-lpmd_cpu.o
  CC       src/intel_lpmd-lpmd_helpers.o
  CC       src/intel_lpmd-lpmd_hfi.o
  CC       src/intel_lpmd-lpmd_irq.o
  CC       src/intel_lpmd-lpmd_socket.o
  CC       src/intel_lpmd-lpmd_util.o
  CC       intel_lpmd-lpmd-resource.o
  CCLD     intel_lpmd
make[2]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
$ sudo make install
指紋読取装置に右の人指し指を置いてください
make  install-recursive
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
Making install in data
make[2]: ディレクトリ '/home/being/programs/intel-lpmd/data' に入ります
make[3]: ディレクトリ '/home/being/programs/intel-lpmd/data' に入ります
make[3]: 'install-exec-am' に対して行うべき事はありません.
 /usr/bin/mkdir -p '/etc/dbus-1/system.d'
 /usr/bin/install -c -m 644 org.freedesktop.intel_lpmd.conf '/etc/dbus-1/system.d'
 /usr/bin/mkdir -p '//etc/intel_lpmd'
 /usr/bin/install -c -m 644 intel_lpmd_config.xml '//etc/intel_lpmd'
 /usr/bin/mkdir -p '//share/dbus-1/system-services'
 /usr/bin/install -c -m 644 org.freedesktop.intel_lpmd.service '//share/dbus-1/system-services'
 /usr/bin/mkdir -p '/lib/systemd/system'
 /usr/bin/install -c -m 644 intel_lpmd.service '/lib/systemd/system'
make[3]: ディレクトリ '/home/being/programs/intel-lpmd/data' から出ます
make[2]: ディレクトリ '/home/being/programs/intel-lpmd/data' から出ます
make[2]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
make[3]: ディレクトリ '/home/being/programs/intel-lpmd' に入ります
 /usr/bin/mkdir -p '//bin'
  /usr/bin/install -c intel_lpmd_control '//bin'
 /usr/bin/mkdir -p '//sbin'
  /usr/bin/install -c intel_lpmd '//sbin'
 /usr/bin/mkdir -p '//share/man/man5'
 /usr/bin/install -c -m 644 man/intel_lpmd_config.xml.5 '//share/man/man5'
 /usr/bin/mkdir -p '//share/man/man8'
 /usr/bin/install -c -m 644 man/intel_lpmd.8 '//share/man/man8'
make[3]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
make[2]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
make[1]: ディレクトリ '/home/being/programs/intel-lpmd' から出ます
being@being-ThinkPad-E14-Gen-4:~/programs/intel-lpmd$ sudo systemctl status intel_lpmd.service
○ intel_lpmd.service - Intel Low Power Daemon Service
     Loaded: bad-setting (Reason: Unit intel_lpmd.service has a bad unit file setting.)
     Active: inactive (dead)

 6月 18 13:06:55 being-ThinkPad-E14-Gen-4 systemd[1]: /lib/systemd/system/intel_lpmd.service:9: Neither a valid executable name nor an absolute path: ${exec_prefix}/sbin/intel_lpmd
 6月 18 13:06:55 being-ThinkPad-E14-Gen-4 systemd[1]: intel_lpmd.service: Unit configuration has fatal error, unit will not be started.

It appears that ${exec_prefix} is not correctly expanded So, change intel_lpmd.service's ExecStart to

ExecStart=${exec_prefix}/sbin/intel_lpmd --systemd --dbus-enable

to

ExecStart=/sbin/intel_lpmd --systemd --dbus-enable

and it works!

sirber commented 4 months ago

that worked!

I'm on Fedoar 40.

zhang-rui commented 4 months ago

so key is to use "./autogen.sh prefix=/" right?

being24 commented 4 months ago

Yes shuld I change it ?

zhang-rui commented 4 months ago

yes, please. close this issue.

zhang-rui commented 4 months ago

IMO, this is a duplicate of https://github.com/intel/intel-lpmd/issues/36