elementary / settings-daemon

GNU General Public License v3.0
14 stars 11 forks source link

After waking from sleep, the system prompts me for administrator password one time to update system sources #113

Open gorghino opened 6 years ago

gorghino commented 6 years ago

Something similar to this old fixed bug: https://bugs.launchpad.net/appcenter/+bug/1617687 Before sleeping I was connected SSH -X to a RasPI and I have two active screens (HDMI) at the moment.

The prompt doesn't accept my root password. I had to cancel it.

Kernel: Linux 4.4.0-97-generic 120-Ubuntu SMP Tue Sep 19 17:28:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Elementary 0.4.1 Loki 64bit

leethax666 commented 6 years ago

Same issue here. Window: https://i.imgur.com/0pjOTbg.png

jeagerspice commented 6 years ago

I have the same issue, however I have no SSH or remote sessions. I am only logged in locally. 4.10.0-38-generic elementary/appcenter#42-16.04.1-Ubuntu elementary OS 0.4.1 Loki 64bit Package: appcenter Version: 0.2.7+r927+pkg66~ubuntu0.4.1.1 Fresh install of Loki

jobo5432 commented 6 years ago

Add me to the list. I tracked this bug on the launchpad/appcenter bug tracker too, but never found relief there either. I seem to recall that often times in the past, I'd wake the screen up to as many as a dozen of those windows, depending on how long the computer screen slept... but I don't believe it's more than one or two anymore... Perhaps it is just one?

Also - maybe so, but I don't recall seeing anyone mention that it doesn't seem to like my password either... I'm running Elementary OS as my primary desktop/home dev machine. I have one local user account. That password is not accepted in that dialog, or if it is, the dismissed window is immediately replaced with another.

daprice commented 6 years ago

I just came back to my computer after leaving it alone for about a day (I have it set to sleep after 2 hours of inactivity but it looks like it remained awake and in display sleep the whole time despite no apps running and no remote sessions) to find what must have been at least 100 of these dialogs stacked on top of each other. I can't say how many because the sheer number of them made the machine (4.2ghz, 16gb ram) almost completely unresponsive and I was only able to get rid of them by selecting "close all" from the dock. Like others here, the prompts did not accept my password.

In the past I've occasionally gotten one of these dialogs when waking from sleep or display sleep (regardless of how long I had left the computer alone), but today was the first time I've ever seen more than one at a time.

Kernel 4.10.0-42-generic, elementary OS 0.4.1 Loki 64bit appcenter: 0.2.7+r927+pkg66~ubuntu0.4.1.1

thomasazar commented 6 years ago

After leaving my computer for about five-and-a-half hours (during which it was still awake), I came back to see a stack of dialogs so thick that the shadow around them was just a solid black bar. I counted 40 dialogs, each of which I clicked "Cancel".

Kernel: 4.4.0-109-generic elementary/appcenter#132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64 appcenter: 0.2.7+r927+pkg66~ubuntu0.4.1.1

jtrees commented 6 years ago

I am also experiencing this bug. It seems to suffice to switch to another user account (without logging out) and then back again to trigger this.

Also as @jobo5432 mentioned, the dialogs don't even appear to accept the correct password.

dcoli commented 6 years ago

I've been having this happen ever since installing Elementary in December. It's not consistent, but it often happens if the laptop goes to sleep. I imagine it has something to do with the AppCenter losing it's authority to check for updates. Unfortunately, my sudo password doesn't work. Perhaps a solution would be for the AppCenter to recognize sudo-capable logins as being the proper authority to initiate a system update?

TGC-TECH commented 6 years ago

Same here, all of my sources are fine and can run sudo apt-get update without error, this popup does not accept my password and is only happening on my thinkpad R61 which I use as a workshop laptop and is not happening on my primary laptop, an HP 9480m or my desktop (MSI z170a PC MATE) all of which where installed off the same USB,

legendary-jld commented 6 years ago

I use elementary OS 0.4.1 Loki 64bit on my office computer, and receive this message every morning when I return to my PC. The only way to prevent it is a shutdown before leaving or a restart when I first get in.

benjaminjack commented 6 years ago

I also have the same issue. I leave the computer on, display goes to sleep, and when I come back I get this message. Entering the correct password just says "Authentication failed."

mauritslamers commented 6 years ago

Same issue. I run ElementaryOS on an older iMac, and after unlocking the lock screen (which I still get even when I have turned if off in any configuration that I could find) I get a black screen, in which the mouse cursor seems to indicate which windows are being shown, but nothing is visible. The only "solution" I have for this at the moment is to restart lightdm from the command line in order to get back into the graphical environment.

gsupp commented 6 years ago

I am also experiencing this issue. I run elementaryOS Loki on a desktop machine and even locking the screen (Super+L) and returning a few minutes later can trigger this popup. It also won't accept my password.

elementary OS 0.4.1 Loki appcenter/xenial,now 0.2.9+r999+pkg68~ubuntu16.04.1 amd64

My work around is to kill the 'io.elementary.appcenter' process and disable it from startup (set NoDisplay=false in /usr/share/applications/io.elementary.appcenter-daemon.desktop and un-check "AppCenter Daemon" in gnome-session-properties). Although I don't think the elementary team really wants us doing that.

protobits commented 6 years ago

I too have this bug for long time now. I've grown accustomed to hitting ESC key several times after unlocking to discard the authentication requests. It seems strange that this bug is here for so long time now and I'm hoping that at least in Juno beta it is solved, but in that case one would expect it to be backported to Loki if possible.

If the issue is indeed that AppCenter attempts to refresh its sources while user is not logged in, and that is not possible, why not apply the simple strategy mentioned in launchpad of not attempting to do so when user is not logged in (and maybe delay it until it is)?

para-d commented 6 years ago

This affects me too. Elementary Loki, App Center 0.2.9

gforceg commented 6 years ago

Same issue here. I checked /var/log/auth.log before and after entering my password twice (which didn't work). and it added the following lines:

Jul 13 14:45:42 action-Lenovo-Yoga710-15ISK polkit-agent-helper-1[12054]: pam_ecryptfs: pam_sm_authenticate: /home/action is already mounted
Jul 13 14:45:44 action-Lenovo-Yoga710-15ISK polkit-agent-helper-1[12197]: pam_ecryptfs: pam_sm_authenticate: /home/action is already mounted

Is this a bug that only affects folks with an encrypted home folder?

jtrees commented 6 years ago

I have an encrypted home folder and this affects me. Does anyone here not have an encrypted home folder?

eighthave commented 6 years ago

I use other methods of disk encryption, but not the home folder encrpyiton. I think that is called encfs?

mauritslamers commented 6 years ago

I don't use anything encrypted and still have the issue. What makes matters worse is that if you leave the machine after some time (few hours, a day) it starts spinning up zenity dialogs to indicate that something is not reacting and whether to force quit it. Because the new authentication dialogs keep coming, the zenity dialogs also keep coming. As these zenity dialogs each take a few MBs of memory, they slowly start restricting the machine as it slowly runs out of memory. My usual way of getting out is to switch to the console (Ctrl-Alt-F1) and restart lightdm. However, sometimes I am not able anymore to get to the console, and force restarting the computer is the only way out.

This all happens even though I turned off all the locking (so no lock on sleep and lock after screen turns off) as the computer still locks anyway.

mauritslamers commented 6 years ago

Diving a bit deeper, after I noticed something in my auth.log:

PackageKit: uid 996 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted: 0)
PackageKit: uid 996 failed to obtain auth

The peculiar thing is that uid 996 on my machine is a (seemingly) generated guest account. Related contents of /etc/passwd:

guest-1oogtb:x:996:996:Guest:/tmp/guest-1oogtb:/bin/bash

After inspecting the source code of AppCenter, it seems that the daemon process tries to refresh the system sources by getting a PackageKit client to do so. (https://github.com/elementary/appcenter/blob/loki/src/Core/UpdateManager.vala#L39)

Another bit of info I found to in /var/log/syslog:

(packagekitd:1851): PackageKit-CRITICAL **: pk_transaction_status_changed_emit: assertion 'PK_IS_TRANSACTION (transaction)' failed
(packagekitd:1851): GLib-GIO-CRITICAL **: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed
(packagekitd:1851): GLib-GIO-CRITICAL **: g_dbus_connection_emit_signal: assertion 'object_path != NULL && g_variant_is_object_path (object_path)' failed
(packagekitd:1851): GLib-Gobject-WARNING **: instance with invalid (NULL) class pointer
(packagekitd:1851): GLib-GObject-CRITICAL **: g_signal_emit_valist: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Could it be that the handling of this error in the UpdateManager is broken?

gforceg commented 6 years ago

This issue is a minor annoyance, but due to the major issues I've had (can't enter my passphrase to get past encryption at boot w/o first restarting and booting from the grub menu, "curated" apps freezing my machine, freezing when coming out of suspend) I'm going to have to switch back to fedora or debian for now.

I really like the idea of Elementary OS but it's preventing me from doing work at the moment.

Maybe I'll come back in a couple years.

thavlik commented 6 years ago

I see this dialog about 3-4 times after waking from sleep. New install.

thoni56 commented 5 years ago

When this happens to me, in a VirtualBox guest, if I cancel all (usually 3 or 4) dialogues, it has closed my host-only adapter ethernet link. I see the link in ifconfig but it has not IP.

A reboot often seems to fix it, but a shutdown and restart always does (I think...).

riker09 commented 5 years ago

After locking my screen for a short amount of time (say, a bathroom break) I'm facing one or more password dialogues which I cancel since they don't accept my password anyway (so, same as for other users). When I leave work and return the next morning I unlock my screen and the monitor goes blank except for a mouse cursor I can still move around.

Whenever this happens I log into the first console CTRL + ALT + F1, login as my regular user and then sudo killall lightdm to restart the Elementary desktop.

skaag commented 5 years ago

I have a brand new install doing this, with no custom sources. They are all the built-in original sources, and when I run apt update I get no warnings whatsoever. There are no missing GPG keys. Unlike some of you, after 24 to 48 hours of sleeping, I wake up to 40~50 dialogs.

If I kill the dialogs (by using pkill -9 -f polkit-agent-helper-1), new dialogs keep popping up. The dialog says authentication is required to refresh the system sources.

The dialog does not accept my password. To resolve this I have to kill the parent process (which is pantheon-agent-polkit).

This is happening with Elementary OS 0.4.1 Loki.

benjaminjack commented 5 years ago

Does anyone know if this problem has persisted in Juno? I switched away from eOS because of this bug, but would return if it’s fixed.

thoni56 commented 5 years ago

If someone at least could give a hint on what "system resources" are actually needing a refresh, that would be a step to my understanding, acceptance and possibly help...

Someone indicated that it was caused by no user "really" logged in, as in computer in hibernate, but once that is fixed then this should resolve itself, right?

riker09 commented 5 years ago

I did a fresh install of Elementary OS 5 Juno this morning and have left my screen locked for a few minutes (up to 20) for a couple of times by now. No password dialogues have appeared since.

skaag commented 5 years ago

@benjaminjack I'm curious which OS you're on right now?

mauritslamers commented 5 years ago

@benjaminjack The problem has seemed to be solved in Juno.

@thoni56 the resources needing refreshing is the package tree (because of possible updates). Manually this is usually updated through apt update, but that requires elevated privileges (such as through sudo). If I have understood the issue correctly, when the screen locks, it effectively seems to drop the current X session to a different user, possibly lightdm. The app center application then tries to update the package tree using the current session user, which is not allowed to do this. The system then pops up an authentication box, requesting the user password. However, because of the different session user at that time, it tries to get the password for the lightdm user which should not exist. For some reason, the process which refreshes the package tree keeps being restarted after some time, as no check seems to be performed whether a previous process is still around, resulting in the never ending torrent of authentication boxes, and an equal amount of popups noticing that the process seems to get stuck and asking if you want to force quit this.

Because every popup takes memory, and more and more keep appearing, the computer is slowly choked to death.

mauritslamers commented 5 years ago

@benjaminjack What also has been solved in Juno (and I think that might be related) is that the power setting which turns off the display no longer also automatically locks the user session (independent of the setting under Security & Privacy about locking).

skaag commented 5 years ago

I can confirm this no longer happens in Juno.

thoni56 commented 5 years ago

thanks, @mauritslamers, for a good explanation, particularly the bit about dropping to lightdm user which explains everything (such as why no password works in that prompt).

maisonhai3 commented 5 years ago

I got exactly the same issue. This should be addressed.

Here my hardware. Ubuntu 19.04, alongside with windows 10 1804 upgraded to 1904. Lenovo Y540 i5 config. Boot secured disable. GPT disk and UEFI boot.

vedgar commented 5 years ago

No, it's not solved in Juno. I installed Juno yesterday, and have the same problem. Every time I log in, "authorization required to refresh repositories". It does accept my password for admin acc though, but I'd rather it didn't appear at all.

sephethus commented 5 years ago

Not solved, I keep seeing this issue and the password to refresh is only accepted if I get to it in time, otherwise it won't accept the password to refresh. It keeps popping up over and over and over. It's annoying. Distributor ID: Ubuntu Description: Ubuntu 19.04 Release: 19.04 Codename: disco

tylerforsythe commented 5 years ago

Same issue here. Ubuntu installed in Hyper-V on Windows 10 through the Hyper-V "Quick Create" "Ubuntu 19.04" option.

sudo apt update does not display any errors.

image

theArties commented 4 years ago

Same issue here. Ubuntu installed in Hyper-V on Windows 10 through the Hyper-V "Quick Create" "Ubuntu 19.04" option.

sudo apt update does not display any errors.

image

I seeing similar issue with the same setup as you.

cassidyjames commented 4 years ago

AppCenter does not support Ubuntu nor a 19.04 base, so I'm not surprised if there are issues trying to run AppCenter there. There could be a conflict with another software center app, the LightDM configuration, PolicyKit configuration, etc. While we'll be working to bring AppCenter to a 20.04 base for the next major release of elementary OS, I'm inclined to mark those comments as off-topic (or open a new, separate issue) so that we can properly track the issue of this happening on elementary OS Juno, the current supported release.

linbyndvk commented 4 years ago

Well at the moment to solve this issue. I have added the useraccount to the "root" group. Ironically in the user accounts section if you see, though your user account is an administrator but you will not be able to unlock the guest account or make any changes. This is definitely some group privileges issue or an policy issue, where the current user, though being an administrator is not allowed access. will dig further on this. Btw this also exist on Hera 5.1

cmcqueen commented 4 years ago

Well at the moment to solve this issue. I have added the useraccount to the "root" group.

I would be concerned about the security consequences of this change, so I wouldn't do that.

mkswebdev commented 4 years ago

Problem is still present in Elementary OS 5.1.6 Hera.