USB drive randomly not showing up until reboot
-
@Efriim
Thank you for the detailed info on that. I fully uninstalled the usbrom service this time instead of just disabling it and it seems to be fully stable now. I will keep testing it for a few more days just to double check but I think this may have solved it. -
@ZioDarkmage
you definitely need to remove usbmount service completely, if you use fstab (but tbh i assumed you already did that) or it will mount the folder retropie-mount if it exsits and even if you disable it, it will do the same again, after you update next.
also, mounting with the build in service uses the folder retropie-mount, but when using fstab, it is a lot easier if you move everything out from that folder, or you will need to mount folders in folders.@Efriim said in USB drive randomly not showing up until reboot:
fsck, filesystem check pass order; 0 1 or 2; 0 pass no check, 1 for the root filesystem, 2 for last used for everything else.
the last number is the order it checks the drives, hence if you have multiple drives it will check in numeric order or if same number is used, it will check in the order it is written in fstab
-
Just got home from work, booted up, the theme crashed and required the power to be unplugged, booted it back up and its doing it again. This is the USB I am using : Samsung 256gb USB 3.1 At this point I am really doubting myself on this, as when it occurs, I use the
ls -l /dev/disk/by-uuid
and it is not showing up at all until I do asudo reboot
. I am even resetting the rom permissions in the RetroPie Setup menu and nothing seems to impact it. I know USB 3.1 should be backwards compatible with the USB 2.0 ports and visa versa, I have used a USB 3.0 hdd and had no issue, just on flash drives am I having issues. -
@ZioDarkmage
The theme crashed? What is your vram limit and gpu mem? -
for some reason some usb sticks needs a "hardboot" to wakeup after being in a standby state, but iirc the pi should shut off power to the usb when its powered down.
are you sure its a genuine samsung usb stick?
how much has it been used before?
has it been written to many times or maybe just sitting in the usbport of a computer for a long time maybe?
also, what type of sd card do you use?
and what kind of power supply? -
@Halvhjearne
As far as I can tell its genuine as the seller on Amazon is listed as Samsung. And it matches the other Samsung I picked up at MicroCenter.
The power supply is the Official Raspberry Pi Foundation Power Supply that I got from MicroCenter. As for the micro sd card, I am using a Samsung EVO 32gb class 10. It is the orange one from before the red/green line up of Samsung micro sd's. I have about 5 of them laying around and have tried different ones, I have even tried a SanDisk 32gb. The flash drive is less than a month old, was sealed, works fine popping it into a pc with no issues. Other than transferring the roms to it and playing games on my pi, it hasn't really been used. I did notice that it seems to be consistent with the usb being "cold" (relative speaking, the house stays at about 70°F / 21°C) or after emulationstation stutters upon changing between themes without a restart in between. I do know that I can plug the flash drive into the usb ports on the front of the case and it hasn't happened once with that set up, but I am trying to keep it plugged directly to the board so it can not be removed easily.
And once again thank you for any advice and looking into this thread. -
@ZioDarkmage
What does your boot time look like?
systemd-analyze
Also try
dmesg
and try to relay any errors you see or espescially long time intervals.You could try a different scheduler for the USB drive by inserting this line into
/etc/rc.local
echo "noop" > /sys/block/sda/queue/scheduler
reboot and confirm if it worked with
cat /sys/block/sda/queue/scheduler
noop should be perfectly suitable for flash devices, it is basically first in first out, and no optimizations for disk seeking.
-
@Efriim
My fstab:proc /proc proc defaults 0 0 PARTUUID=f2d3cb4f-01 /boot vfat defaults 0 2 PARTUUID=f2d3cb4f-02 / ext4 defaults,noatime 0 1 # a swapfile is not a swap partition, no line here # use dphys-swapfile swap[on|off] for that # Establish the drive's UUID number by entering the command ls -l /dev/disk/by-$ UUID=4B03-03C9 /home/pi/RetroPie/roms vfat nofail,user,uid=pi,gid=pi 0 2
My
systemd-analyze
:pi@retropie:~ $ systemd-analyze Startup finished in 1.482s (kernel) + 33.655s (userspace) = 35.138s
The next one is really long and I apologize as I am unsure the exact info needed so I am posting all of it.
Mydmesg
:pi@retropie:~ $ dmesg [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.14.98-v7+ (dom@dom-XPS-13-9370) (gcc version 4.9. 3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1200 SMP Tue Feb 12 20:27:48 GMT 2019 [ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructio n cache [ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 8 MiB at 0x2f800000 [ 0.000000] On node 0 totalpages: 196608 [ 0.000000] free_area_init_node: node 0, pgdat 80c85780, node_mem_map af13400 0 [ 0.000000] Normal zone: 1728 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:31 [ 0.000000] percpu: Embedded 17 pages/cpu @af0dd000 s38720 r8192 d22720 u6963 2 [ 0.000000] pcpu-alloc: s38720 r8192 d22720 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 194880 [ 0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=1920 bcm2 708_fb.fbheight=1080 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_s ize=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty3 root=PART UUID=f2d3cb4f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait logl evel=3 consoleblank=0 plymouth.enable=0 [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 757532K/786432K available (7168K kernel code, 577K rwdata , 2080K rodata, 1024K init, 698K bss, 20708K reserved, 8192K cma-reserved) [ 0.000000] Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xb0800000 - 0xff800000 (1264 MB) lowmem : 0x80000000 - 0xb0000000 ( 768 MB) modules : 0x7f000000 - 0x80000000 ( 16 MB) .text : 0x80008000 - 0x80800000 (8160 kB) .init : 0x80b00000 - 0x80c00000 (1024 kB) .data : 0x80c00000 - 0x80c906d4 ( 578 kB) .bss : 0x80c97ef8 - 0x80d468f0 ( 699 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 25298 entries in 75 pages [ 0.000000] Hierarchical RCU implementation. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns [ 0.000006] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 43980 46511078ns [ 0.000018] Switching to timer-based delay loop, resolution 52ns [ 0.000266] Console: colour dummy device 80x30 [ 0.000285] console [tty3] enabled [ 0.000310] Calibrating delay loop (skipped), value calculated using timer fr equency.. 38.40 BogoMIPS (lpj=192000) [ 0.000325] pid_max: default: 32768 minimum: 301 [ 0.000648] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000663] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.001605] Disabling memory control group subsystem [ 0.001682] CPU: Testing write buffer coherency: ok [ 0.002100] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.002508] Setting up static identity map for 0x100000 - 0x10003c [ 0.002631] Hierarchical SRCU implementation. [ 0.003310] smp: Bringing up secondary CPUs ... [ 0.004091] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.004936] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.005763] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.005869] smp: Brought up 1 node, 4 CPUs [ 0.005880] SMP: Total of 4 processors activated (153.60 BogoMIPS). [ 0.005885] CPU: All CPU(s) started in HYP mode. [ 0.005890] CPU: Virtualization extensions available. [ 0.006776] devtmpfs: initialized [ 0.017240] random: get_random_u32 called from bucket_table_alloc+0xfc/0x24c with crng_init=0 [ 0.017981] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4 [ 0.018204] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma x_idle_ns: 19112604462750000 ns [ 0.018221] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 0.018778] pinctrl core: initialized pinctrl subsystem [ 0.019539] NET: Registered protocol family 16 [ 0.022259] DMA: preallocated 1024 KiB pool for atomic coherent allocations [ 0.027225] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.027232] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.027439] Serial: AMBA PL011 UART driver [ 0.029096] bcm2835-mbox 3f00b880.mailbox: mailbox enabled [ 0.029557] uart-pl011 3f201000.serial: could not find pctldev for node /soc/ gpio@7e200000/uart0_pins, deferring probe [ 0.061480] bcm2835-dma 3f007000.dma: DMA legacy API manager at b0813000, dma chans=0x1 [ 0.062934] SCSI subsystem initialized [ 0.063156] usbcore: registered new interface driver usbfs [ 0.063207] usbcore: registered new interface driver hub [ 0.063295] usbcore: registered new device driver usb [ 0.070082] raspberrypi-firmware soc:firmware: Attached to firmware from 2019 -02-12 19:42 [ 0.071493] clocksource: Switched to clocksource arch_sys_counter [ 0.148260] VFS: Disk quotas dquot_6.6.0 [ 0.148342] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.148526] FS-Cache: Loaded [ 0.148709] CacheFiles: Loaded [ 0.156769] NET: Registered protocol family 2 [ 0.157484] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.157594] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.157779] TCP: Hash tables configured (established 8192 bind 8192) [ 0.157907] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.157951] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.158178] NET: Registered protocol family 1 [ 0.158646] RPC: Registered named UNIX socket transport module. [ 0.158652] RPC: Registered udp transport module. [ 0.158657] RPC: Registered tcp transport module. [ 0.158662] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.160292] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counter s available [ 0.163062] workingset: timestamp_bits=14 max_order=18 bucket_order=4 [ 0.171221] FS-Cache: Netfs 'nfs' registered for caching [ 0.171862] NFS: Registering the id_resolver key type [ 0.171895] Key type id_resolver registered [ 0.171901] Key type id_legacy registered [ 0.171916] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.173866] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2 51) [ 0.173997] io scheduler noop registered [ 0.174004] io scheduler deadline registered (default) [ 0.174171] io scheduler cfq registered [ 0.174178] io scheduler mq-deadline registered [ 0.174183] io scheduler kyber registered [ 0.176533] BCM2708FB: allocated DMA memory ef900000 [ 0.176560] BCM2708FB: allocated DMA channel 0 @ b0813000 [ 0.234465] Console: switching to colour frame buffer device 240x67 [ 0.269449] bcm2835-rng 3f104000.rng: hwrng registered [ 0.269583] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000 000(1024 MiB) [ 0.270028] vc-sm: Videocore shared memory driver [ 0.270305] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f2 00000 [ 0.280172] brd: module loaded [ 0.289313] loop: module loaded [ 0.289328] Loading iSCSI transport class v2.0-870. [ 0.290055] libphy: Fixed MDIO Bus: probed [ 0.290158] usbcore: registered new interface driver lan78xx [ 0.290219] usbcore: registered new interface driver smsc95xx [ 0.290234] dwc_otg: version 3.00a 10-AUG-2012 (platform bus) [ 0.318140] dwc_otg 3f980000.usb: base=0xf0980000 [ 0.518364] Core Release: 2.80a [ 0.518376] Setting default values for core params [ 0.518409] Finished setting default values for core params [ 0.718679] Using Buffer DMA mode [ 0.718686] Periodic Transfer Interrupt Enhancement - disabled [ 0.718690] Multiprocessor Interrupt Enhancement - disabled [ 0.718698] OTG VER PARAM: 0, OTG VER FLAG: 0 [ 0.718710] Dedicated Tx FIFOs mode [ 0.719037] WARN::dwc_otg_hcd_init:1046: FIQ DMA bounce buffers: virt = 0xaf9 14000 dma = 0xef914000 len=9024 [ 0.719063] FIQ FSM acceleration enabled for : Non-periodic Split Transactions Periodic Split Transactions High-Speed Isochronous Endpoints Interrupt/Control Split Transaction hack enabled [ 0.719070] dwc_otg: Microframe scheduler enabled [ 0.719125] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x805ed94c [ 0.719136] WARN::hcd_init_fiq:460: FIQ ASM at 0x805edcb4 length 36 [ 0.719151] WARN::hcd_init_fiq:486: MPHI regs_base at 0xf0006000 [ 0.719204] dwc_otg 3f980000.usb: DWC OTG Controller [ 0.719236] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1 [ 0.719268] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000 [ 0.719317] Init: Port Power? op_state=1 [ 0.719323] Init: Power Port (0) [ 0.719547] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.719558] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber= 1 [ 0.719567] usb usb1: Product: DWC OTG Controller [ 0.719575] usb usb1: Manufacturer: Linux 4.14.98-v7+ dwc_otg_hcd [ 0.719583] usb usb1: SerialNumber: 3f980000.usb [ 0.720185] hub 1-0:1.0: USB hub found [ 0.720226] hub 1-0:1.0: 1 port detected [ 0.720775] dwc_otg: FIQ enabled [ 0.720780] dwc_otg: NAK holdoff enabled [ 0.720785] dwc_otg: FIQ split-transaction FSM enabled [ 0.720795] Module dwc_common_port init [ 0.721056] usbcore: registered new interface driver usb-storage [ 0.721222] mousedev: PS/2 mouse device common for all mice [ 0.721298] IR NEC protocol handler initialized [ 0.721303] IR RC5(x/sz) protocol handler initialized [ 0.721308] IR RC6 protocol handler initialized [ 0.721313] IR JVC protocol handler initialized [ 0.721318] IR Sony protocol handler initialized [ 0.721323] IR SANYO protocol handler initialized [ 0.721328] IR Sharp protocol handler initialized [ 0.721333] IR MCE Keyboard/mouse protocol handler initialized [ 0.721338] IR XMP protocol handler initialized [ 0.722086] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer [ 0.722357] bcm2835-cpufreq: min=600000 max=1400000 [ 0.722718] sdhci: Secure Digital Host Controller Interface driver [ 0.722723] sdhci: Copyright(c) Pierre Ossman [ 0.723086] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe [ 0.723417] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe [ 0.723511] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.724928] ledtrig-cpu: registered to indicate activity on CPUs [ 0.725085] hidraw: raw HID events driver (C) Jiri Kosina [ 0.725238] usbcore: registered new interface driver usbhid [ 0.725243] usbhid: USB HID core driver [ 0.725863] vchiq: vchiq_init_state: slot_zero = af980000, is_master = 0 [ 0.727412] [vc_sm_connected_init]: start [ 0.737136] [vc_sm_connected_init]: end - returning 0 [ 0.737738] Initializing XFRM netlink socket [ 0.737764] NET: Registered protocol family 17 [ 0.737865] Key type dns_resolver registered [ 0.738380] Registering SWP/SWPB emulation handler [ 0.738987] registered taskstats version 1 [ 0.745045] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 0.745127] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2 [ 0.747081] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0 [ 0.747092] mmc-bcm2835 3f300000.mmc: DMA channel allocated [ 0.802128] sdhost: log_buf @ af913000 (ef913000) [ 0.838989] mmc1: queuing unknown CIS tuple 0x80 (2 bytes) [ 0.840559] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 0.842125] mmc1: queuing unknown CIS tuple 0x80 (3 bytes) [ 0.844902] mmc1: queuing unknown CIS tuple 0x80 (7 bytes) [ 0.881515] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 0.882603] of_cfs_init [ 0.882691] of_cfs_init: OK [ 0.903795] Waiting for root device PARTUUID=f2d3cb4f-02... [ 0.923112] random: fast init done [ 0.930242] mmc1: new high speed SDIO card at address 0001 [ 0.931647] Indeed it is in host mode hprt0 = 00021501 [ 0.998523] mmc0: host does not support reading read-only switch, assuming wr ite-enable [ 1.001295] mmc0: new high speed SDHC card at address 0001 [ 1.001840] mmcblk0: mmc0:0001 BB1QT 29.8 GiB [ 1.003274] mmcblk0: p1 p2 [ 1.025470] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O pts: (null) [ 1.025528] VFS: Mounted root (ext4 filesystem) readonly on device 179:2. [ 1.026294] devtmpfs: mounted [ 1.029671] Freeing unused kernel memory: 1024K [ 1.141553] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 1.141708] Indeed it is in host mode hprt0 = 00001101 [ 1.381828] usb 1-1: New USB device found, idVendor=0424, idProduct=2514 [ 1.381854] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 1.382603] hub 1-1:1.0: USB hub found [ 1.382714] hub 1-1:1.0: 4 ports detected [ 1.529618] systemd[1]: System time before build time, advancing clock. [ 1.659050] NET: Registered protocol family 10 [ 1.660186] Segment Routing with IPv6 [ 1.669880] ip_tables: (C) 2000-2006 Netfilter Core Team [ 1.687171] random: systemd: uninitialized urandom read (16 bytes read) [ 1.692791] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SEL INUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL + XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN) [ 1.693377] systemd[1]: Detected architecture arm. [ 1.701552] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 1.702722] systemd[1]: Set hostname to <retropie>. [ 1.738059] random: systemd: uninitialized urandom read (16 bytes read) [ 1.757905] random: systemd-cryptse: uninitialized urandom read (16 bytes rea d) [ 1.841954] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514 [ 1.841973] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber =0 [ 1.842685] hub 1-1.1:1.0: USB hub found [ 1.842769] hub 1-1.1:1.0: 3 ports detected [ 2.294634] systemd[1]: Listening on Journal Socket. [ 2.296167] systemd[1]: Set up automount Arbitrary Executable File Formats Fi le System Automount Point. [ 2.296781] systemd[1]: Listening on udev Control Socket. [ 2.297213] systemd[1]: Listening on fsck to fsckd communication Socket. [ 2.298207] systemd[1]: Created slice User and Session Slice. [ 2.298652] systemd[1]: Listening on udev Kernel Socket. [ 2.299059] systemd[1]: Listening on Syslog Socket. [ 2.926991] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null) [ 3.007943] systemd-journald[91]: Received request to flush runtime journal f rom PID 1 [ 3.401816] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned. [ 3.418458] bcm2835_alsa bcm2835_alsa: card created with 8 channels [ 3.596643] brcmfmac: F1 signature read @0x18000000=0x15264345 [ 3.606143] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdi o.bin for chip 0x004345(17221) rev 0x000006 [ 3.606589] usbcore: registered new interface driver brcmfmac [ 3.923803] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2 018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04 [ 3.924561] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9. 10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28 [ 5.076877] uart-pl011 3f201000.serial: no DMA platform data [ 5.335185] Adding 102396k swap on /var/swap. Priority:-2 extents:2 across:1 61788k SSFS [ 5.468368] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 5.468406] brcmfmac: power management disabled [ 8.681089] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 11.745573] Bluetooth: Core ver 2.22 [ 11.745680] NET: Registered protocol family 31 [ 11.745687] Bluetooth: HCI device and connection manager initialized [ 11.745713] Bluetooth: HCI socket layer initialized [ 11.745728] Bluetooth: L2CAP socket layer initialized [ 11.745765] Bluetooth: SCO socket layer initialized [ 11.765591] Bluetooth: HCI UART driver ver 2.3 [ 11.765609] Bluetooth: HCI UART protocol H4 registered [ 11.765616] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 11.765860] Bluetooth: HCI UART protocol Broadcom registered [ 11.928419] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 11.928429] Bluetooth: BNEP filters: protocol multicast [ 11.928443] Bluetooth: BNEP socket layer initialized [ 17.652410] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 17.652454] Bluetooth: HIDP socket layer initialized [ 17.712814] sony 0005:054C:05C4.0001: unknown main item tag 0x0 [ 17.717580] input: Wireless Controller Touchpad as /devices/platform/soc/3f20 1000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:05C4.0001/input/input1 [ 17.717710] input: Wireless Controller Motion Sensors as /devices/platform/so c/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:05C4.0001/input/input2 [ 17.718259] input: Wireless Controller as /devices/platform/soc/3f201000.seri al/tty/ttyAMA0/hci0/hci0:11/0005:054C:05C4.0001/input/input0 [ 17.718452] sony 0005:054C:05C4.0001: input,hidraw0: BLUETOOTH HID v81.00 Gam epad [Wireless Controller] on b8:27:eb:c1:c8:2d [ 22.380112] dwc_otg_handle_wakeup_detected_intr lxstate = 2 [ 22.831596] usb 1-1.1: reset high-speed USB device number 3 using dwc_otg [ 23.201599] usb 1-1.1: USB disconnect, device number 3 [ 23.301566] usb 1-1.1: new high-speed USB device number 4 using dwc_otg [ 23.431789] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514 [ 23.431802] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber =0 [ 23.432340] hub 1-1.1:1.0: USB hub found [ 23.432408] hub 1-1.1:1.0: 3 ports detected [ 23.531568] usb 1-1.2: new full-speed USB device number 5 using dwc_otg [ 23.664674] usb 1-1.2: New USB device found, idVendor=0e8f, idProduct=0003 [ 23.664686] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber =0 [ 23.664692] usb 1-1.2: Product: PLAYSTATION(R)3 Controller [ 23.664695] usb 1-1.2: Manufacturer: Sony [ 23.752901] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3 f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:0E8F:0003.0002/input/input3 [ 23.753659] pantherlord 0003:0E8F:0003.0002: input,hidraw1: USB HID v1.10 Joy stick [Sony PLAYSTATION(R)3 Controller] on usb-3f980000.usb-1.2/input0 [ 23.762980] usb 1-1.1.3: new high-speed USB device number 6 using dwc_otg [ 23.892564] usb 1-1.1.3: New USB device found, idVendor=090c, idProduct=1000 [ 23.892577] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumb er=3 [ 23.892581] usb 1-1.1.3: Product: Flash Drive FIT [ 23.892585] usb 1-1.1.3: Manufacturer: Samsung [ 23.892589] usb 1-1.1.3: SerialNumber: 0378718120002178 [ 23.893338] usb-storage 1-1.1.3:1.0: USB Mass Storage device detected [ 23.894381] scsi host0: usb-storage 1-1.1.3:1.0 [ 23.939240] usbcore: registered new interface driver uas [ 24.191598] usb 1-1.1.1: new high-speed USB device number 7 using dwc_otg [ 24.322730] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800 [ 24.322761] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumb er=0 [ 24.592705] libphy: lan78xx-mdiobus: probed [ 24.608812] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): int urb period 64 [ 24.714057] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 25.402673] scsi 0:0:0:0: Direct-Access Samsung Flash Drive FIT 1100 PQ : 0 ANSI: 6 [ 25.405848] sd 0:0:0:0: [sda] 501253132 512-byte logical blocks: (257 GB/239 GiB) [ 25.405987] sd 0:0:0:0: [sda] Write Protect is off [ 25.405993] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 25.406130] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does n't support DPO or FUA [ 25.417146] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 25.956236] random: crng init done [ 25.956270] random: 7 urandom warning(s) missed due to ratelimiting [ 27.251307] sda: sda1 [ 27.255590] sd 0:0:0:0: [sda] Attached SCSI removable disk
Once again sorry for the stream of info.
I will try theecho "noop" > /sys/block/sda/queue/scheduler
and see what that does. Does it matter where in the rc.local it goes or just at the end is fine? -
@ZioDarkmage
Above the last line. -
@Efriim
Sorry just saw you question regarding vram and gpu. Everything is stock as image load for 4.4 except i upped ram in emulationstation from 80mb to 160mb. -
@ZioDarkmage looks nominal, you could cut your boot time in half.
I'll try to review and compile the changes I made to my system as I have had the same one for a while now, I don't remember everything I did.
Well you do have two console= in your kernel cmdline one of them is a serial terminal. It is probably not at all impactful.
this is my boot time
Startup finished in 1.241s (kernel) + 14.557s (userspace) = 15.799s
I think that sdram overclock is very impactful.
and possiblyraspi-config
>> boot options >> wait for network on boot >> noI do not know how to run this update correctly however. If you use RetroPie Setup and do the Update and hit yes and yes, this will update your kernel firmware modules which may solve a problem with the usb. It is worth it, the update goes on to update all emulators from like source or something bizarre and immensely time consuming but you can interrupt it with ctrl+c. If it is interrupted you can just go to that emulator and update it or clear the source folder if you want.
-
@ZioDarkmage
it all sounds good to me, so maybe its a problem with your pi.
do you have another pi to test if the same problem occurs?
you could also try with a diffrent usb stick and see if the same happends, but tbh it sounds weird.i also just remembered that case you use, maybe you can try it without the case connected and see if that makes a diffrence.
-
@Halvhjearne
I use the same case and pi, but I have a different flash drive...! Oh I just thought of something, you can try formatting the usb drive with a different block size. 4096b to 16kb should be good, but I don't remember what is optimum, I guess it varies with the disk and larger flash sometimes use larger allocation units. And what you are using it for if it has small files to read like text.
I have had sdcards that do not work to run programs with the allocation unit being too high. Because if it is grabbing a small file e.g. under 16kb then it will grab a part of the next file and fragmentation occurs, this is typically avoidable because the allocation table will not allow it but different flash medias will have different layouts. The same can apply to large files too, but I don't understand how, I think it has to do with the flash media technology then.
EXT4 has a cool Block/Inode allocation policy. You may notice if you ever used an actual disk that it will delay writes until it decides where to allocate on the disk eliminating most fragmentation along with dynamic block allocation.
-
@Efriim
So turning off thewait for network on boot
decreased my boot time to around 18 seconds, adding theecho "noop" > /sys/block/sda/queue/scheduler
bumped it up to 41 seconds.
I went ahead and disabled this.I have another Samsung of the same size arriving in the mail tomorrow, to see if maybe the ones I have on hand may just be damaged. (Doubtful but I am grasping at straws honestly.) I am also looking at a San Disk if this doesn't work.
I notice that this issue seems to occur very randomly and that the time that it appears to happen the most is when I sync my Bluetooth ps4 controller to the pi when the splashscreen comes up initially. Looking over the
dmesg
I do see that the Samsung drive is showing up.I will try using the smaller block size to see what that does. I also have different size drives that I will be trying.
I have one other question, while I know the fsck set to 2 is for partition checking to help prevent fragmentation, could the fsck check actually be causing issue or is the primary issue too many processes occurring during boot such as the fstab mount and the Bluetooth sync?
-
@ZioDarkmage
I think that the filesystem check happens when there is an unclean shutdown. Either way it should not effect the usability of the the drive.I really think the allocation unit block size could be the problem, and using the default value should work, I believe when you use the format dialog in windows that what it displays will tell you what it is currently set to.
My 8gb drives all use 4096bytes,
-
@ZioDarkmage said in USB drive randomly not showing up until reboot:
I have one other question, while I know the fsck set to 2 is for partition checking to help prevent fragmentation, could the fsck check actually be causing issue or is the primary issue too many processes occurring during boot such as the fstab mount and the Bluetooth sync?
i doubt thats a problem, but you could try and set it to 0 and it will not be checked at all.
i suggested a few things in the last post, but it sounds like either an error on the usb stick or maybe it just dosnt play nice with the pi ... or maybe the pi itself has some error?
tbh the most ideal (and fastet) is to just get a larger sdcard. -
I ran into a problem with changing the scheduler using rc.local, I don't know why but it interrupted the safeshutdown script from being run. I instead changed the cmdline.txt
elevator=deadline
toelevator=noop
.Boot time can vary by 2 or 5 seconds, I'll either get 16, 18 and sometimes 21. Sometimes It takes an extra interval when loading the ports directory, which has symlinks to my usb, and I haven't yet rounded that out. But I think the scheduler resolves this.
-
@Efriim
Sorry about the late reply, I was testing these over several days with various manufactured usb drives.USB 3.1 drives tested:
Samsung Fit : Still acts up no matter what, no matter the size. Block size, format type, all seem to act up with this drive. Is there a file database I should add this to as not to use with the Pi?
PNY : Elevator change worked on it. Without the elevator change it acts up on occasion but not as much and that may have been my error.
SanDisk Fit : Works with or without changes, just seems to work period.
MicroCenter Drive : Works with elevator change on one drive works without it on another, not sure on this one.USB 2.0 drives seem to work no matter what I do, but with this build I was trying to make sure to stick to USB 3.0+ for faster change out of files when plugging directly to my pc.
-
@ZioDarkmage
There is a USB host database in linux, I don't know if it has any configuration ability, but you might be able to spoof your drive to a more compatible alternative.
/var/lib/usbutils/usb.ids
I don't remember where you would apply that, it has been a long time, you will have to google it.since you have a fstab, but this will disable usbmount on other drives(I think) you could try disabling it anyway.
/etc/usbmount/usbmount.confAgain I don't know if this even applies
/etc/usb_modeswitch.confSome drives, I don't have the name for it, are built on a pcb with a controller, while some have the controller built inside like an sdcard.
I didn't expect the scheduler to effect it all too much if at all. There should be a way to set the usb3.0 enhancements. You'll probably want to look at the raspberry pi forums for that, as this is probably a thing.
This! https://www.domoticz.com/wiki/Assign_fixed_device_name_to_USB_port
-
@ZioDarkmage
sudo fsck.fat /dev/sda1
I always have this where it says it was not properly umounted. I'm looking into it.
Oh well, It is probably nothing.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.