Lets start:
Code:
sudo apt-get install geany ethtool grub-customizer
download linux-headers and linux-image from here
drive.google.com/drive/folders/10uwGg5Rv...LtQ8BZhM3At_gODk16na
Code:
cd Downloads
sudo dpkg -i linux-headers(tab)
sudo dpkg -i linux-image(tab)
sudo grub-customizer
Note that pressing (tab) above lets linux autocomplete the line for you to save typing
Make the new 6.1 kernel the default. Eg move to the first entry.
reboot and check our kernel loaded
Code:
sudo reboot
debian@debian:~$ uname -v
#4 SMP PREEMPT_RT Wed Dec 14 00:49:27 AEST 2022
debian@debian:~$ uname -r
6.1.0-rt5-linuxcnc-rt
ip a
and save the name of the NIC you will use for your mesa card (enp2s0 for us)
Check the device specs
Code:
debian@debian:~$ sudo ethtool -i enp2s0
driver: r8169
version: 6.1.0-rt5-linuxcnc-rt
firmware-version: rtl8168e-3_0.0.4 03/27/12
expansion-rom-version:
bus-info: 0000:02:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
Note the driver is r8169 but the hardware is rtl8168e
So debian is using the wrong driver. install the correct driver
First check that we are not going to look in CD or DVD drives for software
Code:
sudo geany /etc/sources.list
Comment out any lines beginning with CD or DVD with a #
Save and:
Code:
sudo apt-get update
sudo apt-get install r8168-dkms
sudo reboot
Once rebooted, open a terminal and:
Code:
sudo ethtool -i enp2s0
driver: r8168
note driver is now correctly listed as r8168
So Our job is done! time to configure the wifi at top right and set up the NIC interface for Mesa
But first install linuxcnc
Code:
sudo apt-get install linuxcnc-uspace linuxcnc-uspace-dev mesaflash
Code:
sudo geany /etc/network/interfaces
Assuming you have already configured the mesa card to be add this text at the end
Code:
auto enp2s0
iface enp2s0 inet static
address 10.10.10.1
If not you'll need to set the ip to 192.168.1.1 above,
then use mesaflash to save the 10.10.10.10 ip address to the mesa card first,
then edit the file whats above again so it can be found again.
Restart the network
Code:
sudo systemctl restart networking
Open a mesa based configuration (or use pncconf to create one)
Let it run for a while. While it is running,
in another window, check the network latency by reviewing the TMAX settings on your card
Code:
halcmd show param hm2*tmax*
Parameters:
Owner Type Dir Value Name
36 s32 RW 0 hm2_7i76e.0.read-request.tmax
36 bit RO FALSE hm2_7i76e.0.read-request.tmax-increased
36 s32 RW 831032 hm2_7i76e.0.read.tmax
36 bit RO FALSE hm2_7i76e.0.read.tmax-increased
36 s32 RW 163024 hm2_7i76e.0.write.tmax
36 bit RO FALSE hm2_7i76e.0.write.tmax-increased
Note these values are in timer ticks, not nanoseconds.
If something goes wrong and you loose your network interface, reboot into the earlier 6.0 kernel and
the interface should be there. remove it.
Code:
sudo apt purge r8168-dkms
reboot into our custom kernel and it should still be there. Re install the driver and reboot the PC to enabl eit.
Follow the tweaks on JT's web site to enable auto login etc
gnipsel.com/linuxcnc/debian-11-fix.html
Also there is a recent issue with Bullseye and Bookworm where it refuses to run linuxcnc on the default gnome desktop which uses wayland. I generally only install the XFCE graphical environment as its a XORG environment and it works perfectly
This can be solved on wayland by adding an environment variable before running linuxcnc
Code:
export PYOPENGL_PLATFORM=x11
This may not stick on a reboot. you can add it to your .profile file as follows so its loaded when you log in.
add the export statement to the end of the file and save and exit Ctrl-O, Ctrl-X