Linux PC for running tasks
Psychopy 2025 has mutli-audio issues?
pip show psychopy|grep Version # Version: 2025.2.1
python3 ~/.venv/lib/python3.13/site-packages/psychopy/demos/coder/stimuli/soundStimuli.py
#
Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1742
Expression 'AlsaOpen( hostApi, parameters, streamDir, &pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1774
Exception ignored in: <function Stream.__del__ at 0x7f6d58a85940>
Traceback (most recent call last):
File "/home/lncd/.venv/lib/python3.13/site-packages/psychtoolbox/audio.py", line 236, in __del__
self.close()
File "/home/lncd/.venv/lib/python3.13/site-packages/psychtoolbox/audio.py", line 146, in close
raise err
File "/home/lncd/.venv/lib/python3.13/site-packages/psychtoolbox/audio.py", line 139, in close
PsychPortAudio('Close', self.handle)
AttributeError: 'Stream' object has no attribute 'handle'
https://discourse.psychopy.org/t/error-with-auditory-stimuli-experiments/44921
https://psychopy.org/api/sound/playback.html?_gl=1*16ntnq1*_ga*NzY0OTEzMjEuMTc2MTU5Nzc0OQ..*_ga_96LHQFPY1F*czE3NjE5NDAwMjQkbzgkZzEkdDE3NjE5NDA1NTMkajYwJGwwJGgw#:~:text=0%20%3A%20Latency%20not%20important&text=The%20advantage%20of%20this%20move,the%20same%20throughout%20the%20experiment
GeForce GTX 760 was pulled from the original task PC and put into the newest. In the supported list of cards for Version 535.261.03 according to the debian wiki. Kernel booted with 535 fails, errors with suggestion to use nvidia-legacy-390xx. Booting that suggests adding ibt=off, but that causes a kernel panic(?) or hang on Debian 13/sid. With the stock/open nouveau drivers, the card runs very hot and the fan is always on.
#apt install nvidia-tesla-535-kernel-dkms nvidia-tesla-535-driver firmware-misc-nonfree apt install nvidia-tesla-390-kernel-dkms nvidia-tesla-390-driver firmware-misc-nonfree
Is /dev/parport0, but lp module blocks access. /sbin/rmmod lp resolves that. Fix perminately by blacklisting the module.
echo "blacklist lp">>/etc/modprobe.d/blacklist dpkg-reconfigure linux-image-$(uname -r)
Must install startech's driver StarTechPEX1P_LPT_64bit. Card takes resource as LPT3.
https://www.downtowndougbrown.com/2013/06/parallel-port-tester/
cedrus button box setup
OSError: libftd2xx.so: cannot open shared object file: No such file or directory
https://ftdichip.com/drivers/d2xx-drivers/ 1.4.33 retrieved 2025-10-28
mv libftd2xx.so /lib/x86_64-linux-gnu/
Officially does not support linux (2021) but suggests will work in 2023. We have a pull request for our fork/port for xid_device_library.
import ftd2xx; devs = ftd2xx.listDevices() # DeviceError: DEVICE_NOT_FOUND import pyxid2; pyxid2.get_xid_devices() # []
dmesg -w
[ 5742.201934] usb 1-8.1: new full-speed USB device number 9 using xhci_hcd
[ 5742.295968] usb 1-8.1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[ 5742.295983] usb 1-8.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5742.295988] usb 1-8.1: Product: FT232R USB UART
[ 5742.295992] usb 1-8.1: Manufacturer: FTDI
[ 5742.303576] ftdi_sio 1-8.1:1.0: FTDI USB Serial Device converter detected
[ 5742.303629] usb 1-8.1: Detected FT232R
[ 5742.304366] usb 1-8.1: FTDI USB Serial Device converter now attached to ttyUSB0
ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Oct 29 16:02 /dev/ttyUSB0
gpasswd -a lncd dialout
Adding user lncd to group dialout
# -------
sudo apt install python3-ftdi # brings in python3-usb
cat /etc/udev/rules.d/11-ftdi.rules
# SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", GROUP="plugdev", MODE="0664"
udevadm control --reload-rules; udevadm trigger
python3 -c 'from pyftdi.ftdi import Ftdi; print(Ftdi.show_devices())'
# Available interfaces:
# ftdi://ftdi:232:1:8/1 (FT232R USB UART)
python3 -c 'import ftd2xx as ft; print(ft.listDevices())'
# [b'']
python3 -c 'import pyxid2; print(pyxid2.get_xid_devices())'
# []
#### remove conflicting module!
/sbin/rmmod ftdi_sio
python3 -c 'import pyxid2; print(pyxid2.get_xid_devices())'
# [<XidDevice "Cedrus RB-840">]
## try to make permanent again
echo -e 'blacklist ftdisio\nblacklist lp' > /etc/modprobe.d/blacklist-lp_ftdi.conf
echo -e 'blacklist ftdisio\nblacklist lp' >> /etc/modules-load.d/modules.conf # above didn't work. this did
/sbin/dpkg-reconfigure linux-image-$(uname -r)