You are not logged in.

#1 2021-08-07 13:54:48

Hydra
Member
Registered: 2021-08-07
Posts: 9

SD card only reads occasionally

Hey everyone I'm brand new here. I tried to find an existing thread that addressed this problem without luck.
I'm experiencing this issue with an old MacBook that I've been using on linux for the last few weeks where the sd card reads on some boots and not on others. I assumed initially that it had something to do with the power saving applications I have installed. I installed tlp and auto-cpufreq. I edited the tlp config and added the sd card reader as a default device but that didn't solve my problem. Any help would be much appreciated.

Thanks

Offline

#2 2021-08-07 14:28:02

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: SD card only reads occasionally

Do other cards work?
Does the card work reliably in other readers?
The intelligence is in the reader, but the contacts could be eroded - does the card look "good"?
Check "dmesg" - does anything get detected when the card fails?
When it fails, does it work (reliably) after a reboot? (the idea would be that you actually update the kernel and now don't have vfat or usb_storage for the running kernel loaded or available)

Offline

#3 2021-08-07 18:22:58

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

Yes, the sd card is reliable in other systems, and when reads it's reliable in this machine, It just isn't recognized at all some boots

Offline

#4 2021-08-07 22:53:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: SD card only reads occasionally

I assume we are not trying to boot from it, but are trying to use it after booting.  How are you mounting it?  Is it possible the dame of the device is changing from what you think it is because of nondeterministic things during boot.

Did you try lsblk with and without the card installed?  And as Seth asked, is there anythin in dmesg or the journal that might point to a problem?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2021-08-08 02:44:19

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

I've tried a few options, but I figured out that the way to get my laptop to recognize the SD card is by fully shutting down the machine and booting up again. It wont hot swap, and it wont recognize if it's restarted from inside Arch. Weird situation.

Last edited by Hydra (2021-08-08 03:09:41)

Offline

#6 2021-08-08 05:39:48

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: SD card only reads occasionally

seth wrote:

Check "dmesg" - does anything get detected when the card fails?

Also: do you have a parallel windows installation?

Offline

#7 2021-08-08 15:35:17

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

I don't see anything, and no I do not. It's a macbook with only Arch

Offline

#8 2021-08-08 15:47:22

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

ewaller wrote:

I assume we are not trying to boot from it, but are trying to use it after booting.  How are you mounting it?  Is it possible the dame of the device is changing from what you think it is because of nondeterministic things during boot.

Did you try lsblk with and without the card installed?  And as Seth asked, is there anythin in dmesg or the journal that might point to a problem?

I checked the logs a couple of times and it returned this under "sd" when I removed and reinserted the card.

[    2.928341] sd 1:0:0:0: [sdb] 244277248 512-byte logical blocks: (125 GB/116 GiB)
[    2.928689] sd 1:0:0:0: [sdb] Write Protect is off
[    2.928693] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[    2.928993] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    2.941506] random: crng init done
[    2.952651] audit: type=1130 audit(1628389095.871:9): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=systemd-random-seed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Edit: This might be the problem, it's automatically stopping some disk. I can only assume that that's the sdcard?

[ 3950.198775] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 3950.206956] sd 0:0:0:0: [sda] Stopping disk

Last edited by Hydra (2021-08-08 16:00:22)

Offline

#9 2021-08-08 19:36:57

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: SD card only reads occasionally

If there's no dmesg response to inserting the card at all, the reader doesn't detect it.
sda is probably your harddisk and the lines might be from a system shutdown (w/o context, that's pretty meaningless)

The sdb segment looks pretty early in the boot and might be from when you booted w/ the card inserted (and it was actually available) - you're really looking for how the system responds when you insert the card.
Maybe boot w/ the card in the slot, check that it's available, unmount and remove it, re-insert it, see whether it's there (lsblk -f) and post the complete dmesg of the boot (you can use the tip in the 1st link below to pipe it into ix.io)

Offline

#10 2021-08-09 01:07:39

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

I'll give it a try

Last edited by Hydra (2021-08-09 01:33:29)

Offline

#11 2021-08-09 20:28:46

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

no luck. This is the output of running lsblk -f after reinserting the sdcard.

NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /var/lib/snapd/snap/core18/2074
loop1
     squash 4.0                                                    0   100% /var/lib/snapd/snap/brave/123
loop2
     squash 4.0                                                    0   100% /var/lib/snapd/snap/snapd/12704
loop3
     squash 4.0                                                    0   100% /var/lib/snapd/snap/gtk-common-themes/1515
loop4
     squash 4.0                                                    0   100% /var/lib/snapd/snap/brave/124
sda                                                                         
├─sda1
│    vfat   FAT32 NO_LABEL
│                       1303-8492                             299.1M     0% /boot/efi
└─sda2
     ext4   1.0         9dd44371-62d3-46f6-9cd3-5b971c102988   73.3G    28% /

I'll run the dmesg when I get a chance.

Offline

#12 2021-08-09 20:40:49

seth
Member
Registered: 2012-09-03
Posts: 51,056

Offline

#13 2021-08-10 12:30:52

Spinnekop
Member
Registered: 2018-02-16
Posts: 25

Re: SD card only reads occasionally

I've had to use a USB - SD card adaptor to read some newer SD cards on my older laptop. You can get one for a few pounds/dollars. Might be worth it....


Umuntu Ngumuntu Ngabantu
---------------------------------------
a person is a person through other people

Offline

#14 2021-08-10 20:42:19

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

Spinnekop wrote:

I've had to use a USB - SD card adaptor to read some newer SD cards on my older laptop. You can get one for a few pounds/dollars. Might be worth it....

Why replace what isn't broken? In my situation it's an issue with the OS not the physical reader, the behavior is consistent regardless of which cards I use. I'm working until tonight so ill have time to run more extensive testing. Thank you all for your help I really appreciate it.

Last edited by Hydra (2021-08-10 20:43:19)

Offline

#15 2021-08-10 20:48:34

seth
Member
Registered: 2012-09-03
Posts: 51,056

Re: SD card only reads occasionally

it's an issue with the OS

Have you tried OtherOS™ to ensure that?

Maybe the oracle of mountainview knows the reader and whether it requires some quirks…

lspci; lsusb

Offline

#16 2021-08-19 14:07:28

Hydra
Member
Registered: 2021-08-07
Posts: 9

Re: SD card only reads occasionally

I seem to have to have fixed the issue. I haven't changed anything, but now the SD card can be removed, and put back in and the system will mount it. IDK why this happened, and I'm sorry I can't help out others who might see this in the future.

Thanks for the help though guys

Offline

Board footer

Powered by FluxBB