Now I understand your issue is the AIO randomly flip between being a PC and an external display.  Normally you use Input-source selection button to switch between the two modes for this AIO model.  Apparently your pc has a seizure like activity once in a long while doing this switch on its own, albeit transient, then switch back.  It could be the driver for the button that is buggy or something else.  In this case you can try delete and reinstall the OSD (on screen display) driver, reset cmos, do a fresh clean install of Windows 10 OS, or live with the issue. As you said your PC is otherwise working perfectly. [URL] [URL]  
Hello, I have an older Dell Inspiron 3646 All-In-One w/touchscreen that switches it's display output between PC and HDMI randomly (when there is nothing attached to the HDMI port).  Sometimes it doesn't do it for awhile, sometimes it switches from PC to HDMI (a black screen because nothing is connected) a few times an hour.  Sometimes on startup it also starts with HDMI as the display selected (meaning it starts up to a black screen since there is nothing attached to the HDMI port). Is there some way to "lock" it on PC so it stays on it's own integrated display?  Or a way to completely disable the HDMI port?  I tried using compressed air to blow out the HDMI port several times in case there was something foreign in there, but that has not helped.  I have the correct Intel Graphics driver installed - there are no Dell or Windows Update updates to download. Any suggestions would be appreciated - the machine works great other than this.  Thank you! -Gina
Inspiron 3646 AIO, switching itself between PC and HDMI