Possible bug in shutdown and restart routine LM19

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
richard-g8jvm
Level 3
Level 3
Posts: 122
Joined: Fri Jul 26, 2013 12:46 pm

Possible bug in shutdown and restart routine LM19

Post by richard-g8jvm » Wed Aug 15, 2018 10:52 am

Hi
before flaming this does effect booting

I think I have found a bug in the restart and shut down routines in LM19.
This was after a solution to the problem I've been having with booting up an installed LM19 system
If I shutdown or restart while logged in , the next bootup fails, and I have to powerdown before it boots up.

If I logout and shutdown or restart from the login screen, the next boot up works OK

This machine is fast , CPU AMD5 2400G, Asus b450-1 Mobo and 240GB SSD

Code: Select all

sudo hdparm -T /dev/sda 

/dev/sda:
 Timing cached reads:   22110 MB in  2.00 seconds = 11068.93 MB/sec

and for this laptop :_

Code: Select all

/dev/sda:
 Timing cached reads:   1996 MB in  2.00 seconds = 999.02 MB/sec

What a differnce a few years make .
I just tried this to see if I could make a user allow shutdown

Code: Select all

richard@richard-MS-7A40:~$ sudo chmod 777 /sbin/shutdown
richard@richard-MS-7A40:~$ shutdown -h now
Failed to set wall message, ignoring: Interactive authentication required.
Failed to power off system via logind: Interactive authentication required.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.



So it looks like /sbin/shutdown does try to logout first
If this is agreed to be a bug, where does it need filing as LM uses ubuntu libs ect ????
Tia
Richard

gm10
Level 12
Level 12
Posts: 4180
Joined: Thu Jun 21, 2018 5:11 pm

Re: Possible bug in shutdown and restart rountine LM19

Post by gm10 » Wed Aug 15, 2018 12:09 pm

I would suggest a clean install.

By default, LM19 has permissions for shutdown set correctly, it does not need any modified permissions or privileges to run, any user can shut the system down from an active local session.

/sbin/shutdown just links to systemctl poweroff, by the way.
Last edited by gm10 on Wed Aug 15, 2018 12:34 pm, edited 1 time in total.

richard-g8jvm
Level 3
Level 3
Posts: 122
Joined: Fri Jul 26, 2013 12:46 pm

Re: Possible bug in shutdown and restart rountine LM19

Post by richard-g8jvm » Wed Aug 15, 2018 12:21 pm

Hi
I disagree
try logging in remotely and running shutdown -h or shutdown -r

gm10
Level 12
Level 12
Posts: 4180
Joined: Thu Jun 21, 2018 5:11 pm

Re: Possible bug in shutdown and restart routine LM19

Post by gm10 » Wed Aug 15, 2018 12:34 pm

The polkit exception is only for local sessions. For remote shutdowns you need to prefix sudo or change the policy. That's intentional.

Post Reply

Return to “Installation & Boot”