Device notifier works only once for USB drives

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

Device notifier works only once for USB drives

Postby banjo » Jul 27th, '21, 20:09

Running Cauldron. The Device Notifier pops up only the first time I plug in a USB thumb drive. The first time I do it, everything works normally, and the drive opens. The second and subsequent times I plug in the same drive, or any other drive, the drive light blinks, but the notifier does not pop up to allow me to mount the drive.

Logging out and then logging back in resets the problem, and I get one more access.

The drives are not bad. I can mount them on my other system.

The USB system sees the drives on both the first and subsequent times I plug it in.

Code: Select all
[root@BSKMageia ~]# lsusb
Bus 001 Device 014: ID 13fe:4300 Kingston Technology Company Inc. USB DISK 2.0
Bus 001 Device 002: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 25a7:fa61 Areson Technology Corp Elecom Co., Ltd MR-K013 Multicard Reader
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 04d9:1702 Holtek Semiconductor, Inc. Keyboard LKS02
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


Inxi info:

Code: Select all
[brian@BSKMageia ~]$ inxi -b
System:    Host: BSKMageia Kernel: 5.13.4-desktop-1.mga9 x86_64 bits: 64 Desktop: KDE Plasma 5.21.5 Distro: Mageia 9 mga9
Machine:   Type: Desktop Mobo: ASUSTeK model: P5G41T-M LX PLUS v: Rev X.0x serial: <superuser required>
           BIOS: American Megatrends v: 0502 date: 10/21/2011
CPU:       Info: Dual Core Intel Core2 Duo E7300 [MCP] speed: 2668 MHz
Graphics:  Device-1: NVIDIA G94 [GeForce 9600 GT] driver: nouveau v: kernel
           Display: x11 server: Mageia X.org 1.20.12 driver: loaded: nouveau,v4l resolution: 1920x1080~60Hz
           OpenGL: renderer: NV94 v: 3.3 Mesa 21.1.5
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
           Device-2: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter driver: 8139too
           Device-3: Qualcomm Atheros AR9271 802.11n type: USB driver: ath9k_htc
Drives:    Local Storage: total: 465.76 GiB used: 39.83 GiB (8.6%)
Info:      Processes: 194 Uptime: 2h 41m Memory: 3.84 GiB used: 1.54 GiB (40.0%) Shell: Bash inxi: 3.3.04


Thanks
Banjo
(_)=='~
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Device notifier works only once for USB drives

Postby banjo » Jul 28th, '21, 00:50

Update: I can mount the USB drive from the console.

Code: Select all
[root@BSKMageia ~]# lsblk --fs
NAME   FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                             
├─sda1 ext4   1.0            3ba2d749-78cf-4af1-9cc5-bfeb796c93f6     14G    66% /
├─sda2                                                                           
├─sda5 swap   1              b7073cd9-5849-4807-80e5-60cbcc78b2d0                [SWAP]
└─sda6 ext4   1.0            e887e869-8a4a-4200-9733-6beeb2de9195  396.9G     2% /home
sdb                                                                             
└─sdb1 vfat   FAT32 USB DISK 8C5A-AFA1                                           

[root@BSKMageia ~]# mkdir /media/usb-drive

[root@BSKMageia ~]# mount /dev/sdb1 /media/usb-drive

[root@BSKMageia media]# df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G  1.1M  2.0G   1% /run
/dev/sda1        50G   33G   14G  71% /
tmpfs           2.0G  140K  2.0G   1% /tmp
/dev/sda6       405G  7.2G  397G   2% /home
tmpfs           394M  120K  394M   1% /run/user/1001
/dev/sdb1        15G  1.7G   13G  12% /media/usb-drive

[root@BSKMageia media]# tree /media/usb-drive/home -L 2
/media/usb-drive/home
├── brian
│   ├── backgrounds
│   ├── bin
│   └── Mageia9
└── poobah
    ├── backgrounds
    ├── bin
    ├── Desktop
    ├── SysInfo
    └── vim

10 directories, 0 files

[root@BSKMageia media]# umount /media/usb-drive

If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Device notifier works only once for USB drives

Postby doktor5000 » Jul 28th, '21, 17:24

What happens if you run as root
Code: Select all
journalctl -af

and leave that running and plugin the USB drive, are there any errors after the device is recognised?

Or what about running udevadm monitor -p and checking the same ?
And can you mount the drive via udisksctl mount ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16793
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Device notifier works only once for USB drives

Postby banjo » Jul 28th, '21, 22:05

Yes, I can mount the drive using "udisksctl mount".

Code: Select all
[root@BSKMageia ~]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0  50.3G  0 part /
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0     4G  0 part [SWAP]
└─sda6   8:6    0 411.5G  0 part /home
sdb      8:16   1  14.4G  0 disk
└─sdb1   8:17   1  14.4G  0 part
[root@BSKMageia ~]# udisksctl mount -b /dev/sdb1
Mounted /dev/sdb1 at /run/media/root/USB DISK
[root@BSKMageia ~]# tree -L 3 /run/media/root
/run/media/root
└── USB\ DISK
    └── home
        ├── brian
        └── poobah

4 directories, 0 files
[root@BSKMageia ~]# df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G  1.1M  2.0G   1% /run
/dev/sda1        50G   33G   15G  70% /
tmpfs           2.0G   80K  2.0G   1% /tmp
/dev/sda6       405G  7.2G  397G   2% /home
tmpfs           394M  124K  394M   1% /run/user/1001
/dev/sdb1        15G  1.7G   13G  12% /run/media/root/USB DISK
[root@BSKMageia ~]# udisksctl unmount -b /dev/sdb1
Unmounted /dev/sdb1.
[root@BSKMageia ~]# df
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        2.0G     0  2.0G   0% /dev
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           2.0G  1.1M  2.0G   1% /run
/dev/sda1        50G   33G   15G  70% /
tmpfs           2.0G   84K  2.0G   1% /tmp
/dev/sda6       405G  7.2G  397G   2% /home
tmpfs           394M  124K  394M   1% /run/user/1001
[root@BSKMageia ~]# tree -L 3 /run/media/root
/run/media/root

0 directories, 0 files


I ran "journalctl -af" while I performed the following sequence after a clean login.

    inserted the drive - the device notifier popped up.
    Mounted the drive and accessed it
    Unmounted the drive
    Inserted the drive again - the device notifier did not pup up
    Mounted the drive using udisksctl
    Accessed the drive
    Unmounted the drive using udisksctl

There are, indeed errors in the log at the point where I unmounted the drive using the Device Notifier. That is around line 52 of the log.

Here is the log.

Code: Select all
[brian@BSKMageia ~]$ !su
su --login
Password:
[root@BSKMageia ~]# journalctl -af
-- Journal begins at Mon 2021-01-18 10:04:59 EST. --
Jul 28 15:46:09 BSKMageia dbus-daemon[794]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 28 15:46:09 BSKMageia systemd[1]: Started Hostname Service.
Jul 28 15:46:38 BSKMageia systemd[38011]: Started Konsole - Terminal.
Jul 28 15:46:39 BSKMageia systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Jul 28 15:46:54 BSKMageia su[39732]: (to root) brian on pts/1
Jul 28 15:46:54 BSKMageia su[39732]: pam_unix(su-l:session): session opened for user root by brian(uid=1001)
Jul 28 15:46:54 BSKMageia dbus-daemon[794]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.323' (uid=0 pid=39982 comm="/usr/bin/hostnamectl --transient")
Jul 28 15:46:54 BSKMageia systemd[1]: Starting Hostname Service...
Jul 28 15:46:54 BSKMageia dbus-daemon[794]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 28 15:46:54 BSKMageia systemd[1]: Started Hostname Service.
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: new high-speed USB device number 12 using ehci-pci
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: New USB device found, idVendor=13fe, idProduct=4300, bcdDevice= 1.00
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: Product: USB DISK 2.0
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: Manufacturer:         
Jul 28 15:47:10 BSKMageia kernel: usb 1-7: SerialNumber: 070A813463E2FB69
Jul 28 15:47:10 BSKMageia kernel: usb-storage 1-7:1.0: USB Mass Storage device detected
Jul 28 15:47:10 BSKMageia kernel: scsi host4: usb-storage 1-7:1.0
Jul 28 15:47:10 BSKMageia mtp-probe[40055]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7"
Jul 28 15:47:10 BSKMageia mtp-probe[40055]: bus: 1, device: 12 was not an MTP device
Jul 28 15:47:10 BSKMageia mtp-probe[40062]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7"
Jul 28 15:47:10 BSKMageia mtp-probe[40062]: bus: 1, device: 12 was not an MTP device
Jul 28 15:47:10 BSKMageia colord-sane[40057]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jul 28 15:47:11 BSKMageia kernel: scsi 4:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 6
Jul 28 15:47:11 BSKMageia colord-sane[40066]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] 30285824 512-byte logical blocks: (15.5 GB/14.4 GiB)
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] Write Protect is off
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] No Caching mode page found
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
Jul 28 15:47:14 BSKMageia kernel:  sdb: sdb1
Jul 28 15:47:14 BSKMageia kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
Jul 28 15:47:14 BSKMageia dbus-daemon[794]: [system] Activating service name='org.kde.kded.smart' requested by ':1.282' (uid=1001 pid=38131 comm="/usr/bin/kded5") (using servicehelper)
Jul 28 15:47:14 BSKMageia dbus-daemon[794]: [system] Successfully activated service 'org.kde.kded.smart'
Jul 28 15:47:22 BSKMageia plasmashell[38164]: trying to show an empty dialog
Jul 28 15:47:24 BSKMageia kernel: FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Jul 28 15:47:24 BSKMageia udisksd[843]: Mounted /dev/sdb1 at /run/media/brian/USB DISK on behalf of uid 1001
Jul 28 15:47:24 BSKMageia systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Jul 28 15:47:24 BSKMageia systemd[38011]: Started kde-open5.
Jul 28 15:47:24 BSKMageia systemd[38011]: Started Dolphin - File Manager.
Jul 28 15:47:26 BSKMageia kdeinit5[40372]: Qt: Session management error: networkIdsList argument is NULL
Jul 28 15:47:46 BSKMageia systemd[38011]: app-org.kde.dolphin-5af3903adfd242c8a163d8771e0c1a67.scope: Consumed 1.730s CPU time.
Jul 28 15:47:50 BSKMageia systemd[1]: run-media-brian-USB\x20DISK.mount: Deactivated successfully.
Jul 28 15:47:51 BSKMageia udisksd[843]: Cleaning up mount point /run/media/brian/USB DISK (device 8:17 is not mounted)
Jul 28 15:47:51 BSKMageia udisksd[843]: Unmounted /dev/sdb1 on behalf of uid 1001
Jul 28 15:47:51 BSKMageia kernel: sdb: detected capacity change from 30285824 to 0
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/DeviceItem.qml:162:5: Unable to assign [undefined] to QString
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/DeviceItem.qml:197: TypeError: Value is undefined and could not be converted to an object
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/DeviceItem.qml:204: TypeError: Value is undefined and could not be converted to an object
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.devicenotifier/contents/ui/DeviceItem.qml:257: TypeError: Value is undefined and could not be converted to an object
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/CurrentItemHighLight.qml:31: TypeError: Cannot read property 'width' of null
Jul 28 15:47:51 BSKMageia plasmashell[38164]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/CurrentItemHighLight.qml:32: TypeError: Cannot read property 'height' of null
Jul 28 15:48:03 BSKMageia kernel: usb 1-7: USB disconnect, device number 12
Jul 28 15:48:04 BSKMageia colord-sane[40933]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: new high-speed USB device number 13 using ehci-pci
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: New USB device found, idVendor=13fe, idProduct=4300, bcdDevice= 1.00
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: Product: USB DISK 2.0
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: Manufacturer:         
Jul 28 15:48:09 BSKMageia kernel: usb 1-7: SerialNumber: 070A813463E2FB69
Jul 28 15:48:09 BSKMageia kernel: usb-storage 1-7:1.0: USB Mass Storage device detected
Jul 28 15:48:09 BSKMageia kernel: scsi host4: usb-storage 1-7:1.0
Jul 28 15:48:09 BSKMageia mtp-probe[40956]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7"
Jul 28 15:48:09 BSKMageia mtp-probe[40956]: bus: 1, device: 13 was not an MTP device
Jul 28 15:48:09 BSKMageia mtp-probe[40963]: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-7"
Jul 28 15:48:09 BSKMageia mtp-probe[40963]: bus: 1, device: 13 was not an MTP device
Jul 28 15:48:09 BSKMageia colord-sane[40957]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jul 28 15:48:10 BSKMageia kernel: scsi 4:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 6
Jul 28 15:48:10 BSKMageia colord-sane[40968]: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] 30285824 512-byte logical blocks: (15.5 GB/14.4 GiB)
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] Write Protect is off
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] No Caching mode page found
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
Jul 28 15:48:13 BSKMageia kernel:  sdb: sdb1
Jul 28 15:48:13 BSKMageia kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
Jul 28 15:48:13 BSKMageia dbus-daemon[794]: [system] Activating service name='org.kde.kded.smart' requested by ':1.282' (uid=1001 pid=38131 comm="/usr/bin/kded5") (using servicehelper)
Jul 28 15:48:13 BSKMageia dbus-daemon[794]: [system] Successfully activated service 'org.kde.kded.smart'
Jul 28 15:48:43 BSKMageia kernel: FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Jul 28 15:48:43 BSKMageia udisksd[843]: Mounted /dev/sdb1 at /run/media/root/USB DISK on behalf of uid 0
Jul 28 15:49:31 BSKMageia systemd[1]: Started Update a database for mlocate.
Jul 28 15:49:31 BSKMageia systemd[1]: run-media-root-USB\x20DISK.mount: Deactivated successfully.
Jul 28 15:49:31 BSKMageia udisksd[843]: Cleaning up mount point /run/media/root/USB DISK (device 8:17 is not mounted)
Jul 28 15:49:31 BSKMageia udisksd[843]: Unmounted /dev/sdb1 on behalf of uid 0
^C
[root@BSKMageia ~]#
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Device notifier works only once for USB drives

Postby banjo » Jul 28th, '21, 22:19

I logged out and back in and ran "udevadm monitor -p" and then performed the same sequence of mounts that I did before.

I have attached the output.
Attachments
UdevadmOutput-20210728.txt
Output from udevadm monitor -p
(57.06 KiB) Downloaded 9 times
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Device notifier works only once for USB drives

Postby doktor5000 » Jul 28th, '21, 23:15

Well, for one, I'd not use FAT filesystem on an USB drive. And you should run an fsck to fix the unclean filesystem warning.

Apart from that, you should probably ask on the dev mailing list, if other cauldron users can reproduce this issue.
This could be fallout from the recent plasma update, which you should be aware about as you choose to use cauldron.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16793
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Device notifier works only once for USB drives

Postby banjo » Jul 29th, '21, 01:43

I found out that this is actually a known Plasama bug that was reported in June.

https://bugs.kde.org/show_bug.cgi?id=438478

I have added my information to the report.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Device notifier works only once for USB drives

Postby banjo » Aug 1st, '21, 14:57

FYI for anyone watching this problem, even if the Device Notifier does not offer to mount the USB drive, you can still mount it using Dolphin. I did not know that, and hence I went to the CLI to mount the drive. I thought maybe others might also not know about using Dolphin so I am posting the information just in case.

Using Dolphin is easier than using the CLI, and it mounts the drive in /run/media/<user> where <user> is your account. If you mount the drive at the CLI, it mounts under /run/media/root.

To mount the drive using Dolphin, just run Dolphin, find the drive in the left panel and click on it..... or right click and choose mount. To unmount, right click the drive in the left panel and select "Safely Remove".

To mount the drive using the CLI, su to root and use udisksctl to mount the drive.

Code: Select all
[brian@BSKMageia ~]$ su --login
Password:
[root@BSKMageia ~]# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0  50.3G  0 part /
├─sda2   8:2    0     1K  0 part
├─sda5   8:5    0     4G  0 part [SWAP]
└─sda6   8:6    0 411.5G  0 part /home
sdb      8:16   1  14.4G  0 disk
└─sdb1   8:17   1  14.4G  0 part
[root@BSKMageia ~]# udisksctl mount -b /dev/sdb1
Mounted /dev/sdb1 at /run/media/root/USB DISK
[root@BSKMageia ~]# tree -L 2 "/run/media/root/USB DISK"
/run/media/root/USB\ DISK
└── home
    ├── brian
    └── poobah

3 directories, 0 files
[root@BSKMageia ~]# udisksctl unmount -b /dev/sdb1
Unmounted /dev/sdb1.

 
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 339
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest