adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
MIT License
3.96k stars 1.16k forks source link

Pi Pico-Filesystem (CIRCUITPY) mounted Read-Only for versions >= v9 on Debian 11.10 #9384

Open BusterRaid opened 6 days ago

BusterRaid commented 6 days ago

CircuitPython version

Version en-GB-8.1.0 is mounted read-write.
Version en-GB-8.2.10 is mounted read-write.
Version en_GB-9.0.0-beta is mounted read-only.
Version en_GB-9.0.5 is mounted read-only.
Version en_GB-20240626-main-PR9375-396aaef (latest at test) is mounted read-only.

Code/REPL

N/A.

Behavior

When using CircuitPython >= v9 on Raspberry Pi Pico, the file system (CIRCUITPY) is mounted Read-Only when the Pico is connected to a Raspberry Pi Desktop Debian 11.10 virtual machine.

Versions 8.x of CircuitPython seem to mount the file system (CIRCUITPY) as read-write.

(This is is possibly due to the age of my system or my inexperiance with CircuitPython/Pico.)

I did notice the one of the versions that loaded RO had the following in journalctl, which did not appear in the RW mounted version.

Jun 29 15:23:32 XRCERIUM mtp-probe[5152]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:23:32 XRCERIUM mtp-probe[5152]: bus: 2, device: 16 was not an MTP device Jun 29 15:23:32 XRCERIUM systemd-udevd[5147]: mouse3: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-udevd[5151]: event7: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event7 (Raspberry Pi Pico Consumer Control) Jun 29 15:23:32 XRCERIUM systemd-udevd[5156]: event6: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-udevd[5165]: event5: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event5 (Raspberry Pi Pico Keyboard) Jun 29 15:23:32 XRCERIUM mtp-probe[5173]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:23:32 XRCERIUM mtp-probe[5173]: bus: 2, device: 16 was not an MTP device Jun 29 15:23:32 XRCERIUM pulseaudio[1095]: Failed to find a working profile. Jun 29 15:23:32 XRCERIUM pulseaudio[1095]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-Raspberry_Pi_Pico_E66038B713777233-04" card_name="alsa_card.usb-Raspberry_Pi_Pico_E66038B713777233-04" >

Description

N/A.

Additional information

Environment:

No modifications.

Dell 490 Precision. Intel 5000X (Greencreek) + 631x/6321 ESB2 Dual Intel Xeon 5160 Microsoft Windows 10 Professional (x64) Build 19045.4529 (22H2

Raspberry Pi Desktop. Debian 11.10 Bullseye Linux XRCERIUM 5.10.0-15-amd64 #1 SMP Debian 5.10.120-1 (2022-06-09) x86_64 GNU/Linux

/bin/ls: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=00695414aa5413c8667e62c2362d119cb233a504, for GNU/Linux 3.2.0, stripped

VMware Player 12.5.9 - Most recent version that will run on host's chipset.

Testing (method):

Testing (detail):

_Version: adafruit-circuitpython-raspberry_pi_pico-en_GB-8.1.0.uf2:_ Can write to file system (code.py) OK in VM (Raspberry Pi Desktop Bullseye).

/dev/sdb1 on /media/pi/CIRCUITPY type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

[ 2631.666209] systemd-journald[313]: Received client request to rotate journal. [ 2631.735924] systemd-journald[313]: Vacuuming done, freed 0B of archived journals from /var/log/journal/b81c0c47b8274aeebb400a9f02934605. [ 2714.812654] usb 2-2.1: new full-speed USB device number 16 using uhci_hcd [ 2715.168416] usb 2-2.1: New USB device found, idVendor=239a, idProduct=80f4, bcdDevice= 1.00 [ 2715.168423] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2715.168483] usb 2-2.1: Product: Pico [ 2715.168486] usb 2-2.1: Manufacturer: Raspberry Pi [ 2715.168488] usb 2-2.1: SerialNumber: E66038B713777233 [ 2715.192169] cdc_acm 2-2.1:1.0: ttyACM0: USB ACM device [ 2715.224008] usb-storage 2-2.1:1.2: USB Mass Storage device detected [ 2715.245105] scsi host3: usb-storage 2-2.1:1.2 [ 2715.289409] input: Raspberry Pi Pico Keyboard as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input43 [ 2715.351780] input: Raspberry Pi Pico Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input44 [ 2715.351997] input: Raspberry Pi Pico Consumer Control as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input45 [ 2715.354939] hid-generic 0003:239A:80F4.000E: input,hidraw1: USB HID v1.11 Keyboard [Raspberry Pi Pico] on usb-0000:02:00.0-2.1/input3 [ 2716.279965] scsi 3:0:0:0: Direct-Access Raspberr Pico 1.0 PQ: 0 ANSI: 2 [ 2716.282047] sd 3:0:0:0: Attached scsi generic sg2 type 0 [ 2716.323858] sd 3:0:0:0: [sdb] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB) [ 2716.341907] sd 3:0:0:0: [sdb] Write Protect is off [ 2716.341914] sd 3:0:0:0: [sdb] Mode Sense: 03 00 00 00 [ 2716.359746] sd 3:0:0:0: [sdb] No Caching mode page found [ 2716.359775] sd 3:0:0:0: [sdb] Assuming drive cache: write through [ 2716.465419] sdb: sdb1 [ 2716.579146] sd 3:0:0:0: [sdb] Attached SCSI removable disk

-- Journal begins at Sat 2024-06-29 15:22:08 BST, ends at Sat 2024-06-29 15:23:34 BST. -- Jun 29 15:22:08 XRCERIUM systemd-journald[313]: System Journal (/var/log/journal/b81c0c47b8274aeebb400a9f02934605) is 16.0M, max 1.8G, 1.7G free. Jun 29 15:22:12 XRCERIUM dhcpcd[604]: eth0: no IPv6 Routers available Jun 29 15:22:34 XRCERIUM systemd-timesyncd[459]: Initial synchronization to time server 162.159.200.1:123 (3.debian.pool.ntp.org). Jun 29 15:23:31 XRCERIUM kernel: usb 2-2.1: new full-speed USB device number 16 using uhci_hcd Jun 29 15:23:32 XRCERIUM kernel: usb 2-2.1: New USB device found, idVendor=239a, idProduct=80f4, bcdDevice= 1.00 Jun 29 15:23:32 XRCERIUM kernel: usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jun 29 15:23:32 XRCERIUM kernel: usb 2-2.1: Product: Pico Jun 29 15:23:32 XRCERIUM kernel: usb 2-2.1: Manufacturer: Raspberry Pi Jun 29 15:23:32 XRCERIUM kernel: usb 2-2.1: SerialNumber: E66038B713777233 Jun 29 15:23:32 XRCERIUM kernel: cdc_acm 2-2.1:1.0: ttyACM0: USB ACM device Jun 29 15:23:32 XRCERIUM kernel: usb-storage 2-2.1:1.2: USB Mass Storage device detected Jun 29 15:23:32 XRCERIUM kernel: scsi host3: usb-storage 2-2.1:1.2 Jun 29 15:23:32 XRCERIUM kernel: input: Raspberry Pi Pico Keyboard as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input43 Jun 29 15:23:32 XRCERIUM kernel: input: Raspberry Pi Pico Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input44 Jun 29 15:23:32 XRCERIUM kernel: input: Raspberry Pi Pico Consumer Control as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000E/input/input45 Jun 29 15:23:32 XRCERIUM kernel: hid-generic 0003:239A:80F4.000E: input,hidraw1: USB HID v1.11 Keyboard [Raspberry Pi Pico] on usb-0000:02:00.0-2.1/input3 Jun 29 15:23:32 XRCERIUM mtp-probe[5152]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:23:32 XRCERIUM mtp-probe[5152]: bus: 2, device: 16 was not an MTP device Jun 29 15:23:32 XRCERIUM systemd-udevd[5147]: mouse3: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-udevd[5151]: event7: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event7 (Raspberry Pi Pico Consumer Control) Jun 29 15:23:32 XRCERIUM systemd-udevd[5156]: event6: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-udevd[5165]: event5: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:23:32 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event5 (Raspberry Pi Pico Keyboard) Jun 29 15:23:32 XRCERIUM mtp-probe[5173]: checking bus 2, device 16: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:23:32 XRCERIUM mtp-probe[5173]: bus: 2, device: 16 was not an MTP device Jun 29 15:23:32 XRCERIUM pulseaudio[1095]: Failed to find a working profile. Jun 29 15:23:32 XRCERIUM pulseaudio[1095]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-Raspberry_Pi_Pico_E66038B713777233-04" card_name="alsa_card.usb-Raspberry_Pi_Pico_E66038B713777233-04" > Jun 29 15:23:33 XRCERIUM kernel: scsi 3:0:0:0: Direct-Access Raspberr Pico 1.0 PQ: 0 ANSI: 2 Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0 Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB) Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Write Protect is off Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Mode Sense: 03 00 00 00 Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] No Caching mode page found Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through Jun 29 15:23:33 XRCERIUM kernel: sdb: sdb1 Jun 29 15:23:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Attached SCSI removable disk Jun 29 15:23:34 XRCERIUM udisksd[489]: Mounted /dev/sdb1 at /media/pi/CIRCUITPY on behalf of uid 1000

[Device Information] Device Manufacturer: Raspberry Pi Product Name: Pico Serial Number: E66038B713777233 USB Version Supported: 2.00 USB Device Speed: USB 1.1 Full-speed Driver Description: USB Composite Device Hardware ID: USB\VID_239A&PID_80F4

[Driver Information] Driver Manufacturer: (Standard USB Host Controller) Driver Description: USB Composite Device Driver Provider: Microsoft Driver Version: 10.0.19041.4474 Driver Date: 21-Jun-2006 DeviceInstanceId USB\VID_239A&PID_80F4\E66038B713777233 Location Paths PCIROOT(0)#PCI(1D03)#USBROOT(0)#USB(2)

_Version: adafruit-circuitpython-raspberry_pi_pico-en_GB-8.2.10:_ Can write to file system (code.py) OK in VM (Raspberry Pi Desktop Bullseye).

/dev/sdb1 on /media/pi/CIRCUITPY type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

_Version: adafruit-circuitpython-raspberry_pi_pico-en_GB-9.0.0-beta.0.uf2:_

Can NOT write to file system (code.py) in VM (Raspberry Pi Desktop Bullseye).

When disconnected from the VM, the file system is no longer writeable from Windows. Ejecting/Connecting the Pico makes the file system writeable again, for Windows.

/dev/sdb1 on /media/pi/CIRCUITPY type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

Version: adafruit-circuitpython-raspberry_pi_pico-en_GB-9.0.5.uf2: Can NOT write to file system (code.py) in VM (Raspberry Pi Desktop Bullseye).

When disconnected from the VM, the file system is no longer writeable from Windows. Ejecting/Connecting the Pico makes the file system writeable again, for Windows.

/dev/sdb1 on /media/pi/CIRCUITPY type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

_Version: adafruit-circuitpython-raspberry_pi_pico-en_GB-20240626-main-PR9375-396aaef:_ Can NOT write to file system (code.py) in VM (Raspberry Pi Desktop Bullseye).

When disconnected from the VM, the file system is no longer writeable from Windows. Ejecting/Connecting the Pico makes the file system writeable again, for Windows.

/dev/sdb1 on /media/pi/CIRCUITPY type vfat (ro,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

2024-06-29 15:06:00,453 - mu.logic:787(_load) DEBUG: #121 print("Hello World!")

2024-06-29 15:06:05,515 - mu.logic:869(save_tab_to_file) INFO: Saving script to: /media/pi/CIRCUITPY/code.py 2024-06-29 15:06:05,515 - mu.logic:870(save_tab_to_file) DEBUG: #1212 print("Hello World!")

2024-06-29 15:06:05,516 - mu.logic:874(save_tab_to_file) ERROR: [Errno 30] Read-only file system: '/media/pi/CIRCUITPY/code.py' 2024-06-29 15:06:05,518 - mu.interface.main:723(show_message) DEBUG: Could not save file (disk problem) 2024-06-29 15:06:05,519 - mu.interface.main:724(show_message) DEBUG: Error saving file to disk. Ensure you have permission to write the file and sufficient disk space. 2024-06-29 15:06:14,206 - mu.logic:1075(show_admin) INFO: Showing logs from /home/pi/.cache/mu/log/mu.log

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 012: ID 239a:80f4 Adafruit Pico Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

/dev/sda1: UUID="89bcd5d7-fbb6-4c34-b9b2-afe4b3ed2ac4" BLOCK_SIZE="1024" TYPE="ext2" PARTUUID="e49b40f1-01" /dev/sda5: UUID="T9YbuA-aJzc-p2WA-wAWC-iTTh-tQ5K-90LJ3b" TYPE="LVM2_member" PARTUUID="e49b40f1-05" /dev/mapper/raspberry--vg-root: UUID="9b6b1cd4-c228-4ff6-ac1f-660f7952f38f" BLOCK_SIZE="4096" TYPE="ext4" /dev/mapper/raspberry--vg-swap_1: UUID="a54c0ead-45df-4b64-9c41-890aa89d93ae" TYPE="swap" /dev/sdb1: SEC_TYPE="msdos" LABEL="CIRCUITPY" UUID="2895-BCA3" BLOCK_SIZE="512" TYPE="vfat"

Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors Disk model: VMware Virtual S Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xe49b40f1

Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 999423 997376 487M 83 Linux /dev/sda2 1001470 41940991 40939522 19.5G 5 Extended /dev/sda5 1001472 41940991 40939520 19.5G 8e Linux LVM

Disk /dev/mapper/raspberry--vg-root: 18.56 GiB, 19931332608 bytes, 38928384 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/raspberry--vg-swap_1: 980 MiB, 1027604480 bytes, 2007040 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdb: 1 MiB, 1049088 bytes, 2049 sectors Disk model: Pico
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type /dev/sdb1 1 2048 2048 1M 6 FAT16

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 6 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0002 Rev=05.10 S: Manufacturer=Linux 5.10.0-15-amd64 ehci_hcd S: Product=EHCI Host Controller S: SerialNumber=0000:02:03.0 C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1d6b ProdID=0001 Rev=05.10 S: Manufacturer=Linux 5.10.0-15-amd64 uhci_hcd S: Product=UHCI Host Controller S: SerialNumber=0000:02:00.0 C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0e0f ProdID=0003 Rev=01.03 S: Manufacturer=VMware S: Product=VMware Virtual USB Mouse C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=0mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid

T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 7 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0e0f ProdID=0002 Rev=01.00 S: Product=VMware Virtual USB Hub C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub

T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 12 Spd=12 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=239a ProdID=80f4 Rev=01.00 S: Manufacturer=Raspberry Pi S: Product=Pico S: SerialNumber=E66038B713777233 C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=100mA I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 Driver=cdc_acm I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm I: If#=0x2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage I: If#=0x3 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid I: If#=0x4 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio I: If#=0x5 Alt= 0 #EPs= 2 Cls=01(audio) Sub=03 Prot=00 Driver=snd-usb-audio

[ 2421.759719] usb 2-2.1: new full-speed USB device number 14 using uhci_hcd [ 2422.078129] usb 2-2.1: New USB device found, idVendor=239a, idProduct=80f4, bcdDevice= 1.00 [ 2422.078136] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2422.078138] usb 2-2.1: Product: Pico [ 2422.078139] usb 2-2.1: Manufacturer: Raspberry Pi [ 2422.078141] usb 2-2.1: SerialNumber: E66038B713777233 [ 2422.110240] cdc_acm 2-2.1:1.0: ttyACM0: USB ACM device [ 2422.196460] usb-storage 2-2.1:1.2: USB Mass Storage device detected [ 2422.210213] scsi host3: usb-storage 2-2.1:1.2 [ 2422.295726] input: Raspberry Pi Pico Keyboard as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input37 [ 2422.350148] input: Raspberry Pi Pico Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input38 [ 2422.350337] input: Raspberry Pi Pico Consumer Control as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input39 [ 2422.350592] hid-generic 0003:239A:80F4.000C: input,hidraw1: USB HID v1.11 Keyboard [Raspberry Pi Pico] on usb-0000:02:00.0-2.1/input3 [ 2423.231366] scsi 3:0:0:0: Direct-Access Raspberr Pico 1.0 PQ: 0 ANSI: 2 [ 2423.236999] sd 3:0:0:0: Attached scsi generic sg2 type 0 [ 2423.249473] sd 3:0:0:0: [sdb] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB) [ 2423.267208] sd 3:0:0:0: [sdb] Write Protect is on [ 2423.267215] sd 3:0:0:0: [sdb] Mode Sense: 03 00 80 00 [ 2423.284114] sd 3:0:0:0: [sdb] No Caching mode page found [ 2423.284138] sd 3:0:0:0: [sdb] Assuming drive cache: write through [ 2423.389080] sdb: sdb1 [ 2423.503738] sd 3:0:0:0: [sdb] Attached SCSI removable disk

Jun 29 15:15:31 XRCERIUM kernel: usb 2-2.1: new full-speed USB device number 14 using uhci_hcd Jun 29 15:15:32 XRCERIUM kernel: usb 2-2.1: New USB device found, idVendor=239a, idProduct=80f4, bcdDevice= 1.00 Jun 29 15:15:32 XRCERIUM kernel: usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Jun 29 15:15:32 XRCERIUM kernel: usb 2-2.1: Product: Pico Jun 29 15:15:32 XRCERIUM kernel: usb 2-2.1: Manufacturer: Raspberry Pi Jun 29 15:15:32 XRCERIUM kernel: usb 2-2.1: SerialNumber: E66038B713777233 Jun 29 15:15:32 XRCERIUM kernel: cdc_acm 2-2.1:1.0: ttyACM0: USB ACM device Jun 29 15:15:32 XRCERIUM kernel: usb-storage 2-2.1:1.2: USB Mass Storage device detected Jun 29 15:15:32 XRCERIUM kernel: scsi host3: usb-storage 2-2.1:1.2 Jun 29 15:15:32 XRCERIUM kernel: input: Raspberry Pi Pico Keyboard as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input37 Jun 29 15:15:32 XRCERIUM kernel: input: Raspberry Pi Pico Mouse as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input38 Jun 29 15:15:32 XRCERIUM kernel: input: Raspberry Pi Pico Consumer Control as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:239A:80F4.000C/input/input39 Jun 29 15:15:32 XRCERIUM kernel: hid-generic 0003:239A:80F4.000C: input,hidraw1: USB HID v1.11 Keyboard [Raspberry Pi Pico] on usb-0000:02:00.0-2.1/input3 Jun 29 15:15:32 XRCERIUM mtp-probe[4773]: checking bus 2, device 14: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:15:32 XRCERIUM mtp-probe[4773]: bus: 2, device: 14 was not an MTP device Jun 29 15:15:33 XRCERIUM systemd-udevd[4768]: mouse3: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:15:33 XRCERIUM systemd-udevd[4774]: event6: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:15:33 XRCERIUM systemd-udevd[4776]: event7: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:15:33 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event7 (Raspberry Pi Pico Consumer Control) Jun 29 15:15:33 XRCERIUM systemd-udevd[4787]: event5: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jun 29 15:15:33 XRCERIUM systemd-logind[487]: Watching system buttons on /dev/input/event5 (Raspberry Pi Pico Keyboard) Jun 29 15:15:33 XRCERIUM mtp-probe[4794]: checking bus 2, device 14: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1" Jun 29 15:15:33 XRCERIUM mtp-probe[4794]: bus: 2, device: 14 was not an MTP device Jun 29 15:15:33 XRCERIUM kernel: scsi 3:0:0:0: Direct-Access Raspberr Pico 1.0 PQ: 0 ANSI: 2 Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0 Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] 2049 512-byte logical blocks: (1.05 MB/1.00 MiB) Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Write Protect is on Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Mode Sense: 03 00 80 00 Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] No Caching mode page found Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through Jun 29 15:15:33 XRCERIUM kernel: sdb: sdb1 Jun 29 15:15:33 XRCERIUM kernel: sd 3:0:0:0: [sdb] Attached SCSI removable disk Jun 29 15:15:33 XRCERIUM pulseaudio[1095]: Failed to find a working profile. Jun 29 15:15:33 XRCERIUM pulseaudio[1095]: Failed to load module "module-alsa-card" (argument: "device_id="1" name="usb-Raspberry_Pi_Pico_E66038B713777233-04" card_name="alsa_card.usb-Raspberry_Pi_Pico_E66038B713777233-04" > Jun 29 15:15:34 XRCERIUM udisksd[489]: Mounted /dev/sdb1 at /media/pi/CIRCUITPY on behalf of uid 1000 lines 1-37/37 (END)

[Device Information] Device Manufacturer: Raspberry Pi Product Name: Pico Serial Number: E66038B713777233 USB Version Supported: 2.00 USB Device Speed: USB 1.1 Full-speed Driver Description: USB Composite Device Hardware ID: USB\VID_239A&PID_80F4

[Driver Information] Driver Manufacturer: (Standard USB Host Controller) Driver Description: USB Composite Device Driver Provider: Microsoft Driver Version: 10.0.19041.4474 Driver Date: 21-Jun-2006 DeviceInstanceId USB\VID_239A&PID_80F4\E66038B713777233 Location Paths PCIROOT(0)#PCI(1D03)#USBROOT(0)#USB(2)

dhalbert commented 5 days ago

What happens if you try the board directly on the RPi without using a VM?

Also try erasing and reformatting CIRCUITPY.

import storage 
storage.erase_filesystem()
BusterRaid commented 4 days ago

Hi.

Thank you for the reply.

On the "original" set up (Dell 490-Win 10 VM host running "Raspberry Pi Desktop - Bullseye, 11.x" as a VM and the Pico connected to the VM):

import storage 
storage.erase_filesystem()

.. did not resolve the issue.

After running the command the Pico seems to be "ejected" from the VM and then reconnected. However the Pico is (re)mounted as ReadOnly.

When directly connecting the Pico to a Raspberry Pi 3 Model B Plus Rev 1.3 running Raspberry Pi OS Bookworm 12.x, the Pico seems to be OK-it is mounted as ReadWrite.

At the moment I dont have access to a physical Pi which is running "Raspberry Pi OS - Bullseye, 11.x". I'll see if I can spin one up tomorrow.

The current version of the x86 desktop (which I use for the VM) is "stuck" on Bullseye - there is no Bookworm version.

As I do most of my tinkering on a VM, I'd like to get the Pico/CircuitPython combo working when connected to this Raspberry Pi Desktop - Bullseye VM.

dhalbert commented 4 days ago

We have not seen problems like this with Bullseye on a physical RPi, so I suspect it is something about using the VM, perhaps something about the VM settings.

Can you see the serial connection from the VM to the board, and connect to the REPL? If not, that may be confusing the issue.

BusterRaid commented 3 days ago

Can you see the serial connection from the VM to the board, and connect to the REPL? If not, that may be confusing the issue.

I think I can (it's all a bit new to me) - I'm using Mu on the Pi VM and the option "serial" is available and seems to work - it seems to connect and I can run stuff on the Pico (e.g.: turning the onboard LED on/off). This is the case for both Circuit Python v8.x and v9.x versions that i have tried.

Some other tests I carried out:

- For Raspberry Pi Desktop, Bullseye (VM), CircuitPython en_GB-9.0.5:

The Pico is mounted ReadOnly. There is no change to this behaviour if, within the hypervisor, I set "USB compatibility" as 1.1, 2 or 3 between reboots of the VM.

- For Raspberry Pi Desktop, Buster(10.13) (VM), CircuitPython en_GB-9.0.5:

Mostly a vanilla install, with updates. The Pico is mounted ReadOnly.

- For Debian Bullseye(11.10) i386 (VM), CircuitPython en_GB-9.0.5:

Mostly a vanilla install, with updates. When using the hypervisor option "Connect (Disconnect from host)", the Pico is connected to the VM but not automagically mounted. Mounting via the "CIRCUITPY" icon on the desktop causes the Pico to be mounted ReadOnly.

Issuing the mount command:

`mount -t vfat /dev/sdb1 /media/user1/CIRCUITPY -o rw`

... elicits the response:

`mount: /media/user1/CIRCUITPY: WARNING: source write-protected, mounted read-only.`

... suggesting the device is being considered as a ReadOnly USB device.

In summary: CircuitPython en_GB-8.2.10 - OK on every VM I tried. - Mounted as ReadWrite. CircuitPython en_GB-9.0.5 - Not OK on every VM I tried. - Mounted as ReadOnly.

If using "CircuitPython en_GB-9.0.5", the Pico is mounted on the HOST machine (the Dell Windows 10 physical) as ReadWrite. Once the Pico is connected/mounted to a VM its file system is "set" to ReadOnly. Shutting down the VM (returning the Pico to the host), the Pico file system is remains ReadOnly. Removing the Pico from the host and reinserting it restores the filesystem to ReadWrite.

I agree the issue is almost certainly in the hypervisor handling of the USB device but the behaviour seems different between CircuitPython versions v8.x and v9.x (Caveat: I have tested a few of the available v8.x and v9.x versions).

Thanks.