In this great Emacs-fu post on scrolling in Emacs, my very question is mentioned but never solved. Here's a quote:
Note that on X, when the cursor (point) reaches the end of the document, the slider on the scroll bar may not be at the bottom; I understand this is because of some disagreement between Emacs and the toolkit (GTK+ in this case).
PS: GTK+ is the default Emacs toolkit under Ubuntu.
The problem I'm having is that the slider of the scrollbar does not go to the bottom when the cursor reaches the bottom of the document. If I drag the slider down to the bottom, it scrolls the document until only the very last line of the document is visible at the top of the buffer.
Is there a way to maybe adjust the range of the scrollbar (or other solutions), so that when I reach the bottom of the document by using the keyboard, the scrollbar slider too reached the bottom of the scrollbar?