You are not logged in.

#1 2021-08-16 11:13:54

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

SD card mounted as read only issue (solved)

recently i bought an SD card for my laptop however it is automatically mounted as read only sad
: mount: /run/media/shaked: WARNING: source write-protected, mounted read-only.
the issue seems to be disk ownership however i still cant write on the disk after adding my user to the disk group and changing disk ownership to my user
checking disk ownership:

ls -l /dev/mmcblk0p1

brw-rw---- 1 shaked disk 179, 1 Aug 16 14:01 /dev/mmcblk0p1

trying to format the disk:

mkfs -t ext4 /dev/mmcblk0p1
mke2fs 1.46.3 (27-Jul-2021)
/dev/mmcblk0p1 contains a exfat file system
Proceed anyway? (y,N) y
/dev/mmcblk0p1: Read-only file system while setting up superblock

* the physical switch is on open

Last edited by shaked (2025-01-06 01:48:19)

Offline

#2 2021-08-16 14:45:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

The physical switch on the card is just a nice suggestion for the reader - the logic as well as the restrictions are implemented there.
This has nothing to do w/ the filesystem or system permissions.

Make sure the switch is really, fully open. Then check again. If it's stll open, we need to know the model of your card reader (it'll likely show up in "lspci" or "lsusb") and you can also google for it, there might be some quirks (kernel parameters) required to make it behave.

Offline

#3 2021-08-16 15:06:43

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

seth wrote:

The physical switch on the card is just a nice suggestion for the reader - the logic as well as the restrictions are implemented there.
This has nothing to do w/ the filesystem or system permissions.

Make sure the switch is really, fully open. Then check again. If it's stll open, we need to know the model of your card reader (it'll likely show up in "lspci" or "lsusb") and you can also google for it, there might be some quirks (kernel parameters) required to make it behave.

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0cf3:e360 Qualcomm Atheros Communications 
-> Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 004: ID 5986:0703 Acer, Inc Lenovo EasyCamera
Bus 001 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


shows here however it does seem to show when i use lspci


lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
02:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 30)
is it a driver issue then? 

Last edited by shaked (2021-08-19 17:13:06)

Offline

#4 2021-08-16 15:19:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

Please use code tags, https://bbs.archlinux.org/help.php#bbcode

-> Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller

This is your card reader, the "memory controller" (assuming you meant that) is something different.

is it a driver issue then?

We don't know yet smile

Do you have https://aur.archlinux.org/packages/rts5139-dkms/ ?
https://github.com/asymingt/rts5139 has a pattern that you can look for in your dmesg ("tuning execution failed")

Offline

#5 2021-08-16 15:42:55

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

tried to install the dkms but it required linux-headers went to pacman -S it but it seems network manager is giving me problems like usual maybe this should be addressed in another post... as soon as i can i will try (writing this on my laptop although NM shows 0bit upstream downstream)

Offline

#6 2021-08-16 15:49:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

The typical network problem is that you run concurrent managers:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#7 2021-08-18 16:31:39

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

after installing the dkms the partitions name changed from mmcblk0p1 to sdb1 but it is still read only as i cant format it in gparted without libparted error cant write to /dev/sdb1 because its opened read only

Offline

#8 2021-08-18 16:51:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

Please post an updated system journal.

Offline

#9 2021-08-18 17:07:19

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

system journal:
http://ix.io/3wnf

Offline

#10 2021-08-18 18:57:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

Aug 18 19:14:56 leno-E31 kernel: sd 2:0:0:0: [sdb] 249737216 512-byte logical blocks: (128 GB/119 GiB)
Aug 18 19:14:56 leno-E31 kernel: sd 2:0:0:0: [sdb] Write Protect is on
Aug 18 19:14:56 leno-E31 kernel: sd 2:0:0:0: [sdb] Mode Sense: 67 10 80 00
Aug 18 19:14:56 leno-E31 kernel: sd 2:0:0:0: [sdb] Cache data unavailable
Aug 18 19:14:56 leno-E31 kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Aug 18 19:14:56 leno-E31 kernel:  sdb: sdb1
…
Aug 18 19:20:10 leno-E31 kernel: sd 2:0:0:0: [sdb] 249737216 512-byte logical blocks: (128 GB/119 GiB)
Aug 18 19:20:10 leno-E31 kernel: sdb: detected capacity change from 0 to 249737216
Aug 18 19:20:10 leno-E31 kernel:  sdb: sdb1
Aug 18 19:20:10 leno-E31 kdeinit5[2677]: Qt: Session management error: networkIdsList argument is NULL
Aug 18 19:20:12 leno-E31 kwin_x11[623]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 46, resource id: 4194315, major code: 18 (ChangeProperty), minor code: 0
Aug 18 19:20:12 leno-E31 systemd[550]: app-org.kde.dolphin-25b65095f2f64d168bb494cb743fd27c.scope: Consumed 3.170s CPU time.
Aug 18 19:20:12 leno-E31 kwin_x11[623]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50, resource id: 79691827, major code: 18 (ChangeProperty), minor code: 0
Aug 18 19:20:12 leno-E31 kwin_x11[623]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 63, resource id: 48234780, major code: 18 (ChangeProperty), minor code: 0
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 Sense Key : Not Ready [current] 
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 Add. Sense: Medium not present
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 0e e2 af f0 00 00 08 00
Aug 18 19:20:13 leno-E31 kernel: blk_update_request: I/O error, dev sdb, sector 249737200 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 Sense Key : Not Ready [current] 
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 Add. Sense: Medium not present
Aug 18 19:20:13 leno-E31 kernel: sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 0e e2 af f0 00 00 08 00
Aug 18 19:20:13 leno-E31 kernel: blk_update_request: I/O error, dev sdb, sector 249737200 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Aug 18 19:20:13 leno-E31 kernel: Buffer I/O error on dev sdb, logical block 31217150, async page read
Aug 18 19:20:13 leno-E31 kernel: sdb: detected capacity change from 249737216 to 0

Do you have other cards to test in that reader and another reader to test that card in?
Is the card SD, SDHC, SDXC or SDUC?
The backward compatibility is not guaranteed and given the age of the reader, it'll probably not handle SDUC and only maybe SDXC - r/o interpretation could be a safety measure by the reader out of concern to damage the card on writing attempts.

Offline

#11 2021-08-18 20:10:37

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

i was sure i posted a reply here but i don't see it the card is SDXC on an unofficial (because lenovo is lazy unlike intel) it was written it supports SDXC cards but no mention on capacity my card is 128gb the minimum for the SDXC specification is 32gb if that is the case and it is a hardware support issue the sd card will just need to wait until i get a new laptop the store i bought it from doesn't take kindly to returns after opening the package sad

Offline

#12 2021-08-18 20:42:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

The forum is having a bad time, https://bbs.archlinux.org/viewtopic.php?id=268887

You can get compact sdxc usb 3.0 card readers for $10-20 on amazon.
Ideally you'd test a different card/reader w/o investment, though (older sdhc card to make sure the reader & driver principally work and maybe a friend/coworker/family member can test the card in a different reader)

Offline

#13 2021-08-18 21:39:30

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

i dont think my laptop is even usb 2.1 10-20 dollars is around the same amazon price for the sd card itself which after taxes import fees & retail its around 60$ i took it to the store a day after i got it and an employee showed me that it works on his laptop i think it would be better to sell it and get some money back

Offline

#14 2021-08-19 06:11:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

i dont think my laptop is even usb 2.1

Your laptop disagrees tongue

00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)

https://www.google.com/search?q=%22rts5 … %22sdxc%22 has quite some hits, but https://www.insanelymac.com/forum/topic … for-macos/ suggests that he can write on "a" 128GB card fine (but this is a mac driver - we're talking about HW limitations)
https://aur.archlinux.org/packages/rts5139-dkms/ has some module parameters

modinfo rts5139

Disabling "selective suspend" (and other power management stuff) might get you somewhere…
https://wiki.archlinux.org/title/Kernel … le_options

----

which after taxes import fees & retail its around 60$

It's completely off-topic, but there's a massive tech center in Haifa - are you sure your access to casual consumer tech (amazon  imports aside) is this pricy?

Offline

#15 2021-08-19 09:51:12

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

i am having trouble disabling modules it doesnt seem to affect anything in the modinfo text

 sudo modprobe rts5139 selective_suspend=0
[shaked@leno-E31 ~]$ modinfo
modinfo: ERROR: missing module or filename. ;)
[shaked@leno-E31 ~]$ modinfo rts5139
filename:       /lib/modules/5.13.10-arch1-1/kernel/drivers/scsi/rts5139.ko.zst
version:        v1.05
license:        GPL
description:    Realtek RTS5139/29 USB card reader driver
srcversion:     5914880D0B99ABC244EA3E5
alias:          usb:v0BDAp0129d*dc*dsc*dp*ic*isc*ip*in*
alias:          usb:v0BDAp0139d*dc*dsc*dp*ic*isc*ip*in*
depends:        
retpoline:      Y
name:           rts5139
vermagic:       5.13.10-arch1-1 SMP preempt mod_unload 
parm:           auto_delink_en:enable auto delink (int)
------> parm:           ss_en:enable selective suspend (int)
parm:           ss_delay:seconds to delay before entering selective suspend (int)
parm:           needs_remote_wakeup:ss state needs remote wakeup supported (int)
[shaked@leno-E31 ~]$

Last edited by shaked (2021-08-19 09:56:16)

Offline

#16 2021-08-19 11:57:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

modinfo prints the module poperties and available parameters, to see what's actually used (it the module exposes that) check

systool -vm rts5139

In order to make "modprobe rts5139 selective_suspend=0" do anything, you'll first have to unload the module (modprobe -r)

Offline

#17 2021-08-19 12:44:29

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

it doesnt seem the parameters are enabled

systool -vm rts5139
Module = "rts5139"

  Attributes:
    coresize            = "323584"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "1"
    srcversion          = "5914880D0B99ABC244EA3E5"
    taint               = "OE"
    uevent              = <store method only>
    version             = "v1.05"

  Parameters:
    auto_delink_en      = "0"
    needs_remote_wakeup = "0"
    ss_delay            = "50"
    ss_en               = "0"

  Sections:

Offline

#18 2021-08-19 13:18:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

https://wiki.archlinux.org/title/Kernel_parameters

rts5139.ss_en=0

But it /is/ disabled ("0") and I have little hope that enabling would improve anything here sad

Offline

#19 2021-08-19 15:35:08

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

ok thank you very much for helping me with the issue/s i learned to use the forum effectively and some new commands smile coming from linux mint so it is a big deal

Offline

#20 2025-01-06 01:28:25

James_Bourbon
Member
Registered: 2025-01-06
Posts: 1

Re: SD card mounted as read only issue (solved)

I too have the same issue.  This is when using a MicroSDXC card directly into the side of a Dell laptop, which is regardless of the file format.  Yes, I have tried each format one after another for testing.  No, this card is not in the standard MicroSD card holder with the locking slider switch.  Ironically, this MicroSDXC card is easily read by Mint and allows Read/Write access.

In Arch, it will assign root as the owner and not allow any users write access.  You also cannot change the access.  Strange, I know...  However, I have found a workaround!  Using the MicroSDXC card in an "unlocked" MicroSD adapter while in a USB-to-MicroSD card reader WILL allow the device to mount into Arch with user permissions!  For some reason, Arch does not automatically mount MicroSDXC cards with user permissions for laptops that have those slots.  It treats it as if the card is locked.  Using the USB adapter will allow the card to be mounted and written to without any issues.

Offline

#21 2025-01-06 01:47:56

shaked
Member
Registered: 2021-08-09
Posts: 70
Website

Re: SD card mounted as read only issue (solved)

James_Bourbon wrote:

I too have the same issue.  This is when using a MicroSDXC card directly into the side of a Dell laptop, which is regardless of the file format.  Yes, I have tried each format one after another for testing.  No, this card is not in the standard MicroSD card holder with the locking slider switch.  Ironically, this MicroSDXC card is easily read by Mint and allows Read/Write access.

In Arch, it will assign root as the owner and not allow any users write access.  You also cannot change the access.  Strange, I know...  However, I have found a workaround!  Using the MicroSDXC card in an "unlocked" MicroSD adapter while in a USB-to-MicroSD card reader WILL allow the device to mount into Arch with user permissions!  For some reason, Arch does not automatically mount MicroSDXC cards with user permissions for laptops that have those slots.  It treats it as if the card is locked.  Using the USB adapter will allow the card to be mounted and written to without any issues.

what a call from the past thanks for sharing your fix. smile

Offline

#22 2025-01-06 11:33:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

The fix sidesteps the problem by not using the problematic adapter.
@James_Bourbon, you're also using rts5139 w/ the same output as in #17? Or "just" the rtsx modules?
If you still have access to the mint system, does it use the same kernel module and what do the parameters look like there?

Offline

#23 2025-11-20 20:26:46

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,086

Re: SD card mounted as read only issue (solved)

https://bbs.archlinux.org/viewtopic.php … 1#p2273631
"sdhci.debug_quirks=0x10000" inverts the read-only logic

Offline

Board footer

Powered by FluxBB