I'm new here, so please bear with me. I'm not new to Ubuntu, but I'm also not very experienced when it comes to debugging low-level stuff. In the last few days I have been experiencing some weird symptoms on my 7 months old Dell XPS 13 computer running Ubuntu 16.04 and I don't really know how to locate the problem and/or fix it, so any help would be appreciated.
It started yesterday when I clapped the lid down on my computer, expecting it to suspend the system. I go around with it all day and don't get a chance to open it until late at night when I come home. When I open it it has been shut off, which I found weird as I have left it on suspend sometimes for more than a day and it would still have a lot of battery left when I opened it. I plug in the power cord and power on the computer and I see that it has been completely drained for battery. I suspend it again and set it to recharge over night.
The next day (today) I opened the lid and it resumed from suspend just fine and was fully charged. I sit at my computer for some hours to work (programming in a simple editor, nothing heavy) with no problems and at one point I want to open a new tab in my firefox browser. The tab hangs. I try another one and it hangs as well. I try to ping google in my terminal and it works just fine. I chalk it off as a firefox problem and try to open chromium. The application icon blinks several times after clicking it, but never opens and stops blinking. I try to open my system monitor, which launches a window, but the visuals never load. I basically can't open any applications. So I think shutting down the computer might fix the problem. I begin the shutdown and the computer hangs on the ubuntu shutdown splash screen. I go away and come back some 20 minutes later and it is still hanging on this screen. So I power cycle the computer and start it up again.
I then just try suspending the computer by closing the lid and then after a moment opening it again. I see that it has never suspended and that the screen is just black, but with the mouse being visible and possible to move. I suspect that this was what caused the computer to run out of battery during suspend yesterday as it is not easy to see that the computer has actually suspended when the lid is closed. I power cycle. I then continue to work for some hours with no apparent problems. At one point I tab over from my terminal to my editor and just move the mouse slightly and the screen completely freezes. Nothing reacts on the screen, not even the mouse. I see that the computer registers mouse movement as my keyboard is backlit and reacts to touching the mousepad, but the screen is just completely frozen. I power cycle it again and start it up. No problems again for hours, but I decide to backup important things, just in case. The backup just finished about an hour ago and then I tried opening another tab in my firefox browser and it hangs and it's the same problem as before. I can't open any applications. My system monitor was already open this time around, but has apparently crashed, being greyed out and unresponsive. I try to close my firefox and reopen it but are met with a window that tells me that firefox is already open, even though I just closed it. I try to shut it down and it hangs on the splash screen once again so I power cycle.
And here I am. Before these things started happening, I have experienced problems with resuming from suspend properly, but nothing consistently. I have also had a problem with a rattling noise coming from inside the computer when the fan is running (it doesn't start immediately, but some time after the fan has been running and immediately stops when the fan stops.). This problem has been there ever since I bought it. At one point after I had had the computer for about 3 months, the battery just died and needed to be replaced. I write these things in case they could be related. Any suggestions to what might be causing this? Software or hardware? I'm thinking about calling Dell tomorrow and having them look at it as it is still rather new.
TL;DR: I am suddenly experiencing several odd bugs: sudden screen freezing while doing simple stuff, hanging on shutdown, computer not properly suspending as well as suddenly not being able to open applications, not even my system monitor. Need to power cycle every time. Computer is a 7 months old XPS 13 Dell with Ubuntu 16.04.