I have been trying to get my system to properly sleep, however I can't figure out what the problem is and I also couldn't find any resources addressing my issue.
So the issue is, when i close the lid the system will briefly go to sleep ( I can tell that by the fans turning off ) , however after a while the system wakes up again (and the screen turns on too) while the lid is still closed. A while after that the system goes to sleep again, which causes the system to constantly sleep and wake up, causing a lot of battery drain.
Interestingly, the system does not seem to wake up from sleep if I constantly move the laptop physically, which led me to believe that the issue is somehow related to an accelerometer or maybe to its driver.
I have also tried Archlinux to see if the newer kernel and newer drivers would fix the issue. Indeed this problem does not occur on Archlinux. However on Archlinux, if the system has been asleep and physically not moved for a while and I physically move the system, this again causes the system to wake up, however the system does not go into an endless cycle of sleep and wake. Linux Kernel version of Archlinux was I believe 5.10.14-arch1-1.
BTW I am using Ubuntu 20.10 with the kernel version 5.8.0-43-generic.
Switching to Archlinux is not really an option, because while Archlinux fixed the sleep issue it also introduced a whole new set of issues like constant stutters, that I have no idea how to troubleshoot. Besides, I like Ubuntu.
This issue has been giving me headaches for a while now, because I really want to fully get rid of windows, which does not make a lot of sense while my system can't properly sleep on linux. I would be very grateful for any help, and I would also be happy to submit any logs or any other type of information that might help identify the issue.
Edit: Corrected the Arch kernel version to 5.10.14-arch1-1, my bad!
Edit2: I tried the latest kernel on the Ubuntu mainline PPA (v5.11-rc7). The new kernel did not fix the sleep issue but brought the problems I had on Archlinux, such as constant stutters.