How long is the idle timer?

Solution 1:

Standard Logout
After 5 minutes of non-combat inactivity, the game with automatically log you out.

Extensive Logout
After 6 hours, regardless of activity, the game will automatically log you out.

Combat Logout
After 20 minutes of inactivity while in combat, rather than logging you out, your character will stop automatically attacking the enemy. As a result, the enemy may lose aggression and eventually stop attacking you as well. Once the enemy loses aggression and stops attacking you, the standard idle timer will log you out.

If the enemies do not lose aggression, then you will remain logged despite exceeding the 20 minute mark. The Youtube video explains that he was able to stay logged in for over an hour while being inactive in the Nightmare zone because the enemies did not lose aggression and continued to attack.

Sources

  • Reddit
  • Youtube
  • Logout wiki