There has to be a clear directive from the ICC on overs that have to be bowled per hour/session. This is then reinforced by the match referee and umpires before and during every test.
Penalties? Docked/awarded runs, bans for captains and/or those deemed compliant (e.g. Riaz taking eight minutes. This is an example, I appreciate all teams have done this), possibly series bans for repeat offenders.
In games such as this drawn test, umpires would say to misbah at innings break, we expect to have X time left, you have to bowl Y overs or forfeit runs calculated possibly in the same way DL is.
But there needs to be the will. Slow.over rates and spectators being short changed has gone on far too long.