USB drive randomly not showing up until reboot
-
@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.