Score:0

How to fix SD card that keeps disconnecting and reconnecting?

in flag

I have an old iMac 2013 with Intel® Core™ i5-4570S CPU @ 2.90GHz × 4 running UBUNTU 21.04

Doesn't matter if I connect the SD cards (all of them) in the built in SD card reader or if I use an USB card reader, the problem is very similar. The card connect and disconnect randomly. Normally, on the built-in reader, it can stay on may be a minute or two every time. On the USB card reader it may stay on a few seconds at the time.

    guy@guy-iMac:~$ lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 750M Mac Edition] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4360 802.11ac Wireless Network Adapter (rev 03)
04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57766 Gigabit Ethernet PCIe (rev 01)
04:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 01)
05:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:00.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:03.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:04.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:05.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
06:06.0 PCI bridge: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
07:00.0 System peripheral: Intel Corporation DSL3510 Thunderbolt Controller [Cactus Ridge 4C 2012] (rev 03)
guy@guy-iMac:~$ 

The USB:

    guy@guy-iMac:~$ lsusb
Bus 002 Device 009: ID 0bda:0306 Realtek Semiconductor Corp. USB3.0 Card Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 05ac:828d Apple, Inc. Bluetooth USB Host Controller
Bus 001 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 003: ID 05ac:8511 Apple, Inc. FaceTime HD Camera (Built-in)
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
guy@guy-iMac:~$ 

How can I investigate this problem?

Please note that the journalCTL rport this

(Bare in mind that I'm fairly new at Linux so I do not understand everything here) but the lines in RED starting at nov 24 20:38:55 sounds bad...

nov 24 20:38:27 guy-iMac kernel: scsi 4:0:0:1: Attached scsi generic sg2 type 0
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:1: [sdc] 30294016 512-byte logical blocks: (15.5 GB/14.4 GiB)
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:1: [sdc] Write Protect is off
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:1: [sdc] Mode Sense: 2f 00 00 00
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:1: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
nov 24 20:38:28 guy-iMac kernel:  sdc: sdc1
nov 24 20:38:28 guy-iMac kernel: sd 4:0:0:1: [sdc] Attached SCSI removable disk
nov 24 20:38:28 guy-iMac kernel: FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
nov 24 20:38:28 guy-iMac udisksd[783]: Mounted /dev/sdc1 at /media/guy/Prusa on behalf of uid 1000
nov 24 20:38:28 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Activating via systemd: service name='org.freedesktop.Tracker1' unit='tracker-store.service' requested by >
nov 24 20:38:28 guy-iMac systemd[938]: Starting Tracker metadata database store and lookup manager...
nov 24 20:38:28 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.42' (uid=1000 pid=1272 comm="/us>
nov 24 20:38:28 guy-iMac systemd[938]: Started Tracker metadata database store and lookup manager.
nov 24 20:38:28 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Successfully activated service 'org.freedesktop.Tracker1'
nov 24 20:38:28 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Successfully activated service 'org.gnome.Shell.HotplugSniffer'
nov 24 20:38:35 guy-iMac systemd[1]: fprintd.service: Succeeded.
nov 24 20:38:37 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Activating service name='org.gnome.Nautilus' requested by ':1.379' (uid=1000 pid=22484 comm="gjs /usr/shar>
nov 24 20:38:38 guy-iMac dbus-daemon[971]: [session uid=1000 pid=971] Successfully activated service 'org.gnome.Nautilus'
nov 24 20:38:38 guy-iMac dbus-daemon[751]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by >
nov 24 20:38:38 guy-iMac systemd[1]: Starting Hostname Service...
nov 24 20:38:38 guy-iMac dbus-daemon[751]: [system] Successfully activated service 'org.freedesktop.hostname1'
nov 24 20:38:38 guy-iMac systemd[1]: Started Hostname Service.
nov 24 20:38:38 guy-iMac nautilus[22637]: Called "net usershare info" but it failed: L’exécution du processus fils « net » a échoué (No such file or directory)
nov 24 20:38:48 guy-iMac NetworkManager[755]: <info>  [1637804328.0287] manager: NetworkManager state is now CONNECTED_LOCAL
nov 24 20:38:48 guy-iMac NetworkManager[755]: <info>  [1637804328.0288] manager: NetworkManager state is now CONNECTED_SITE
nov 24 20:38:48 guy-iMac NetworkManager[755]: <info>  [1637804328.0290] policy: set 'Connexion filaire 1' (enp4s0f0) as default for IPv4 routing and DNS
nov 24 20:38:55 guy-iMac kernel: usb 2-1: USB disconnect, device number 42
nov 24 20:38:55 guy-iMac kernel: blk_update_request: I/O error, dev sdc, sector 2049 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 1, lost async page write
nov 24 20:38:55 guy-iMac kernel: blk_update_request: I/O error, dev sdc, sector 31654 op 0x1:(WRITE) flags 0x0 phys_seg 2 prio class 0
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 29606, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 29607, lost async page write
nov 24 20:38:55 guy-iMac kernel: blk_update_request: I/O error, dev sdc, sector 81840 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79792, lost async page write
nov 24 20:38:55 guy-iMac kernel: blk_update_request: I/O error, dev sdc, sector 81856 op 0x1:(WRITE) flags 0x0 phys_seg 6 prio class 0
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79808, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79809, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79810, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79811, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79812, lost async page write
nov 24 20:38:55 guy-iMac kernel: Buffer I/O error on dev sdc1, logical block 79813, lost async page write
nov 24 20:38:55 guy-iMac kernel: blk_update_request: I/O error, dev sdc, sector 81874 op 0x1:(WRITE) flags 0x0 phys_seg 3 prio class 0
nov 24 20:38:55 guy-iMac udisksd[783]: Cleaning up mount point /media/guy/Prusa (device 8:33 no longer exists)
nov 24 20:38:55 guy-iMac systemd[938]: media-guy-Prusa.mount: Succeeded.
nov 24 20:38:55 guy-iMac systemd[1]: media-guy-Prusa.mount: Succeeded.
l
waltinator avatar
it flag
Look at the system's log files, read `man journalctl`, and `sudo journalctl --since="-5 minutes"` within 4 minutes.
Guytas avatar
in flag
Yhanks Waltinator, I added the result in the Question. Lines in RED dont look too good. Check at nov 24 20:38:55
Guytas avatar
in flag
I also tested with a live USB key and I have the exact same problem.
waltinator avatar
it flag
Sounds like a loose hardware connection. What happens if you slowly wiggle the USB key? Are other USB ports available? Powered USB hubs are cheap.
Guytas avatar
in flag
no no it's not a loose connection for sure. It works perfectly in Windows 10 with same hardware. But I found out that with a different card reader it seems to be better. Trying it now to see if it'll stands out over time (one day at least). So it must be a driver for this card reader: Kingston MobilLite G3
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.