Ubuntu issues with alchitryloader and serial port

I’m having some issues with Ubuntu.
When I plug in the Alchitry, the Loader sees it BUT ubuntu can’t see the serial port.
If I look at dmesg I see this;

[   45.565465] usb 1-3: new high-speed USB device number 5 using xhci_hcd
[   45.695817] usb 1-3: New USB device found, idVendor=0403, idProduct=6010, bcdDevice= 7.00
[   45.695833] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   45.695840] usb 1-3: Product: Alchitry Au
[   45.695844] usb 1-3: Manufacturer: Alchitry
[   45.695848] usb 1-3: SerialNumber: FT3KRFFN
[   45.750800] usbcore: registered new interface driver usbserial_generic
[   45.750809] usbserial: USB Serial support registered for generic
[   45.752915] usbcore: registered new interface driver ftdi_sio
[   45.752946] usbserial: USB Serial support registered for FTDI USB Serial Device
[   45.752972] ftdi_sio 1-3:1.0: FTDI USB Serial Device converter detected
[   45.753002] usb 1-3: Detected FT2232H
[   45.753122] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
[   45.753151] ftdi_sio 1-3:1.1: FTDI USB Serial Device converter detected
[   45.753175] usb 1-3: Detected FT2232H
[   45.753282] usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB1
[   45.754148] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[   45.754163] ftdi_sio 1-3:1.0: device disconnected
[   45.754226] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[   45.754240] ftdi_sio 1-3:1.1: device disconnected

If I move the 99-alchitry.rules file out of /etc/udev/rules.d/

I can then see the serial port, BUT alchitry loader does not see the alchitry board.

Did I miss something?

It looks like you have the ftdi_sio driver installer, I remember a talk stating that it was needed to remove it so that the libusb can take over?

You can try

sudo rmmod ftdi_sio

This is out of the box ubuntu, how do I change it?
I couldn’t find instructions on the main page.

I assume I need to reboot as that didn’t work?

didn’t work with a reboot, same issue.
With the 99-alchitry.rules in /etc/udev/rules.d/ I cannot see the Alchitry serial port but CAN upload.
if I remove the 99-alchitry.rules from /etc/udev/rules.d I CAN see the Alchitry serial port but CANNOT upload.

rmmod does not survives a reboot.
For a premanant (but still reversible) disable you need to do :

  1. Create of edit /etc/modprobe.d/blacklist.conf, add :
blacklist ftdi_sio
  1. sudo update-initramfs -u
  2. reboot

sadly, no luck.
Same issue, alchitry loader works, but there is no ttyUSB0 or ttyUSB1

$ ls /dev/tty*
/dev/tty    /dev/tty20  /dev/tty33  /dev/tty46  /dev/tty59      /dev/ttyS12  /dev/ttyS25
/dev/tty0   /dev/tty21  /dev/tty34  /dev/tty47  /dev/tty6       /dev/ttyS13  /dev/ttyS26
/dev/tty1   /dev/tty22  /dev/tty35  /dev/tty48  /dev/tty60      /dev/ttyS14  /dev/ttyS27
/dev/tty10  /dev/tty23  /dev/tty36  /dev/tty49  /dev/tty61      /dev/ttyS15  /dev/ttyS28
/dev/tty11  /dev/tty24  /dev/tty37  /dev/tty5   /dev/tty62      /dev/ttyS16  /dev/ttyS29
/dev/tty12  /dev/tty25  /dev/tty38  /dev/tty50  /dev/tty63      /dev/ttyS17  /dev/ttyS3
/dev/tty13  /dev/tty26  /dev/tty39  /dev/tty51  /dev/tty7       /dev/ttyS18  /dev/ttyS30
/dev/tty14  /dev/tty27  /dev/tty4   /dev/tty52  /dev/tty8       /dev/ttyS19  /dev/ttyS31
/dev/tty15  /dev/tty28  /dev/tty40  /dev/tty53  /dev/tty9       /dev/ttyS2   /dev/ttyS4
/dev/tty16  /dev/tty29  /dev/tty41  /dev/tty54  /dev/ttyprintk  /dev/ttyS20  /dev/ttyS5
/dev/tty17  /dev/tty3   /dev/tty42  /dev/tty55  /dev/ttyS0      /dev/ttyS21  /dev/ttyS6
/dev/tty18  /dev/tty30  /dev/tty43  /dev/tty56  /dev/ttyS1      /dev/ttyS22  /dev/ttyS7
/dev/tty19  /dev/tty31  /dev/tty44  /dev/tty57  /dev/ttyS10     /dev/ttyS23  /dev/ttyS8
/dev/tty2   /dev/tty32  /dev/tty45  /dev/tty58  /dev/ttyS11     /dev/ttyS24  /dev/ttyS9

and dmesg -l info gives me -

[   81.169232] usb 1-3: New USB device found, idVendor=0403, idProduct=6010, bcdDevice= 7.00
[   81.169236] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   81.169237] usb 1-3: Product: Alchitry Au
[   81.169238] usb 1-3: Manufacturer: Alchitry
[   81.169239] usb 1-3: SerialNumber: FT3KRFFN
[  144.854204] usb 1-3: USB disconnect, device number 5
[  146.556189] usb 1-3: new high-speed USB device number 6 using xhci_hcd
[  146.688204] usb 1-3: New USB device found, idVendor=0403, idProduct=6010, bcdDevice= 7.00
[  146.688208] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  146.688209] usb 1-3: Product: Alchitry Au
[  146.688210] usb 1-3: Manufacturer: Alchitry
[  146.688210] usb 1-3: SerialNumber: FT3KRFFN

Note that it doesn’t show the USB0 or USB1

I just tested it on my Raspberry Pi and it works with Pi OS (Debian-based) and Labs 1.2.7.

I downloaded Alchitry Labs 1.2.7 but it does not work out-of-box on Pi.
I had to replace swt.jar with an AARCH64 version, then add libusb4java-1.3.0-linux-aarch64.jar.

Once I got it working, I plugged my Au and witnessed ftdi_sio loaded like it did for you, providing the two tty.
I ran the loader and I could erase and program without issue.

I didn’t disabled ftdi_sio nor used udev rules.

I’ll try Labs 2 later.

Very odd I’m on Ubuntu 24 on a regular PC

I don’t have an ubuntu setup at hand, I could try to fire up a VM tomorrow, but for now I just tried Labs v2 on Raspberry :smiley:

I had to build it from source but it works out-of-box and the built-in loader found my Au right away.

Of course it’s not very usefull with an Au since Vivado won’t run on a Pi (I managed to install it fully using the excellent box64, but I could not get it to run properly, at least not the GUI), but it could be usable with a Cu and the open-source toolchain.

Yeah, the problem is being able to see BOTH the alchitry in the loader AND the uart on the Alchitry board at the same time for me.

I do see both at the same time on my Pi :slight_smile:
I’m downloading Ubuntu 24 and will try it in a VM but internet is pretty slow, no fiber yet…

So I tried it on Ubuntu and there I have your issue, so it looks like it’s Ubuntu specific but I can’t tell why so far…
Maybe some package are not fully up-to-date or something like this.

Very odd, so it’s ubuntu specific…
I’m going to double check the brltty thing

Found a fix with the help of someone who is WAY better with linux than I am;

SUBSYSTEM!="usb|usb_device", GOTO="ft2232_rules_end"
ACTION!="add", GOTO="ft2232_rules_end"

ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", RUN+="/bin/sh -c 'basename %p
:1.0 > /sys/bus/usb/drivers/ftdi_sio/unbind''", MODE="0666", GROUP="dialout", EN
V{ID_MM_DEVICE_IGNORE}="1"

LABEL="ft2232_rules_end"

I was on this track too since it looks like it’s a conflict between ftdi_sio and D2XX (another native API of FTDI used by Labs and Loader).

I still wonder why this is an issue only on ubuntu though…
EDIT : It may be bound to kernel / driver version, Raspbian uses newer kernel (6.12) that Ubuntu 24 (6.8)

This new rule does not unload ftdi_sio but instead instruct it to ignore the Au (more accurately any FTDI 2232 device).