Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread Yvan Masson



Le 23/04/2021 à 21:07, Yvan Masson a écrit :

Le 23/04/2021 à 20:18, didier gaumet a écrit :


1) Unattended-upgrade at shutdown and after Lightdm is stopped: Perhaps 



a solution would be to :
- stop and disable the unattended-upgrade systemd service
- edit the unattended-upgrades config file to setup the shutdown to false
- write/enable/start your custom systemd service that runs 
/usr/bin/unattented-upgrade only after shutdown has been asked and the 



lightdm systemd service has been stopped


It might work, but I have doubt about my ability to do this properly to 


get reliable updates… I am sure this has already worked for me (in 
previous Debian or Ubuntu, can't remember), certainly with a very 
similar configuration. I have just compared the contents of the package 


from Ubuntu but could not find any notable difference. I will submit a 
bug report so that appropriate people are aware of this.


Done here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987431




2) unattended-upgrades notifications while Plymouth is running: I do 
not read Python but trying to understand this python script, I have 
the impression that Plymouth does notify the user that 
unattended-upgrédes is running


You are right, I should have clarify this in my previous answer: I have 


already seen this working (as I said i can't remember if it was in a 
previous Debian or Ubuntu).



Good luck ;-)


Thanks!





OpenPGP_signature
Description: OpenPGP digital signature


Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread Yvan Masson

Le 23/04/2021 à 20:18, didier gaumet a écrit :


1) Unattended-upgrade at shutdown and after Lightdm is stopped: Perhaps 



a solution would be to :
- stop and disable the unattended-upgrade systemd service
- edit the unattended-upgrades config file to setup the shutdown to false
- write/enable/start your custom systemd service that runs 
/usr/bin/unattented-upgrade only after shutdown has been asked and the 
lightdm systemd service has been stopped


It might work, but I have doubt about my ability to do this properly to 
get reliable updates… I am sure this has already worked for me (in 
previous Debian or Ubuntu, can't remember), certainly with a very 
similar configuration. I have just compared the contents of the package 
from Ubuntu but could not find any notable difference. I will submit a 
bug report so that appropriate people are aware of this.




2) unattended-upgrades notifications while Plymouth is running: I do not 
read Python but trying to understand this python script, I have the 
impression that Plymouth does notify the user that unattended-upgrédes 
is running


You are right, I should have clarify this in my previous answer: I have 
already seen this working (as I said i can't remember if it was in a 
previous Debian or Ubuntu).



Good luck ;-)


Thanks!



OpenPGP_signature
Description: OpenPGP digital signature


Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread didier gaumet



1) Unattended-upgrade at shutdown and after Lightdm is stopped: Perhaps 
a solution would be to :

- stop and disable the unattended-upgrade systemd service
- edit the unattended-upgrades config file to setup the shutdown to false
- write/enable/start your custom systemd service that runs 
/usr/bin/unattented-upgrade only after shutdown has been asked and the 
lightdm systemd service has been stopped


2) unattended-upgrades notifications while Plymouth is running: I do not 
read Python but trying to understand this python script, I have the 
impression that Plymouth does notify the user that unattended-upgrédes 
is running


Good luck ;-)



Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread Yvan Masson

Le 23/04/2021 à 12:14, didier gaumet a écrit :

Le 23/04/2021 à 11:59, didier gaumet a écrit :

I should check what I wrote before posting :-(

[...]

Disclaimer: I have never experimented myself whait I suggest


"what"

[...]
As for Plymouth notifying about ugrades during shutdown, if it is not 
already the case (when unattended-upgrades the 


A bit is missing there (cut/past and absent-minded poster): ..." systemd 
service is started after the LightDM systemd service is stopped), it is 



perhaps possible to modify the "...

unattended-upgrades.service systemd service to script Plymouth, or 
more simply, setup Plymouth to be more informative

http://blog.fpmurphy.com/2009/09/project-plymouth.html


Thanks Didier for your answer, it looked promising. Unfortunately I 
suppose it is not the way to go: unattended-upgrades.service starts 
`/usr/share/unattended-upgrades/unattended-upgrade-shutdown` at boot, 
which waits for "a signal". (I suppose from reading the code that it 
listen on dbus something related to systemd-logind, but my skills 
prevent me from going further). Anyway, in my case it starts properly, 
but it just prevents the session/LightDM from stopping. If no other 
idea, I suppose I should submit a bug report?


Regards,
Yvan



OpenPGP_signature
Description: OpenPGP digital signature


Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread didier gaumet

Le 23/04/2021 à 11:59, didier gaumet a écrit :

I should check what I wrote before posting :-(

[...]

Disclaimer: I have never experimented myself whait I suggest


"what"

[...]
As for Plymouth notifying about ugrades during shutdown, if it is not 
already the case (when unattended-upgrades the 


A bit is missing there (cut/past and absent-minded poster): ..." systemd 
service is started after the LightDM systemd service is stopped), it is 
perhaps possible to modify the "...


unattended-upgrades.service systemd service to script Plymouth, or more 
simply, setup Plymouth to be more informative

http://blog.fpmurphy.com/2009/09/project-plymouth.html





Re: Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread didier gaumet

Le 23/04/2021 à 09:48, Yvan Masson a écrit :
[...]
I would expect the session to be completely closed, LightDM stopped, and 
the console or Plymouth displaying a message indicating the ongoing 
updates.

[...]

Hello,

Disclaimer: I have never experimented myself whait I suggest

Perhaps adapting the unattended-upgrades.service systemd service by 
declaring that the lightdm service is to be stopped before this service 
is started would do.


As for Plymouth notifying about ugrades during shutdown, if it is not 
already the case (when unattended-upgrades the 
unattended-upgrades.service systemd service to script Plymouth, or more 
simply, setup Plymouth to be more informative

http://blog.fpmurphy.com/2009/09/project-plymouth.html



Graphical session does not close until unattended-upgrades has applied all updates

2021-04-23 Thread Yvan Masson

Hi list,

I am preparing some Debian 11 desktops for a school (for when it will be 
the new stable). The setup is very simple: no root account, one 
partition, tasks desktop/Cinnamon/SSH. Unattended-upgrades is configured 
to install updates on shutdown (see 1): upgrading works properly, but is 
very disturbing for the users:


When the user chooses to shutdown or reboot the computer from his 
Cinnamon session, the session does not close until all updates are 
applied. While waiting:

- icons on the desktop disappear
- the usual menu that allows choosing between 
suspend/hibernate/reboot/cancel/shutdown won't appear again (see 2)

- it is still possible to start applications

When a user session has been opened, then closed, and the user clicks on 
shutdown or reboot from LightDM, the behavior is similar: LightDM does 
not stop. It is even possible to log in again, while unattended-upgrades 
is applying updates, but when updates are applied the computer 
shutdowns/reboots as requested originally from LightDM.


I would expect the session to be completely closed, LightDM stopped, and 
the console or Plymouth displaying a message indicating the ongoing 
updates. I am almost sure this works like this on Ubuntu, with the same 
setup from me. Where should I look to solve this? Should I report a bug, 
and on which package?


Regards,
Yvan


1. Here are the files I create to configure unattended-upgrades:
$ cat /etc/apt/apt.conf.d/21periodic
  APT::Periodic::Unattended-Upgrade "1";
  APT::Periodic::CleanInterval "1";

$ cat /etc/apt/apt.conf.d/51unattended-upgrades-local
Unattended-Upgrade::Origins-Pattern {
  "origin=Debian,codename=bullseye,label=Debian";
  "origin=Debian,codename=bullseye,label=Debian-Security";
  "origin=Debian,codename=bullseye-updates,label=Debian";
};
Unattended-Upgrade::Mail "root";
nattended-Upgrade::InstallOnShutdown "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "false";

$ cat /etc/systemd/logind.conf.d/unattended-upgrades.conf
[Login]
# 30 minutes delay
InhibitDelayMaxSec=1800


2. This matches the following error in ~/.xsession-errors:
Cjs-message: 09:26:35.004: JS LOG: Ignored exception from dbus method: 
GIO.IOErrorEnum: GDBus:Error:org.gnome.SessionManager.NotInRunning: 
Shutdown interface is only available during the Running phase




OpenPGP_signature
Description: OpenPGP digital signature