The Ubuntu Wiki presents these instructions to set up scrobbling with Rhythmbox:
Setting up Last.fm Syncing
- Select Edit > Plugins
- Select the box for the Last.fm plugin, then click Configure
- Insert your Last.fm username and password
- Click Close on the Last.fm Configure and Plugin windows, then use Rhythmbox as normal. The played song information will be uploaded automatically to your Last.fm account.
However, there is no Configuration button in the Rhythmbox version shipped with Ubuntu 16.04:
Preferences only sets up which services to scrobble to:
Where exactly should I register my Last.fm credentials?