I assume you have the sensor enabled (LCD menu)? There may be a fragment of stringing or even a dust buildup preventing the sensor operating reliably so first recourse is cleaning.
If your filament is prone to breaking (PLA?) then you need to dry it.
And if the filament is running low enough that you fear an overnight run-out then preemptive spool changes should give you peace of mind, save the shorter lenghs for times when you will be awake to attend to runouts.
Cheerio,
RE: Firmware 3.13.2 for Original Prusa i3 MK3 upgraded to MK3S
Thank you for your comments, Diem. The sensor is enabled (all three settings, including the one for filament runout. I don't think cleaning is the issue since the IR sensor was literally just installed with my "S" upgrade. I initially thought I made an error installing, but the sensor works. It passes the sensor test. When I run the test and put a piece of filament in, it passes. When I rerun the test with no filament inserted, it fails. When I try to start a print with no filament in place, it prompts me to insert some, as expected. But when I insert a short piece of filament and run a first layer calibration, it uses up the filament, but continues until the the calibration is done, even though the filament runs out about half way through the process.
This seems like a problem with the firmware. It would be great if someone using the same hardware and firmware could perform a runout test and see if the same issue presents. If so, it might be something Prusa needs to resolve. If not, I'll reflash and see if that fixes it. Thanks again.
It's a few years since I did this ... if any part of the sensor is rough it can prevent smooth operation and cause intermitent errors and the electronics cover has to be very accurately placed. There were several threads here a few years ago, search two or three years back and you will get better help than I can remember.
Cheerio,