Announcement

Collapse
No announcement yet.

Device Notifier - does not pop up when a Thumb Drive is inserted into a USB slot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Device Notifier - does not pop up when a Thumb Drive is inserted into a USB slot

    A few days ago I purchased two 8gb thumb drives, they are unused, straight out of the packet and have had no files put on them or any formatting applied to them by me. I have no reason to think they might be faulty.
    I have an identical thumb drive, purchased at an earlier date, which has been used, reformatted a number of times and at the moment has files upon it. It is working okay, as are the other thumb drives I possess.
    I am running a standard 64bit Kubuntu 14.04 installation on a home built desktop PC, no Windoze on this machine.
    I have performed internet searches to attempt to address my problem, but so far have had no meanungful success.
    I have used Kubuntu for many years now - but am in no way an 'under the hood' expert.


    PROBLEM:
    Device Notifier does not pop up when either of the new thumb drives is inserted into a USB slot,
    also the devices (thumb drives) do not appear in Dolphin or Startup Disk Creator,
    but,
    they do appear in Gparted and KDE Partition Manager,
    they are not visible to 'sudo blkid' but do appear to 'sudo fdisk -l'


    Is there some way to get my system to 'recognise' my devices properly so that their behaviour becomes 'normal'. (i.e. so that device notifier pops up when they are inserted, so that they appear automatically to blkid, in Dolphin and also in Startup Disk Creator?

    Is this Forum the right place to be asking questions like this?

    #2
    To get more information...

    An example: http://askubuntu.com/questions/48497...d-ubuntu-14-04


    What are the commands

    - dmesg
    - lsusb
    - fdisk

    telling ?

    Can you manually mount it ? Or do you get an error message ?

    Comment


      #3
      from Wheel Inventor:
      What are the commands
      - dmesg
      - lsusb
      - fdisk
      telling ?
      Can you manually mount it ? Or do you get an error message ?

      dmesg
      Code:
      [  323.687705] usb 2-5: new high-speed USB device number 3 using ehci-pci
      [  323.826884] usb 2-5: New USB device found, idVendor=058f, idProduct=6387
      [  323.826892] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
      [  323.826897] usb 2-5: Product: Mass Storage
      [  323.826901] usb 2-5: Manufacturer: Generic
      [  323.826904] usb 2-5: SerialNumber: 5DA55FEB
      [  323.844844] usb-storage 2-5:1.0: USB Mass Storage device detected
      [  323.845005] scsi7 : usb-storage 2-5:1.0
      [  323.845106] usbcore: registered new interface driver usb-storage
      [  324.844723] scsi 7:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
      [  324.845255] sd 7:0:0:0: Attached scsi generic sg5 type 0
      [  324.847284] sd 7:0:0:0: [sde] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
      [  324.848407] sd 7:0:0:0: [sde] Write Protect is off
      [  324.848415] sd 7:0:0:0: [sde] Mode Sense: 23 00 00 00
      [  324.849710] sd 7:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
      [  324.857722]  sde: sde1
      [  324.862179] sd 7:0:0:0: [sde] Attached SCSI removable disk
      lsusb
      Code:
      Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 002 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
      Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 005 Device 002: ID 04d9:1702 Holtek Semiconductor, Inc. 
      Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 004 Device 002: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
      Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
      sudo fdisk -l
      Code:
      Disk /dev/sde: 8019 MB, 8019509248 bytes
      204 heads, 63 sectors/track, 1218 cylinders, total 15663104 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x00000000
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sde1              32    15663103     7831536    c  W95 FAT32 (LBA)
      ---------------------------------------------------------------------------------------------------------
      sudo mount /dev/sde1 /mnt
      ---------------------------------------------------------------------------------------------------------
      at this command the Device Notifier popped up with its usual options and with a button to 'safely remove'
      On pressing this button a pop up window appeared requiring authentication:

      "Authentication is required to unmount Generic Flash Drive (/dev/sde1) mounted by another user
      An application is attempting to perform an action that requires privileges.Authentication is required to perform this action."

      On authentication the device disconnected successfully.

      ---------------------------------------------------------------------------------------------------------

      It would appear that the Flash drive will only mount, using the sudo mount command and as a result is subject to root.
      Last edited by bobbicat; Apr 18, 2015, 07:33 AM. Reason: suggestions from SecretCode (see below)

      Comment


        #4
        Do other USB memory devices still work fine?

        When you manually mount this one, what does sudo fdisk -l say?

        It could be useful to see the output of udiskctl monitor when you plug in the device.




        Originally posted by bobbicat View Post
        Is this Forum the right place to be asking questions like this?
        Yes! But it is easier to view posts if you put command output into [ code ] tags, e.g. using the # button you can see above the reply box.

        Your post would then look like this:

        dmesg:
        Code:
        [  323.687705] usb 2-5: new high-speed USB device number 3 using ehci-pci
        [  323.826884] usb 2-5: New USB device found, idVendor=058f, idProduct=6387
        [  323.826892] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
        [  323.826897] usb 2-5: Product: Mass Storage
        [  323.826901] usb 2-5: Manufacturer: Generic
        [  323.826904] usb 2-5: SerialNumber: 5DA55FEB
        [  323.844844] usb-storage 2-5:1.0: USB Mass Storage device detected
        [  323.845005] scsi7 : usb-storage 2-5:1.0
        [  323.845106] usbcore: registered new interface driver usb-storage
        [  324.844723] scsi 7:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
        [  324.845255] sd 7:0:0:0: Attached scsi generic sg5 type 0
        [  324.847284] sd 7:0:0:0: [sde] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
        [  324.848407] sd 7:0:0:0: [sde] Write Protect is off
        [  324.848415] sd 7:0:0:0: [sde] Mode Sense: 23 00 00 00
        [  324.849710] sd 7:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
        [  324.857722]  sde: sde1
        [  324.862179] sd 7:0:0:0: [sde] Attached SCSI removable disk
        lsusb
        Code:
        Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 011 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 010 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 002 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
        Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 005 Device 002: ID 04d9:1702 Holtek Semiconductor, Inc. 
        Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 004 Device 002: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
        Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        sudo fdisk -l
        Code:
        Disk /dev/sde: 8019 MB, 8019509248 bytes
        204 heads, 63 sectors/track, 1218 cylinders, total 15663104 sectors
        Units = sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disk identifier: 0x00000000
        
           Device Boot      Start         End      Blocks   Id  System
        /dev/sde1              32    15663103     7831536    c  W95 FAT32 (LBA)
        etc
        Last edited by SecretCode; Apr 18, 2015, 05:19 AM.
        I'd rather be locked out than locked in.

        Comment


          #5
          Do other USB memory devices still work fine?
          Yes they do, but they have had modifications such as formatting, zero writing and so on performed on them at various times.
          The problem memory devices in question are straight out of the packet, have never been written to and have only ever been read from.
          I suspect that formatting them might be an answer, but ideally I would like them to work as is, straight off the shelf. I don't think this is unreasonable.
          It is a side issue - but I have read that formatting thumb drives and sdram in Linux can create its own problems. I don't want to deal with that right now but might raise the question in another thread.

          When you manually mount this one, what does sudo fdisk -l say?
          sudo mount /dev/sde1 /mnt
          sudo fdisk -l
          Code:
          Disk /dev/sde: 8019 MB, 8019509248 bytes
          204 heads, 63 sectors/track, 1218 cylinders, total 15663104 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x00000000
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sde1              32    15663103     7831536    c  W95 FAT32 (LBA)

          It could be useful to see the output of udiskctl monitor when you plug in the device. (note: the correct syntax is udisksctl not udiskctl)
          udisksctl monitor
          Code:
          Monitoring the udisks daemon. Press Ctrl+C to exit.
          13:28:00.020: The udisks-daemon is running (name-owner :1.31).
          13:28:18.141: Added /org/freedesktop/UDisks2/drives/Generic_Flash_Disk_5DA55FEB
            org.freedesktop.UDisks2.Drive:
              CanPowerOff:                true
              Configuration:              {}
              ConnectionBus:              usb
              Ejectable:                  true
              Id:                         Generic-Flash-Disk-5DA55FEB
              Media:                      
              MediaAvailable:             true
              MediaChangeDetected:        true
              MediaCompatibility:         
              MediaRemovable:             true
              Model:                      Flash Disk
              Optical:                    false
              OpticalBlank:               false
              OpticalNumAudioTracks:      0
              OpticalNumDataTracks:       0
              OpticalNumSessions:         0
              OpticalNumTracks:           0
              Removable:                  true
              Revision:                   8.07
              RotationRate:               -1
              Seat:                       seat0
              Serial:                     5DA55FEB
              SiblingId:                  /sys/devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.0
              Size:                       8019509248
              SortKey:                    01hotplug/1429360098139275
              TimeDetected:               1429360098139275
              TimeMediaDetected:          1429360098139275
              Vendor:                     Generic
              WWN:                        
          13:28:18.146: Added /org/freedesktop/UDisks2/block_devices/sde
            org.freedesktop.UDisks2.Block:                                                                                                                                               
              Configuration:              []                                                                                                                                             
              CryptoBackingDevice:        '/'                                                                                                                                            
              Device:                     /dev/sde                                                                                                                                       
              DeviceNumber:               2112                                                                                                                                           
              Drive:                      '/org/freedesktop/UDisks2/drives/Generic_Flash_Disk_5DA55FEB'                                                                                  
              HintAuto:                   true                                                                                                                                           
              HintIconName:                                                                                                                                                              
              HintIgnore:                 false                                                                                                                                          
              HintName:                                                                                                                                                                  
              HintPartitionable:          true                                                                                                                                           
              HintSymbolicIconName:       
              HintSystem:                 false
              Id:                         
              IdLabel:                    
              IdType:                     
              IdUUID:                     
              IdUsage:                    
              IdVersion:                  
              MDRaid:                     '/'
              MDRaidMember:               '/'
              PreferredDevice:            /dev/sde
              ReadOnly:                   false
              Size:                       8019509248
              Symlinks:                   /dev/disk/by-id/usb-Generic_Flash_Disk_5DA55FEB-0:0
                                          /dev/disk/by-path/pci-0000:00:13.2-usb-0:5:1.0-scsi-0:0:0:0
            org.freedesktop.UDisks2.PartitionTable:
              Type:               dos
          13:28:18.235: Added /org/freedesktop/UDisks2/block_devices/sde1
            org.freedesktop.UDisks2.Block:
              Configuration:              []
              CryptoBackingDevice:        '/'
              Device:                     /dev/sde1
              DeviceNumber:               2113
              Drive:                      '/org/freedesktop/UDisks2/drives/Generic_Flash_Disk_5DA55FEB'
              HintAuto:                   true
              HintIconName:               
              HintIgnore:                 false
              HintName:                   
              HintPartitionable:          true
              HintSymbolicIconName:       
              HintSystem:                 false
              Id:                         
              IdLabel:                    
              IdType:                     
              IdUUID:                     
              IdUsage:                    
              IdVersion:                  
              MDRaid:                     '/'
              MDRaidMember:               '/'
              PreferredDevice:            /dev/sde1
              ReadOnly:                   false
              Size:                       8019492864
              Symlinks:                   /dev/disk/by-id/usb-Generic_Flash_Disk_5DA55FEB-0:0-part1
                                          /dev/disk/by-path/pci-0000:00:13.2-usb-0:5:1.0-scsi-0:0:0:0-part1
            org.freedesktop.UDisks2.Partition:
              Flags:              0
              IsContained:        false
              IsContainer:        false
              Name:               
              Number:             1
              Offset:             16384
              Size:               8019492864
              Table:              '/org/freedesktop/UDisks2/block_devices/sde'
              Type:               0x0c
              UUID:
          Last edited by bobbicat; Apr 18, 2015, 07:42 AM.

          Comment


            #6
            I was wondering if it was a problematic filesystem format like exfat, but it shows up as fat32 which shouldn't be a problem. Can you write to it, when you mount it manually?

            I don't see any errors suggested by the udisksctl output.

            Can you post the contents of this file: ~/.kde/share/config/kded_device_automounterrc
            I'd rather be locked out than locked in.

            Comment


              #7
              I was wondering if it was a problematic filesystem format like exfat, but it shows up as fat32 which shouldn't be a problem. Can you write to it, when you mount it manually?
              The file is mounted by 'sudo mount /dev/sde1' , so is owned by root and could only be written to by root, unless ownership were changed, I suppose.


              I don't see any errors suggested by the udisksctl output.
              Can you post the contents of this file: ~/.kde/share/config/kded_device_automounterrc
              ~/.kde/share/config/kded_device_automounterrc
              Code:
              [Devices][/org/freedesktop/UDisks2/block_devices/loop0]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=Loop Device
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sda1]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=549.0 MiB Hard Drive
              LastSeenMounted=true
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sda3]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=30.3 GiB Hard Drive
              LastSeenMounted=true
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sda4]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=second
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sdb1]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=465.8 GiB Hard Drive
              LastSeenMounted=true
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sdc1]
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=149.0 GiB Hard Drive
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sdd1]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-harddisk
              LastNameSeen=149.0 GiB Hard Drive
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sde]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-removable-media-usb
              LastNameSeen=GParted-live
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sde1]
              EverMounted=true
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-removable-media-usb
              LastNameSeen=7.5 GiB Removable Media
              LastSeenMounted=true
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sde2]
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-removable-media-usb
              LastNameSeen=Kubuntu 15.04 amd64
              LastSeenMounted=false
              
              
              [Devices][/org/freedesktop/UDisks2/block_devices/sdf1]
              ForceAttachAutomount=false
              ForceLoginAutomount=false
              Icon=drive-removable-media-usb
              LastNameSeen=3.7 GiB Removable Media
              LastSeenMounted=false

              Comment


                #8
                You could test writing to it with sudo touch /mnt/testfile

                If the memory stick is working fine I don't know what else to check ...
                I'd rather be locked out than locked in.

                Comment


                  #9
                  You could test writing to it with sudo touch /mnt/testfile
                  If the memory stick is working fine I don't know what else to check ...
                  sudo mount /dev/sde1 /mnt
                  sudo touch /mnt/testfile
                  Code:
                  successfully creates a root file called 'testfile' on /dev/sde1
                  As you suggest - this is puzzling
                  I do appreciate your efforts SecretCode, perhaps this must remain a mystery, for now.
                  Last edited by bobbicat; Apr 18, 2015, 11:41 AM.

                  Comment


                    #10
                    I am going to start looking at the way a newly inserted device is notified to relevant programs, as I believe that this notification is not occurring.
                    I wonder if a configuration file is influencing this process.
                    I'm out of my depth but I'm sure some Internet searches will help me find pointers. If I get any results I will bring them back to these Forums.


                    I will be looking at new device detection, udisks2 support, udev and udev rules, systemd. Though, to be honest, I hardly know what these are. I suspect, from what I have read, that they are relevant.

                    I would report a bug but I'm unsure how to define the possible bug I am experiencing. Perhaps, even, defining the bug would be enough to eradicate it.
                    Last edited by bobbicat; Apr 19, 2015, 02:31 AM.

                    Comment


                      #11
                      I doubt it's a bug. More likely those cheap Chinese Alcor Micro Corp. drives have a poorly done partition table. blkid looks at partitions, not raw devices. Thus, it's not detecting the partition properly and device manager isn't either. This explains why fdisk "sees" it but blkid doesn't.

                      The answer is going to be reformat-and-forget-it, but if you really need to know what's going on, start with the MBRs. Copy the partition table bytes from a work drive and a non-working new one and compare:


                      sudo dd if=/dev/sde of=part1 bs=1 seek=446 count=64
                      sudo dd if=/dev/sde of=part2 bs=1 seek=446 count=64
                      diff <(xxd part1) <(xxd part2)


                      I don't know if you'll be able to decipher anything usable. You could also try running fdisk, verify the partition table, and save it (or re-creating it and saving it).

                      All-in-all; less work to reformat.

                      Of course, I could be totally wrong - just guessing here.


                      SIDEBAR: Another cool little cli tool for listing drives: lsscsi - not installed by default but it's just a sudo apt-get install away
                      Last edited by oshunluvr; Apr 22, 2015, 02:26 PM.

                      Please Read Me

                      Comment

                      Working...
                      X