When the battery runs low on the laptop, KDE automatically logs out the user

Problem

When the battery runs low on the laptop, KDE automatically logs out the user

Solution

This is a default behavior in KDE. To disable this feature, launch the Control Center under KDE.

  1. Select Power Control->Laptop Battery
  2. Click on Lower Battery Warning Tab
  3. Change System State Change to Logout
  4. Click on Low Battery Critical Tab
  5. Change System State Change to Logout
  6. Click on OK

This will create the initial klaptop configuration file in ~/.kde/share/config/kcmlaptoprc. Afterward, launch the Control Center again. This time change the value of System State Change from Logout to None.

Note: This process must be performed everytime a new user account is created.