Posts by Johpin

    Applying systemctl restart xorg.service gives:
    Job for xorg.service failed because the service did not take the steps required by its unit configuration.
    See "systemctl status xorg.service" and "journalctl -xeu xorg.service" for details.

    Applying systemctl status xorg.service gives as output:

    ● xorg.service - Xorg Server
    Loaded: loaded (/usr/lib/systemd/system/xorg.service; disabled; preset: disabled)
    Active: activating (start) since Thu 2025-01-16 16:43:14 UTC; 33s ago
    Job: 5789
    Invocation: 72837b417c24488c96778565ebba4267
    Main PID: 3108 (xorg-launch)
    Tasks: 2 (limit: 3058)
    Memory: 416K (peak: 1020K)
    CPU: 207ms
    CGroup: /system.slice/xorg.service
    ├─3108 /bin/sh /usr/bin/xorg-launch -nolisten tcp vt01 -logverbose 6 -verbose 6
    └─3153 sleep 30

    Jan 16 16:43:16 LibreELEC systemd[1]: xorg.service: Scheduled restart job, restart counter is at 12.
    Jan 16 16:43:16 LibreELEC systemd[1]: Starting xorg.service...

    Applying journalctl -xeu xorg.service shows the x-server retries starting:

    Jan 16 16:25:13 LibreELEC systemd[1]: xorg.service: Scheduled restart job, restart counter is at 7.
    Jan 16 16:25:13 LibreELEC systemd[1]: Starting xorg.service...
    Jan 16 16:25:13 LibreELEC (g-launch)[1388]: xorg.service: Referenced but unset environment variable evaluates to an empty string: XORG_DEBUG
    Jan 16 16:25:54 LibreELEC systemd[1]: xorg.service: Failed with result 'protocol'.
    Jan 16 16:25:54 LibreELEC systemd[1]: Failed to start xorg.service.

    Geforce 9400GT with first image: stops at kodi.target and reboots automatically.
    pastekodi https://paste.libreelec.tv/funny-gobbler.log

    Jan 16 10:01:51.942679 LibreELEC kodi.sh[998]: terminate called after throwing an instance of 'std::runtime_error'
    Jan 16 10:01:51.943229 LibreELEC kodi.sh[998]: what(): eglSwapBuffers failed
    Jan 16 10:01:52.633882 LibreELEC kodi.sh[994]: Aborted (core dumped)
    Jan 16 10:01:54.104714 LibreELEC kodi.sh[994]: Crash report available at /storage/.kodi/temp/kodi_crashlog_20250116100152.log
    J

    Geforce 7300LE with second image gives message:
    Starting xorg.
    is your GPU supported?

    https://paste.libreelec.tv/arriving-pelican.log
    Jan 16 10:36:06.986565 LibreELEC systemd[1]: xorg.service: Failed with result 'protocol'.
    Jan 16 10:36:06.987475 LibreELEC systemd[1]: Failed to start xorg.service.
    Jan 16 10:36:06.993941 LibreELEC systemd[1]: Dependency failed for windowmanager.service.
    Jan 16 10:36:06.997960 LibreELEC systemd[1]: windowmanager.service: Job windowmanager.service/start failed with result 'dependency'.

    Jan 16 10:36:07.207205 LibreELEC (kodi.sh)[1010]: kodi.service: Referenced but unset environment variable evaluates to an empty string: KODI_DEBUG
    Jan 16 10:36:08.888983 LibreELEC kodi.sh[1014]: ERROR: Unable to create GUI. Exiting

    On Slackware64 15.0 both video cards are supported well.

    Applying the change from https://github.com/chewitt/LibreE…d9031af39e5d39a gives for me an error during building: ../gbm/options: No such file or directory

    chewitt Thanks for providing an image. I see the splash screen, but it stops booting at [ok] Reached target kodi.target. After some time the shutdown procedure starts automatically.

    In textmode I executed kodi.bin. This gives a segmentation fault (core dumped).

    Running in textmode in pastecrash https://paste.libreelec.tv/funky-chigger.log i found
    LibreELEC kernel: kodi.bin[1041]: segfault at 0 ip 00007f68316fdf86 sp 00007ffd48764c70 error 6 in libgallium-24.3.3.so[74af86,7f6830fb3000+10e0000] likely on CPU 0 (core 0, socket 0)

    In .libreelec/options I have put ADDITIONAL_PACKAGES="$ADDITIONAL_PACKAGES libva". This included the missing libva in the image. New error:

    NEW LOADER: failed to open nouveau: /usr/lib/dri/nouveau_dri.so: cannot open shared object file: no such file or directory
    Similar error for kms_swrast_dri.so and swrast_dri.so

    Adding "x86-driver-nouveau" to .libreelec/options gives an error during building:
    Exception: Invalid package reference: dependency x86-video-nouveau in package misc-packages::PKG_DEPENDS_TARGET is not valid

    In /$HOME/LibreELEC.tv/packages/x11/driver/xf86-video-nouveau/package.mk can be found:
    PKG_DEPENDS_TARGET="toolchain libXcomposite libXxf86vm libXdamage libdrm util-macros systemd xorg-server"
    All depending packages can be found /$HOME/LibreELEC.tv/packages/

    The file /$HOME/LibreELEC.tv/packages/virtual/misc-packages/package.mk contains a line with:
    PKG_DEPENDS_TARGET="toolchain ${ADDITIONAL_PACKAGES}"

    How could I include x86-driver-nouveau to the image?

    The changes from the link in my previous post I have applied to the source code. Next to this I changed the following:
    -replacing "false" into "disabled" and "true " into "enabled" in the file packages/graphics/libdrm/package.mk (they changed it for other entries).
    -for the statement in the file config/graphic
    if [ "${GRAPHIC_DRIVERS}" = "all" ]; then
       GRAPHIC_DRIVERS="crocus i915 iris r300 r600 radeonsi nvidia nvidia-legacy nvidia-ng vmware virtio vc4"
     fi
    I reduced the second line to GRAPHIC_DRIVERS="nouveau". However during building LibreELEC I saw in the configuration:
    Graphic Drivers: crocus i915 iris r300 r600 radeonsi virtio vmware
    Removal of the first and third line of the statement resulted in:
    Graphic Drivers: nouveau

    After building the image I copied it to a hard disk. Booting from this hard disk I could install LibreELEC on a pen drive successfully. Booting from this pen drive stops at a certain moment without starting Kodi. I can reboot my computer by ctr-alt-delete.

    After replacing "quiet" by "ssh textmode" at the end of APPEND in the file syslinux.cfg I got a LibrELEC prompt after booting. I can also access the computer by ssh.

    In dmesg the word "nouveau" can not be found. There is also no kernel module nouveau available. Despite of the changes made in the source code, the nouveau driver seems not have been set in the config file for the kernel.

    I downloaded the kernel version that is mentioned in project/Generic/linux/linux.x86_64.conf and copied this file to .config, make menuconfig and wrote .config back to linux.x86_64.conf. I built a new image and now the nouveau driver has been included. Also during booting nouveau kicks in (font becomes smaller). The splash screen with the logo of LibreELEC has never been shown.

    However the booting stops at
    [ok] Reached target kodi.target

    pastekodi https://paste.libreelec.tv/sharp-penguin.log and

    pastecrash https://paste.libreelec.tv/grand-sculpin.log show

    /usr/lib/kodi/kodi.bin: error while loading shared libraries: libva.so.2: cannot open shared object file: No such file or directory

    I can find it in /$HOME/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/libva-2.20.0 and it compiles fine. However, via ssh I can see it is missing.

    How could I add this missing library? See RE: Adding package to image

    Thanks for referring to the remote control part of the wiki and the suggestion to adapt rc_maps.cfg.

    After removal of my autostart.sh file I tried:

    1. coping my .config/rc_keymaps/rc6_mce.toml to libreelec_multi.toml

    This works.

    After removal of libreelec_multi.toml and copying /etc/rc_maps.cfg to .config/ I tried

    2. in .config/rc_maps.cfg I commented out
    *               rc-rc6-mce      libreelec_multi.toml
    and uncommented
    #*              rc-rc6-mce      rc6_mce.toml

    This also works.

    The issue seems not to be a bug, but is a decision by LibreELEC to deviate from Linux distributions, like Raspberry Pi OS and Slackware. In dmesg you will find rc-rc6-mce. The issue has been solved for me.

    Tested for LibreELEC 11.0.6 on RPi 4B

    ir-keytable -r gives

    scancode 0x80d800 = KEY_0 (0x0b)
    This is from the keymaps provided by the kernel

    After loading manually my keymap for a hx1838 infrared sensor,

    ir-keytable -c -w .config/rc_keymaps/rc6_mce.toml

    Now the scancode is correct and coupled to the correct button.

    ir-keytable -r
    scancode 0x807081 = KEY_0 (0x0b)
    ...

    After pressing the zero button of my remote:
    ir-keytable -v -t -p all shows
    2563.603123: lirc protocol(necx): scancode = 0x807081
    2563.659787: lirc protocol(necx): scancode = 0x807081 repeat
    ...

    The key, the zero button is not shown in the output, but in Kodi it works.

    According to https://wiki.libreelec.tv/configuration/startup-shutdown I have put

    (sleep 2

    ir-keytable -c -w /storage/.config/rc6_mce.toml

    )&

    to /storage/.config/autostart.sh

    It is a temporary solution to circumvent the bug.

    mglae Thanks for mentioning the use of package.mk.

    I found more about changing of the code in files and adding files, see

    add nouveau - opensource nvidia driver by ToKe79 · Pull Request #5917 · LibreELEC/LibreELEC.tv
    I am not sure if it is relevant for LibreELEC, but maybe for the Generic (non-legacy) image. I did not test the legacy image, as I don't have nvidia card,…
    github.com

    After I have bought 2x2GB RAM, I expect to be able to compile and build LibreELEC on a x86_64 system (for cross-compiling my RPi4 and probably my RPi5 have not sufficient memory).

    chewitt Thanks for the link, I expect it will be helpful

    To add the nouveau driver you can add "nouveau" to the line in the file /home/john/LibreELEC.tv/config/graphic
    GRAPHIC_DRIVERS="crocus i915 iris r300 r600 radeonsi nvidia nvidia-legacy nvidia-ng vmware virtio vc4"

    As I can remember during installation of the proprietary Nvidia driver, a file will be written and you have to delete it if you want to revert to the nouveau driver. I choose to remove nvidia:

    GRAPHIC_DRIVERS="crocus i915 iris r300 r600 radeonsi nouveau vmware virtio vc4"

    In my case I want to optimize it to one system. I assume I can reduce it to:

    GRAPHIC_DRIVERS="nouveau"

    I don't know the effect, but I looked on forehand into the file /home/john/LibreELEC.tv/projects/Generic/linux/linux.x86_64.conf

    and saw the nouveau driver has not been set. Should it be necessary to manually set the nouveau driver by "make menuconfig" also?

    I found the failing is related to gcc 14 on ARM,see https://github.com/llvm/llvm-project/issues/78691. I could not apply the presented hack, because some code is missing in llvm 17. Therefore I replaced LibreELEC's llvm 17 source code by llvm 18.1.6. In the latter the hack has already been included.

    Affter many hours the 4GB of RAM and 2 GB of swap on my RPi4 seems not to be sufficient and the system hangs, while my hard disk is still flashing. I could not quit "top" anymore.

    Building LibreELEC for RPi4 on a RPi4 has been successful, building for x86-64 has not been successful.

    After entering the one line command "PROJECT=Generic DEVICE=Generic ARCH=x86_64 make image" on a RPi4 4GB with Slackware aarch64 (15) the build gave the following error:

    ninja: build stopped: subcommand failed.
    FAILURE: scripts/build llvm:host during make_host (default)
    *********** FAILED COMMAND ***********
    ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_HOST}
    **************************************
    FAILURE: scripts/build llvm:host has failed!

    >>> llvm:host seq 230 >>>
    [297/303] [FAIL] build   llvm:host

    The following log for this failure is available:
     /home/john/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/.threads/log
    s/230.log

    Parallel build failure - see log for details. Time of failure: Thu Dec 26 09:57:
    30 CET 2024
    make: *** [Makefile:10: image] Error 1

    A LibreELEC-RPi4.aarch64-12.0 image has been built successfully on the same building machine.

    llvm-18.1.6-aarch64 is available on the building machine. The github cloned LibreELEC is from a couple of days back.

    What could I do to solve this error?

    that tells you that you are building at a x86-64 machine, nothing more

    so you build a aarch64 image at a x86-64 machine :)

    The build machine is a Raspberry Pi 4B with 4 GB RAM, not x86-64. The LibreELEC version schould be for a RPI4 aarch64.

    The command "make image" shows as stdout also:

    '/home/john/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/kernel-firmware-20240312/.copied-firmware/intel/ibt-hw-37.8.bseq' -> '/home/john/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/install_pkg/kernel-firmware-20240312/usr/lib/kernel-overlays/base/lib/firmware/intel/ibt-hw-37.8.bseq'

    indicating it is building a LibreELEC version for Intel x86

    PROJECT=RPi ARCH=aarch64 DEVICE=RPi4 make image


    I am trying to build LibreELEC 12.0.1 on a RPi4 with Slackware aarch64.

    To my surprise
    PROJECT=RPi
    ARCH=aarch64
    DEVICE=RPi4
    make image

    shows as stdout:

    Buildsystem configuration:
    ======================================================
    - CPU: x86-64
    - Kernel Architecture: x86

    I don't understand why it will build for x86. How can I force it to build for aarch64?