in power settings I configured the power button to suspend and it works, however the system still shuts down when it is in login screen after pressing the power button. is there anyway to fix this?
I believe this to be a solution for what you're wanting to do:
Open a Files window as admin by right clicking Files and selecting "New Window as Administrator.
Navigate in the File System to /etc/systemd and open logind.conf with Scratch Text Editor.
Directly below the line reading #HandlePowerKey=poweroff add a new line of text reading:
Close Scratch to save the file then close all other windows and reboot your machine.
Once you reboot, when you are presented the Login Screen you can test the results by pressing the power button which should suspend the machine, not power it off. Now, on my machine at least, when I pressed the power button it took about 3-5 seconds for the machine to suspend.
Hope this answers your question and good luck!!!