LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 09-02-2018, 11:21 AM   #1
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Rep: Reputation: Disabled
KDE Device notifier does not respond to sd card.


Dear people,
The device notifier of the KDE desktop finds al devices that i have used (cd, dvd, usb disk)
except the sd card.
The `fdisk -l` command does see the card and it is also no problem to mount it manually.

`sudo mount -t vfat /dev/mmcblk0p1 /home/neljor/Pictures`

Would like to see it appear automatically in the device notifier with a pop-up as the other devices do.

Any ideas?

OS Release: openSUSE Leap 15.0

Thanks in advantage!

Peter
 
Old 09-02-2018, 11:05 PM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
For udev/desktop "automatic" mounting to work, the device in question needs to be seen as removable.

Monitor the kernel and udev output when you first plug in the SD Card...
Code:
dmesg -w
Code:
udevadm monitor
Use the 'udevadm info' command to obtain the device attributes. For example (/dev/sdd)...
Code:
udevadm info -a -p /sys/block/sdd

Last edited by ferrari; 09-02-2018 at 11:22 PM.
 
Old 09-03-2018, 03:22 PM   #3
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
For udev/desktop "automatic" mounting to work, the device in question needs to be seen as removable.
Monitor the kernel and udev output when you first plug in the SD Card...

Code:
dmesg -w
Code:
udevadm monitor
Use the 'udevadm info' command to obtain the device attributes. For example (/dev/sdd)...
Code:
udevadm info -a -p /sys/block/sdd

Thank you Ferrari!

Output `dmesg -w`:
[16817.205922] mmc0: new high speed SDHC card at address 1234
[16817.206767] mmcblk0: mmc0:1234 SA16G 14.5 GiB
[16817.209601] mmcblk0: p1



Output `udevadm monitor`:
KERNEL[16817.086388] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234 (mmc)
KERNEL[16817.087033] add /devices/virtual/bdi/179:0 (bdi)
KERNEL[16817.090137] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234/block/mmcblk0 (block)
KERNEL[16817.090890] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p1 (block)
UDEV [16817.091412] add /devices/virtual/bdi/179:0 (bdi)
UDEV [16817.092950] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234 (mmc)
UDEV [16817.184533] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234/block/mmcblk0 (block)
UDEV [16817.279076] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p1 (block)


`udevadm info -a -p /sys/block/mmcblk0/` command gives long output of 172 lines, what are we looking for?
 
Old 09-03-2018, 03:45 PM   #4
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
Looking for the device attributes, is it classed as a removable device etc. Upload the complete output to https://pastebin.com/ and post the link to it here. Perhaps a custom udev rule is needed to get it handled appropriately.
 
Old 09-03-2018, 04:31 PM   #5
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Looking for the device attributes, is it classed as a removable device etc. Upload the complete output to https://pastebin.com/ and post the link to it here. Perhaps a custom udev rule is needed to get it handled appropriately.
https://pastebin.com/3YuULhZE
 
Old 09-03-2018, 06:19 PM   #6
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
Returning to your opening post...
Quote:
The device notifier of the KDE desktop finds al devices that i have used (cd, dvd, usb disk)
except the sd card.
Just a thought - did you check the device notifier settings to make sure that new devices can be automatically mounted?

Assuming that's not the issue here, then read on...

There are rules in /usr/lib/udev/rules.d/80-udisks2.rules that are supposed to help identify such SD card devices (amongst others), and in particular I would have thought this rule would match against your particular device...

Code:
# TODO: figure out if the drive supports SD and SDHC and what the current
# kind of media is - right now we just assume SD
KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1"
In any case, the device attribute output you shared means that other suitable custom rule matching is possible. For example...
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda",  ATTRS{idProduct}=="0129", ENV{ID_DRIVE_FLASH_SD}="1"
You could try creating a custom rule with the above rule eg /etc/udev/rules.d/40-SD_reader.rules. It should take effect following a reboot.

See how that goes.
 
Old 09-04-2018, 01:13 PM   #7
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Returning to your opening post...

Just a thought - did you check the device notifier settings to make sure that new devices can be automatically mounted?

Assuming that's not the issue here, then read on...

There are rules in /usr/lib/udev/rules.d/80-udisks2.rules that are supposed to help identify such SD card devices (amongst others), and in particular I would have thought this rule would match against your particular device...

Code:
# TODO: figure out if the drive supports SD and SDHC and what the current
# kind of media is - right now we just assume SD
KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1"
In any case, the device attribute output you shared means that other suitable custom rule matching is possible. For example...
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda",  ATTRS{idProduct}=="0129", ENV{ID_DRIVE_FLASH_SD}="1"
You could try creating a custom rule with the above rule eg /etc/udev/rules.d/40-SD_reader.rules. It should take effect following a reboot.

See how that goes.

Yes, devices can be automatically mounted in the device notifier.
It reads SDHC also dmesg says so, have no other information.

`hwinfo --mmc`
23: MMC 00.0: 11700 MMC Controller
[Created at pci.1828]
Unique ID: 4KNU._NN+DZ1HDn4
SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/rtsx_usb_sdmmc.0.auto/mmc_host/mmc0/mmc0:1234
SysFS BusID: mmc0:1234
Model: "SD Controller 0"
Vendor: int 0x6015
Device: int 0x0001 "SD Controller 0"
Driver: "mmcblk"
Config Status: cfg=new, avail=yes, need=no, active=unknow


Machine is rebooted with
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda",  ATTRS{idProduct}=="0129", ENV{ID_DRIVE_FLASH_SD}="1"
in
/etc/udev/rules.d/40-SD_reader.rules

Result: has no effect on device notifier when sd card is inserted.
 
Old 09-04-2018, 02:12 PM   #8
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
One question - did you remove (or at least comment out) the fstab entry for this device before testing with the notifier? Udisks2 will ignore the device in question if the entry exists. Please disregard if you have no such entry added.

Last edited by ferrari; 09-04-2018 at 02:18 PM.
 
Old 09-04-2018, 02:19 PM   #9
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
I'd also be interested in seeing what udisksctl makes of it....
Code:
udisksctl monitor
 
Old 09-04-2018, 02:27 PM   #10
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
I'd also be interested in seeing what udisksctl makes of it....
Code:
udisksctl monitor
% udisksctl monitor
Monitoring the udisks daemon. Press Ctrl+C to exit.
12:25:14.753: The udisks-daemon is running (name-owner :1.25).
12:25:24.619: Added /org/freedesktop/UDisks2/drives/SA16G_0x424a54e6
org.freedesktop.UDisks2.Drive:
CanPowerOff: true
Configuration: {}
ConnectionBus: usb
Ejectable: false
Id: SA16G-0x424a54e6
Media: flash_sd
MediaAvailable: true
MediaChangeDetected: true
MediaCompatibility: flash_sd
MediaRemovable: true
Model: SA16G
Optical: false
OpticalBlank: false
OpticalNumAudioTracks: 0
OpticalNumDataTracks: 0
OpticalNumSessions: 0
OpticalNumTracks: 0
Removable: true
Revision:
RotationRate: 0
Seat: seat0
Serial: 0x424a54e6
SiblingId: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0
Size: 15548284928
SortKey: 01hotplug/1536089124612875
TimeDetected: 1536089124612875
TimeMediaDetected: 1536089124612875
Vendor:
WWN:
12:25:24.622: Added /org/freedesktop/UDisks2/block_devices/mmcblk0
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: '/'
Device: /dev/mmcblk0
DeviceNumber: 45824
Drive: '/org/freedesktop/UDisks2/drives/SA16G_0x424a54e6'
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id:
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: '/'
MDRaidMember: '/'
PreferredDevice: /dev/mmcblk0
ReadOnly: false
Size: 15548284928
Symlinks: /dev/disk/by-id/mmc-SA16G_0x424a54e6
/dev/disk/by-path/pci-0000:00:14.0-usb-0:6:1.0-platform-rtsx_usb_sdmmc.0.auto
org.freedesktop.UDisks2.PartitionTable:
Type: dos
12:25:24.703: Added /org/freedesktop/UDisks2/block_devices/mmcblk0p1
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: '/'
Device: /dev/mmcblk0p1
DeviceNumber: 45825
Drive: '/org/freedesktop/UDisks2/drives/SA16G_0x424a54e6'
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id:
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: '/'
MDRaidMember: '/'
PreferredDevice: /dev/mmcblk0p1
ReadOnly: false
Size: 15544090624
Symlinks: /dev/disk/by-id/mmc-SA16G_0x424a54e6-part1
/dev/disk/by-path/pci-0000:00:14.0-usb-0:6:1.0-platform-rtsx_usb_sdmmc.0.auto-part1
org.freedesktop.UDisks2.Partition:
Flags: 0
IsContained: false
IsContainer: false
Name:
Number: 1
Offset: 4194304
Size: 15544090624
Table: '/org/freedesktop/UDisks2/block_devices/mmcblk0'
Type: 0x0c
UUID:
 
Old 09-04-2018, 03:08 PM   #11
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,541

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
Okay, that looks as expected for a removable device. Time to submit a bug report I think....

https://en.opensuse.org/openSUSE:Submitting_bug_reports
 
Old 09-04-2018, 04:14 PM   #12
Brother77
LQ Newbie
 
Registered: Jul 2018
Location: Trumpistan :)
Distribution: openSUSE leap 15.0
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Okay, that looks as expected for a removable device. Time to submit a bug report I think....

https://en.opensuse.org/openSUSE:Submitting_bug_reports
Okay, thanks for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] KDE Device Notifier not working with udisks(1) ordealbyfire83 Linux From Scratch 1 02-01-2015 09:45 AM
[SOLVED] udisks/KDE device notifier not working with custom kernel lems Slackware 2 01-07-2014 09:49 AM
Mount options for KDE device notifier lpwevers Linux - Desktop 2 02-07-2013 04:29 PM
[SOLVED] KDE 4.5.5 Device Notifier removable drive mounting error Geremia Linux - Newbie 3 11-27-2011 06:02 PM
Device Notifier Problems with KDE 4.xxx nickt1862 Linux - General 0 08-18-2009 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration