1

I have found that in System Settings > User Accounts that if you select an account and then select the button called History (which is meant to show the login history for that account), it will show you when you last logged in as Session Started, but it will show that you Session Ended just before you login the next time.

To clarify what I mean, let's say that yesterday I logged into my account on this machine at 14:29, and then sometime near 23:00 I logged out, and then this morning I logged into my account somewhere around 11:20, it will show this:

    Today 11:20 Session Started
    Today 11:19 Session Ended
    Yesterday, 14:29 Session Started

So it assumes that the last session ended when you log into a new one, so the bug seems to be that it does not log when a session ends properly, and only logs it when a new session starts.

So it will show this sort of thing:

Login History GUI

Why is this? And how can I fix this?

Information Update:

I set up another account on the same machine, and ran the command:

loginctl

But the only accounts that were active (after I logged out of the other account) were lightdm and the current user account. So I know that the session properly shutdown, so why does it not log that it shuts down? What, will I have to make my own custom scripts executed at shutdown and startup to get an accurate login history?

Here is part of the output of the last command as requested:

reboot   system boot  3.19.0-15-generi Sun May  3 18:34 - 22:38 (1+04:03)   
arthur-d pts/5        :0.0             Sat May  2 22:07 - 22:07  (00:00)    
arthur-d pts/18       :0.0             Sat May  2 22:07 - 22:07  (00:00)    
arthur-d pts/11       :0.0             Sat May  2 22:07 - 22:07  (00:00)    
arthur-d pts/5        :0.0             Sat May  2 22:07 - 22:07  (00:00)    
arthur-d pts/6        :0               Sat May  2 21:42 - 22:10  (00:28)    
arthur-d :0           :0               Sat May  2 21:42 - down   (00:53)    
reboot   system boot  3.19.0-15-generi Sat May  2 21:41 - 22:35  (00:54)    
arthur-d pts/5        :0               Sat May  2 16:15 - 16:16  (00:00)    
arthur-d pts/5        :0               Sat May  2 16:15 - 16:15  (00:00)    
arthur-d pts/5        :0               Sat May  2 15:43 - 15:43  (00:00)    
arthur-d pts/5        :0               Sat May  2 15:13 - 15:42  (00:29)    
arthur-d pts/5        :0               Sat May  2 15:06 - 15:07  (00:00)    
arthur-d pts/5        :0               Sat May  2 14:56 - 15:02  (00:05)    
arthur-d pts/5        :0               Sat May  2 14:55 - 14:56  (00:01)    
arthur-d pts/5        :0               Sat May  2 13:55 - 14:50  (00:54)    
arthur-d pts/5        :0               Sat May  2 13:24 - 13:55  (00:30)    
arthur-d pts/5        :0               Sat May  2 13:24 - 13:24  (00:00)    
arthur-d pts/7        :0               Sat May  2 13:09 - 13:17  (00:08)    
arthur-d pts/7        :0               Sat May  2 13:09 - 13:09  (00:00)    
arthur-d :0           :0               Sat May  2 13:08 - crash  (08:32)    
reboot   system boot  3.19.0-15-generi Sat May  2 13:07 - 22:35  (09:27)    
arthur-d pts/1        :0               Fri May  1 22:04 - 22:11  (00:06)    
arthur-d pts/1        :0               Fri May  1 22:04 - 22:04  (00:00)    
arthur-d pts/1        :0               Fri May  1 20:43 - 22:04  (01:20)    
arthur-d pts/4        :0               Fri May  1 20:35 - 20:42  (00:07)    
arthur-d pts/4        :0               Fri May  1 20:35 - 20:35  (00:00)    
arthur-d :0           :0               Fri May  1 20:34 - down   (02:05)    
reboot   system boot  3.19.0-15-generi Fri May  1 20:33 - 22:40  (02:06)    
arthur-d pts/1        :0               Fri May  1 16:08 - 16:08  (00:00)    
arthur-d pts/1        :0               Fri May  1 16:08 - 16:08  (00:00)    
arthur-d pts/1        :0               Fri May  1 16:08 - 16:08  (00:00)    
arthur-d pts/1        :0               Fri May  1 12:36 - 12:37  (00:00)    
arthur-d pts/1        :0               Fri May  1 12:33 - 12:36  (00:03)    
arthur-d pts/1        :0               Fri May  1 12:12 - 12:33  (00:21)    
arthur-d pts/1        :0               Fri May  1 12:08 - 12:11  (00:03)    
arthur-d pts/1        :0               Fri May  1 12:07 - 12:08  (00:00)    
arthur-d pts/1        :0               Fri May  1 12:07 - 12:07  (00:00)    
arthur-d pts/1        :0               Fri May  1 11:54 - 12:03  (00:09)    
arthur-d pts/1        :0               Fri May  1 11:54 - 11:54  (00:00)    

This issue is also present under Ubuntu GNOME 15.10 with GNOME 3.18 as well as Unity (so both the unity-control-center and the gnome-control-center).

  • In my 14.04.2 it seems to work like it should... Could you provide the output of the last command? – Fabby May 29 '15 at 11:25
  • @Fabby: As the output was rather long I have only provided it for the last few days, but I think that it is enough. – user364819 May 29 '15 at 12:52
  • Mine behaves like the OP's: a session is only shown as ending, when a new one starts. – Organic Marble May 29 '15 at 12:58
  • @OrganicMarble: Are you running 15.04 too? – Fabby May 29 '15 at 16:45
  • No, 14.04.2 here. – Organic Marble May 29 '15 at 17:00
0

As said in bug #1443052, debdiffs for both Trusty and Xenial have been committed (they should shortly be released) which fix the issue and an fix for Yakkety has already been released. Those working on fixing the issue have not yet managed to do so in Precise due to code incompatibilities with the upstream patch.

As this bug is one in the accountsservice package rather than either the unity-control-center or the gnome-control-center only the accountsservice one will need to be upgraded.

These are the versions in which the issue is fixed in (some have not been released yet at the time or writing):

  • Yakkety: 0.6.42-0ubuntu1

  • Xenial: 0.6.40-2ubuntu11.3

  • Trusty: 0.6.35-0ubuntu7.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy