Possible bug in shutdown and restart routine LM19

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
richard-g8jvm
Level 4
Level 4
Posts: 272
Joined: Fri Jul 26, 2013 12:46 pm

Possible bug in shutdown and restart routine LM19

Post by richard-g8jvm »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
gm10

Re: Possible bug in shutdown and restart rountine LM19

Post by gm10 »

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 4
Level 4
Posts: 272
Joined: Fri Jul 26, 2013 12:46 pm

Re: Possible bug in shutdown and restart rountine LM19

Post by richard-g8jvm »

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

Re: Possible bug in shutdown and restart routine LM19

Post by gm10 »

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

Return to “Installation & Boot”