The officially official Devuan Forum!

You are not logged in.

#1 2020-02-08 16:08:47

TWX
Member
Registered: 2017-07-24
Posts: 15  

Plethora of USB media issues

Long story short, having trouble with USB user-accessible media on a Beowulf installation running XFCE4.

First tried using a USB-internally-connected SD reader, had issues with no block device being created, was in a hurry so pulled the micro-SD card out and put it into an external USB reader.  Got a block device on /dev/sdb1 but strangely Thunar did not display the presence of this device as a mountable volume.  Walked away, when I returned some minutes later, the media had been shown in Thunar while I was away.  Couldn't mount in Thunar though, permissions issues.  Found this thread which ultimately led to some other thread and creating a file in /etc/polkit-1/localauthority/50-local.d called 10-removable_storage.pkla with the following contents:

[Allow Automount]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount*
ResultAny=yes
ResultInactive=yes[1429273.027772] usb 8-1: new high-speed USB device number 9 using ehci-pci
[1429273.185740] usb 8-1: New USB device found, idVendor=0bc2, idProduct=ab28, bcdDevice= 1.00
[1429273.185743] usb 8-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[1429273.185745] usb 8-1: Product: BUP BK
[1429273.185746] usb 8-1: Manufacturer: Seagate
[1429273.185748] usb 8-1: SerialNumber: NA9SSJ0A
[1429273.186817] scsi host7: uas
[1429273.189175] scsi 7:0:0:0: Direct-Access     Seagate  BUP BK           0304 PQ: 0 ANSI: 6
[1429273.190821] sd 7:0:0:0: Attached scsi generic sg3 type 0
[1429273.191496] sd 7:0:0:0: [sdc] Spinning up disk...
[1429274.215711] .......ready
[1429280.361126] sd 7:0:0:0: [sdc] 9767541167 512-byte logical blocks: (5.00 TB/4.55 TiB)
[1429280.361129] sd 7:0:0:0: [sdc] 2048-byte physical blocks
[1429280.374922] sd 7:0:0:0: [sdc] Write Protect is off
[1429280.374926] sd 7:0:0:0: [sdc] Mode Sense: 4f 00 00 00
[1429280.375623] sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[1429280.376394] sd 7:0:0:0: [sdc] Optimal transfer size 33553920 bytes not a multiple of physical block size (2048 bytes)
[1429280.463194]  sdc: sdc1
[1429280.466753] sd 7:0:0:0: [sdc] Attached SCSI disk

ResultActive=yes

[Allow Eject]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.eject-media*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Allow Mounting of fstab]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-fstab*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Now as a user that's part of the plugdev group I was able to mount the media for what I needed to immediately do.

Trouble is, after unmounting the media in Thunar and then removing the media from the USB socket, it doesn't get removed from Thunar's list of media.  Plugging it back in doesn't let me re-mount it until some as-yet undetermined amount of time has passed even though the block device has been created again.

Now this morning I went to use a different external USB device, a hard disk drive with exfat formatting.  Dmesg shows it's been recognized:

[1429273.027772] usb 8-1: new high-speed USB device number 9 using ehci-pci
[1429273.185740] usb 8-1: New USB device found, idVendor=0bc2, idProduct=ab28, bcdDevice= 1.00
[1429273.185743] usb 8-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[1429273.185745] usb 8-1: Product: BUP BK
[1429273.185746] usb 8-1: Manufacturer: Seagate
[1429273.185748] usb 8-1: SerialNumber: NA9SSJ0A
[1429273.186817] scsi host7: uas
[1429273.189175] scsi 7:0:0:0: Direct-Access     Seagate  BUP BK           0304 PQ: 0 ANSI: 6
[1429273.190821] sd 7:0:0:0: Attached scsi generic sg3 type 0
[1429273.191496] sd 7:0:0:0: [sdc] Spinning up disk...
[1429274.215711] .......ready
[1429280.361126] sd 7:0:0:0: [sdc] 9767541167 512-byte logical blocks: (5.00 TB/4.55 TiB)
[1429280.361129] sd 7:0:0:0: [sdc] 2048-byte physical blocks
[1429280.374922] sd 7:0:0:0: [sdc] Write Protect is off
[1429280.374926] sd 7:0:0:0: [sdc] Mode Sense: 4f 00 00 00
[1429280.375623] sd 7:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[1429280.376394] sd 7:0:0:0: [sdc] Optimal transfer size 33553920 bytes not a multiple of physical block size (2048 bytes)
[1429280.463194]  sdc: sdc1
[1429280.466753] sd 7:0:0:0: [sdc] Attached SCSI disk

and the block devices for sdc and sdc1 exist, but Thunar is still not showing the presence of this device.

I feel like I'm beating my head against a wall, I've installed packages for udisks2 and udiskie and probably a bunch of others, at this point not sure where to do more troubleshooting.  I'm trying to make this process gui-usable and semi-automatic because I won't be the only person using this computer, the goal is for anyone in the household to offload digital camera photos to the network share and to an external USB drive for redundant backup, but since it is a laptop and has to be moved regularly I can't really assume it'll remain a static setup.

Suggestions appreciated for where to turn next.

Offline

#2 2020-02-08 17:22:31

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,402  

Re: Plethora of USB media issues

You should not need to be writing polkit rules for this. I'm using xfce in beowulf, and when I plug in a usb stick, it shows up on the desktop and double-click opens it in thunar.

Make sure you have gvfs, gvfs-backends, thunar-volman, policykit-1-gnome. (Reboot probably needed.)

Offline

#3 2020-02-08 17:38:54

TWX
Member
Registered: 2017-07-24
Posts: 15  

Re: Plethora of USB media issues

Ok.  I'll doublecheck packages installed and reboot after moving the rules file out of the etc directory.

Offline

#4 2020-02-08 17:41:23

TWX
Member
Registered: 2017-07-24
Posts: 15  

Re: Plethora of USB media issues

Package: gvfs-backends
Status: install ok installed

Package: gvfs
Status: install ok installed

Package: policykit-1-gnome
Status: install ok installed

Package: thunar-volman
Status: install ok installed

Interesting, all were present.  Anyhow, rebooting.

Offline

#5 2020-02-08 18:25:42

TWX
Member
Registered: 2017-07-24
Posts: 15  

Re: Plethora of USB media issues

I reboot very seldomly.  I'd forgotten I was getting the following during boot:

INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Starting hot-plug events dispatcher: udevd.
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[    7.724408]udevd[383]: specified group 'kvm' unknown
[   10.884900] kvm: disabled by bios
[   10.921378] kvm: disabled by bios

and it sits there for a fairly considerable amount of time before progressing.

Thinking about the nature of the problem I have to expect this is involved.

And with those packages (forgot to remove the rules file) still no new user-mountable devices in Thunar post-reboot.

Offline

#6 2020-02-08 18:53:57

TWX
Member
Registered: 2017-07-24
Posts: 15  

Re: Plethora of USB media issues

With the boot-time issues and since it'd been awhile since I did any updates, I've done and update/ugprade/dist-ugprade and now the external USB flash reader appears and disappears in Thunar as the device is plugged/unplugged.  The error on kvm is still there at boot but it doesn't hang anymore, didn't have time to take a picture, but I don't think the udev error showed up.

I still need to do some more testing, but it looks less bad than it was.  Not sure what was broken that the updating fixed.

EDIT: The internal USB flash reader now works too, and the external USB hard disk drive works, I can mount and unmount each as a user.

Last edited by TWX (2020-02-08 18:55:56)

Offline

Board footer