After installing LinuxCNC on Debian 12 ARM64 system, the simulator cannot be sta

More
16 Sep 2023 05:47 - 18 Sep 2023 00:01 #280902 by MakerYang
After installing LinuxCNC on Debian 12 ARM64 system, the simulator cannot be started.



root@armcnc:~# cat /tmp/linuxcnc.report
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.0~pre1+git20230208.f1270d6ed7
Machine configuration directory is '/home/armcnc/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis.ini'
INIFILE=/home/armcnc/linuxcnc/configs/sim.axis/axis.ini
VERSION=1.1
PARAMETER_FILE=sim.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(lib): /usr/share/linuxcnc/hallib/core_sim.hal
Found file(lib): /usr/share/linuxcnc/hallib/sim_spindle_encoder.hal
Found file(lib): /usr/share/linuxcnc/hallib/axis_manualtoolchange.hal
Found file(lib): /usr/share/linuxcnc/hallib/simulated_home.hal
Found file(lib): /usr/share/linuxcnc/hallib/check_xyz_constraints.hal
Starting TASK program: milltask
Starting DISPLAY program: axis
task: main loop took 0.012648 seconds
Shutting down and cleaning up LinuxCNC...
task: 3115 cycles, min=0.000029, max=0.012648, avg=0.001093, 1 latency excursions (> 10x expected cycle time of 0.001000s)
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
link (updating variable file): No such file or directory
note: MAXV     max: 5.000 units/sec 300.000 units/min
note: LJOG     max: 5.000 units/sec 300.000 units/min
note: LJOG default: 0.250 units/sec 15.000 units/min
note: jog_order='XYZ'
note: jog_invert=set()
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0xffffffff
  Serial number of failed request:  735
  Current serial number in output stream:  736
4292
4343
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Sat Sep 16 01:42:08 PM CST 2023
            UTC Date: Sat Sep 16 05:42:08 AM UTC 2023
        this program: /usr/bin/linuxcnc_info
              uptime: 13:42:08 up 3 min, 2 users, load average: 1.34, 1.08, 0.47
     lsb_release -sa: Debian Debian GNU/Linux 12 (bookworm) 12 bookworm
            linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/armcnc/linuxcnc/configs/sim.axis
                USER: armcnc
             LOGNAME: armcnc
                HOME: /home/armcnc
              EDITOR:
              VISUAL:
            LANGUAGE: en_US.UTF-8
                TERM: dumb
           COLORTERM:
             DISPLAY: :0.0
             DESKTOP: xfce
        display size: 1920x1080 pixels (508x286 millimeters)
                PATH: /usr/bin:/home/armcnc/linuxcnc/configs/sim.axis/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: armcnc
      kernel-name -s: Linux
      kernel-vers -v: #5 SMP PREEMPT RT Wed Sep 13 15:15:26 CST 2023
          machine -m: aarch64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: earlycon loglevel=8 kgdboc=ttyS0 video=hobot:x3sdb-hdmi console=ttyS0,921600 raid=noautodetect hobotboot.reson=POWER_RESET rootfstype=ext4 rw rootwait ubi.mtd=2,2048 "mtdparts=hr_nand.0:6291456@0x0(miniboot),2097152@0x600000(env),0x400000@0x800000(boot),0x400000@0xC00000(system)" root=/dev/mmcblk2p2 rw rootwait ubi.mtd=2,2048 mtdparts=hr_nand.0:6291456@0x0(miniboot),2097152@0x600000(env),0x400000@0x800000(boot),0x400000@0xC00000(system) isolcpus=2,3
          model name:
               cores:
             cpu MHz:
             parport:
              serial:

Versions:
                 gcc: gcc (Debian 12.2.0-14) 12.2.0
              python: Python 3.11.2
                 git: git version 2.39.2
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.9.0~pre1+git20230208.f1270d6ed7
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /usr/lib/linuxcnc/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib
              PYTHON: /usr/bin/python3

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version                             Architecture Description
+++-===================-===================================-============-=====================================================================
un  linuxcnc            <none>                              <none>       (no description available)
un  linuxcnc-dev        <none>                              <none>       (no description available)
un  linuxcnc-doc        <none>                              <none>       (no description available)
ii  linuxcnc-doc-en     2.9.0~pre1+git20230208.f1270d6ed7-1 all          motion controller for CNC machines and robots (English documentation)
un  linuxcnc-doc-es     <none>                              <none>       (no description available)
un  linuxcnc-doc-fr     <none>                              <none>       (no description available)
un  linuxcnc-sim        <none>                              <none>       (no description available)
un  linuxcnc-sim-dev    <none>                              <none>       (no description available)
ii  linuxcnc-uspace     2.9.0~pre1+git20230208.f1270d6ed7-1 arm64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 2.9.0~pre1+git20230208.f1270d6ed7-1 arm64        PC based motion controller for real-time Linux
Last edit: 18 Sep 2023 00:01 by MakerYang.

Please Log in or Create an account to join the conversation.

More
16 Sep 2023 05:48 #280903 by MakerYang
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0xffffffff
  Serial number of failed request:  735
  Current serial number in output stream:  736
4292
4343
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

Please Log in or Create an account to join the conversation.

More
16 Sep 2023 08:50 #280907 by rodw
What PC do you have?
How did you install debian 12?
How did you install linuxcnc?
What desktop are you using?

It looks like you installed linuxcnc from the Debian 12  repository which is dated February this year.  It has certainly been tested so there is an issue with your environment maybe  a missing dependency?

Please Log in or Create an account to join the conversation.

More
16 Sep 2023 09:16 #280908 by MakerYang
This is our own development board, intended for use with LinuxCNC. Currently, we're researching and adapting it in our spare time.

1、We built the base filesystem for Debian 12 using the following method:
mkdir debian12_rootfs
debootstrap --arch=arm64 --foreign bookworm debian12_rootfs http://mirrors.ustc.edu.cn/debian/

2、We installed some basic software packages:
lsb-release git vim wget make cmake python3 python3-pip systemd-timesyncd wireless-tools wpasupplicant iw firmware-iwlwifi net-tools sudo nano openssh-server console-setup rng-tools locales fake-hwclock hostapd ethtool dnsmasq netbase udev dbus parted htop rsyslog u-boot-tools openssl libssl-dev stress chromium xfce4 xfce4-goodies lightdm network-manager-gnome

3、We installed LinuxCNC using the following method:
sudo apt install linux-image-rt-arm64 linux-headers-rt-arm64
sudo apt install linuxcnc-uspace linuxcnc-uspace-dev

4、Currently, we have tested the latency using LinuxCNC's test software, and the results are acceptable. However, we are unable to start the LinuxCNC simulator.

root@armcnc:~# cat /var/log/Xorg.0.log
[   618.075]
X.Org X Server 1.21.1.7
X Protocol Version 11, Revision 0
[   618.075] Current Operating System: Linux armcnc 4.14.87 #2 SMP PREEMPT Thu Aug 10 14:42:43 CST 2023 aarch64
[   618.075] Kernel command line: earlycon loglevel=8 kgdboc=ttyS0 video=hobot:x3sdb-hdmi  console=ttyS0,921600 raid=noautodetect hobotboot.reson=POWER_RESET rootfstype=ext4 rw rootwait ubi.mtd=2,2048 "mtdparts=hr_nand.0:6291456@0x0(miniboot),2097152@0x600000(env),0x400000@0x800000(boot),0x400000@0xC00000(system)" root=/dev/mmcblk2p2
[   618.075] xorg-server 2:21.1.7-3 (https://www.debian.org/support)
[   618.075] Current version of pixman: 0.42.2
[   618.075]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[   618.075] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   618.075] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 16 14:57:56 2023
[   618.076] (II) Loader magic: 0x557a62ef00
[   618.076] (II) Module ABI versions:
[   618.076]    X.Org ANSI C Emulation: 0.4
[   618.076]    X.Org Video Driver: 25.2
[   618.076]    X.Org XInput driver : 24.4
[   618.076]    X.Org Server Extension : 10.0
[   618.078] (--) using VT number 2

[   618.078] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   618.078] (II) no primary bus or device found
[   618.079] List of video drivers:
[   618.079]    amdgpu
[   618.079]    ati
[   618.079]    nouveau
[   618.079]    radeon
[   618.079]    modesetting
[   618.079]    fbdev
[   618.079]    vesa
[   618.079] (II) LoadModule: "amdgpu"
[   618.080] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[   618.090] (II) Module amdgpu: vendor="X.Org Foundation"
[   618.090]    compiled for 1.21.1.7, module version = 23.0.0
[   618.090]    Module class: X.Org Video Driver
[   618.090]    ABI class: X.Org Video Driver, version 25.2
[   618.090] (II) LoadModule: "ati"
[   618.091] (II) Loading /usr/lib/xorg/modules/drivers/ati_drv.so
[   618.092] (II) Module ati: vendor="X.Org Foundation"
[   618.093]    compiled for 1.21.1.3, module version = 19.1.0
[   618.093]    Module class: X.Org Video Driver
[   618.093]    ABI class: X.Org Video Driver, version 25.2
[   618.093] (II) LoadModule: "nouveau"
[   618.093] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[   618.099] (II) Module nouveau: vendor="X.Org Foundation"
[   618.099]    compiled for 1.21.1.3, module version = 1.0.17
[   618.099]    Module class: X.Org Video Driver
[   618.099]    ABI class: X.Org Video Driver, version 25.2
[   618.099] (II) LoadModule: "radeon"
[   618.099] (II) Loading /usr/lib/xorg/modules/drivers/radeon_drv.so
[   618.109] (II) Module radeon: vendor="X.Org Foundation"
[   618.109]    compiled for 1.21.1.3, module version = 19.1.0
[   618.109]    Module class: X.Org Video Driver
[   618.109]    ABI class: X.Org Video Driver, version 25.2
[   618.109] (II) LoadModule: "modesetting"
[   618.109] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[   618.109] (II) Module modesetting: vendor="X.Org Foundation"
[   618.109]    compiled for 1.21.1.7, module version = 1.21.1
[   618.109]    Module class: X.Org Video Driver
[   618.109]    ABI class: X.Org Video Driver, version 25.2
[   618.109] (II) LoadModule: "fbdev"
[   618.110] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[   618.110] (II) Module fbdev: vendor="X.Org Foundation"
[   618.110]    compiled for 1.21.1.3, module version = 0.5.0
[   618.110]    Module class: X.Org Video Driver
[   618.110]    ABI class: X.Org Video Driver, version 25.2
[   618.110] (II) LoadModule: "vesa"
[   618.110] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[   618.112] (II) Module vesa: vendor="X.Org Foundation"
[   618.112]    compiled for 1.21.1.3, module version = 2.5.0
[   618.112]    Module class: X.Org Video Driver
[   618.112]    ABI class: X.Org Video Driver, version 25.2
[   618.112] (WW) Falling back to old probe method for modesetting
[   618.112] (WW) Falling back to old probe method for fbdev
[   618.112] No devices to configure.  Configuration failed.
[   618.112] (EE) Server terminated with error (2). Closing log file

Please Log in or Create an account to join the conversation.

More
16 Sep 2023 09:31 #280909 by rodw
Could you try and install this list of dependencies ?
github.com/rodw-au/rpi-img-builder-lcnc/...cnc/userdata.txt#L25
This is from my recent installer for the Raspberry Pi  a few people have tested as working

Please Log in or Create an account to join the conversation.

More
16 Sep 2023 12:42 #280919 by tommylight
Also, try other AXIS sims, some included sims have some issues, as i've read here lately.
Looking at your logs, why is it loading all graphic drivers at boot? For Nvidia and AMD?
You might need to blacklist some of those drivers and leave only what is required.

Please Log in or Create an account to join the conversation.

More
17 Sep 2023 05:45 - 17 Sep 2023 05:46 #280977 by MakerYang
I have tested all the methods you mentioned, and the results are the same as the previous errors, unresolved. I currently suspect that the development board and Debian 12 system require some driver adaptations and adjustments. If this is the case, it will be addressed separately later on. Currently, I have tried the following:
  1. I downloaded the official repository's master branch on the development board's Ubuntu 20.04 system. After compiling, the generated deb file can be installed normally, but LinuxCNC cannot be started.
  2. I downloaded the official repository's v2.9.0-pre1.zip for compilation. During the compilation, an error related to sys/io was reported. It seems that v2.9.0-pre1 can only be compiled on AMD?
  3. I downloaded the official repository's /linuxcnc-uspace******.deb for installation, and it prompted me that I need python 3.11+.

    After all the above attempts, I am really going crazy. It seems like every path is blocked, and I am frustrated.
Last edit: 17 Sep 2023 05:46 by MakerYang.

Please Log in or Create an account to join the conversation.

More
17 Sep 2023 05:57 #280980 by rodw
Because you have your own hardware, I would recommend you fork my installer where the image originates from
github.com/rodw-au/rpi-img-builder-lcnc/tree/linuxcnc
This is a fork of
github.com/pyavitz/rpi-img-builder
Cornelius there was enormously helpful but he says he hardly uses the pi installer anymore as he maintains another debian installer for more generic ARM hardware and he ported  features back to the pi installer for me.
github.com/pyavitz/debian-image-builder
I suspect you may be better off working with his generic debian installer and reference how we build linuxcnc from source in the chroot environment.
Reach out to Cornelius via git hub or Discord.
 

Please Log in or Create an account to join the conversation.

More
17 Sep 2023 09:07 #280988 by MakerYang
It seems all the problems have been solved, thank you for your help.
My current approach:
1. Rebuild the Debian 12 base filesystem, optimizing and porting some of the original Ubuntu dependencies.
2. Download the built Debian 12 image to the SD card.
3. Reinstall: libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
4. Install: linuxcnc-uspace linuxcnc-uspace-dev
Everything is now in order, and I'm ready for the next step.


Attachments:
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
18 Sep 2023 00:03 #281028 by MakerYang
Conducted a 10-hour test:
latency-histogram --nobase --sbins 1000

 
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.231 seconds
Powered by Kunena Forum