[SOLVED] Shutting down linux 17.3

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

[SOLVED] Shutting down linux 17.3

Post by Howard_P »

I've had good luck posting here so I thought I'd try again... When I first started with Linux 17.2 I was amazed not be able to find a way to shut it down. An internet search led me to find a way to add a shutdown button to the desktop. This worked partially. It takes me out of linux and leaves me with a black screen with the linuxmint logo. After that I have to use the computer's power switch to shut it off. Is there a way to actually shut down the computer with a button? Thanks. -Howard
Last edited by Howard_P on Mon Apr 23, 2018 11:17 am, edited 1 time in total.

Mattyboy
Level 6
Level 6
Posts: 1194
Joined: Thu Mar 26, 2015 2:17 pm

Re: Shutting down linux 17.3

Post by Mattyboy »

The shutdown option should be accessible from your desktop menu button.

'Hard' shutting down by turning the power off will eventually corrupt your file system, avoid doing this.

You can shut the system down from terminal with

Code: Select all

shutdown now

User avatar
jimallyn
Level 18
Level 18
Posts: 8951
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Shutting down linux 17.3

Post by jimallyn »

Of course there is a way to shut down Linux Mint. But it depends upon which desktop environment you are using. Here's the shutdown button Mint 17.3 XFCE, as an example (button in the upper right corner of the menu):
ShutdownInXFCE.jpg
ShutdownInXFCE.jpg (29.99 KiB) Viewed 727 times
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

Hi- Unfortunately neither solutions posted above work...
When I try the "shutdown now" method I get past the black screen with the linuxmint logo to a black screen with the following text (hand copied so there may be a small error):
[OK]
*speach-disporter disabled edit/etc/default/speach-disporter
*Virtual Box Additions disabled, not in a virtual mode
sane disabled; edit/etc/default saned
*restoring resolver state... [OK]

and I, at that point, need to use the power button on the computer to shut it off

using the button that jimallyn pointed out takes me to the screen that gives me several choices incl. log-out, restart, power-off (or perhaps it says quit or something like that). When I click the power-off button I get the black screen with the linuxmint logo and again have to use the computer power-off button.

I created my own power off button that doesn't properly work using a tutorial on this forum. In essence it said:
"Open a Terminal and enter the following command:

sudo chmod u+s /sbin/shutdown

You will be prompted for your root password. After that, you're done and can type "exit" to exit out of the Terminal.

Next, on your Desktop, right-click on empty space somewhere and choose to Create a Launcher. The type will be Application, which is the default, and for the command, enter the following:

shutdown -Ph now"

And it doesn't turn the power off on my Dell Inspiron 3000.
Thanks for all of your help, I do appreciate it. -Howard

Cosmo.
Level 23
Level 23
Posts: 17825
Joined: Sat Dec 06, 2014 7:34 am

Re: Shutting down linux 17.3

Post by Cosmo. »

Howard_P wrote:
Sat Apr 21, 2018 10:58 pm
need to use the power button on the computer to shut it off
Once again: You are going to create problems, which you - hopefully - not yet have.

The cold reset of a hanging computer will sooner or later end in a damaged file system with the consequence of possible data loss.
This is the method to restart an otherwise not reacting computer:
Press and hold the alt key and the print key. Whilst still holding both keys pressed enter those letters one after one with a little break between them: r e i s u b. After the last letter the computer will immediately reboot without risking the file system. You can replace the letter b with the letter o, if you want to shut down instead of rebooting.

At second: It does not bring you further, when we need to make guesses about your system.
What is your version of Mint and what is the desktop environment? Which kernel and which architecture? If you don't know open a terminal and enter:

Code: Select all

inxi -Szxx
Paste the output here.

You need to give this information for every help request in every thread.
Do not forget this in the future.

Howard_P wrote:
Sat Apr 21, 2018 10:58 pm
I created my own power off button that doesn't properly work using a tutorial on this forum. In essence it said:
"Open a Terminal and enter the following command:

sudo chmod u+s /sbin/shutdown
This is a dangerous change. I would like to see a link to this tutorial.

User avatar
kukamuumuka
Level 16
Level 16
Posts: 6328
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Shutting down linux 17.3

Post by kukamuumuka »

If nothing else does not work, there is still couple more trick.

1. Shut down computer using command su -c 'shutdown -h 0 && /sbin/poweroff -d -f -h -i '

2. If that does not work, install xterm and make a script, which forces computer down.

Code: Select all

#! /bin/bash
sync && xterm -e "sudo sync ; sudo systemctl --force --force poweroff"
https://puolanka.info/goto/if-computer- ... -shutdown/

PS. I am not sure what option 2 causes on the long term to the filesystem.

wwfwng
Level 3
Level 3
Posts: 113
Joined: Tue Jul 24, 2012 9:19 pm

Re: Shutting down linux 17.3

Post by wwfwng »

I am also running 17.3. Here is a command that works for me. In the terminal type:

sudo shutdown -P now

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

Hi- this is still a problem. Here is the system information:
howard@howard-Inspiron-11-3147 ~ $ inxi -Szxx
System: Host: howard-Inspiron-11-3147 Kernel: 3.16.0-38-generic x86_64 (64 bit gcc: 4.8.2)
Desktop: Xfce 4.12.2 (Gtk 2.24.23) dm: mdm
Distro: Linux Mint 17.3 Rosa
howard@howard-Inspiron-11-3147 ~ $

sudo shutdown -P now did not work. Nor did: su -c 'shutdown -h 0 && /sbin/poweroff -d -f -h -i '

Cosmo wrote: This is the method to restart an otherwise not reacting computer:
Press and hold the alt key and the print key. Whilst still holding both keys pressed enter those letters one after one with a little break between them: r e i s u b. After the last letter the computer will immediately reboot without risking the file system. You can replace the letter b with the letter o, if you want to shut down instead of rebooting.
By print key did you mean the "print screen key"? There is no plain "print" key on this computer. And by a "a little break" did you mean a break in time or to press the space bar?

administrollaattori suggested to download "xterm" and make a script that forces a shutdown. He/she gave me a couple of lines of code that I imagine creates the script (I don't really know what that means...). I will try this next.

Cosmo asked for the link I used to instruct me in creating a shutdown button. Here it is: https://community.linuxmint.com/tutorial/view/1113

Once again thanks to everyone trying to help. -Howard

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Shutting down linux 17.3

Post by Sir Charles »

administrollaattori wrote:
Sun Apr 22, 2018 5:46 am
2. If that does not work, install xterm and make a script, which forces computer down.

Code: Select all

#! /bin/bash
sync && xterm -e "sudo sync ; sudo systemctl --force --force poweroff"
PS. I am not sure what option 2 causes on the long term to the filesystem.
poweroff

If combined with --force,
shutdown of all running services is skipped, however all processes
are killed
and all file systems are unmounted or mounted read-only,
immediately followed by the powering off.

If --force is specified twice
the operation is immediately executed without terminating any processes or unmounting any file systems. This may result in data loss.
source:man systemctl
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

User avatar
powerwagon75
Level 4
Level 4
Posts: 242
Joined: Sun Feb 28, 2016 4:05 pm
Location: USA

Re: Shutting down linux 17.3

Post by powerwagon75 »

Howard_P wrote:
Sat Apr 21, 2018 10:58 pm
....[OK]
*speach-disporter disabled edit/etc/default/speach-disporter
*Virtual Box Additions disabled, not in a virtual mode
sane disabled; edit/etc/default saned
*restoring resolver state...
[OK]
......
Howard,

I have an old HP laptop, that was giving me pretty much the same hang once, but at boot up, instead of shutdown.
image2.JPG
I researched for a fix longer than I should have, and since it is more or less my experimental machine, I eventually purged & reinstalled Cinnamon. Problem was resolved after that.

Just a thought, of course up to you to decide if you want to try at your own risk. (in application, it shouldn't mess up anything, and all should work as before.) Don't know if it will fix your power-off issue, but can try and see.

Eric

<edit> Apologies...failed to realize earlier you are running xfce.
Last edited by powerwagon75 on Sun Apr 22, 2018 9:54 pm, edited 1 time in total.
Image
Custom tower w/Mint 18
HP laptop w/Mint 18
Acer w/W10/Mint 18.3
Macbook w/El Capitan/Mint 18.3
Optiplex 960 "Frankenbox" w/Fedora 30/Mint 18.3/Mint 19.1
Acer C720 Chromebook w/GalliumOS
Mac PPC G4 w/Lubuntu

Cosmo.
Level 23
Level 23
Posts: 17825
Joined: Sat Dec 06, 2014 7:34 am

Re: Shutting down linux 17.3

Post by Cosmo. »

Howard_P wrote:
Sun Apr 22, 2018 11:22 am
By print key did you mean the "print screen key"? There is no plain "print" key on this computer.
Yes, I mean this key. See also this picture, the third key from right in the top row. On my German keyboard it is named simply with (translated) "Print".

https://en.wikipedia.org/wiki/Template:Keyboard
And by a "a little break" did you mean a break in time or to press the space bar?[/quote]
Break in time. A second is enough.

Thank you for the link. Very indirectly it makes clear, that a system process shall get started with the permissions of the user, not of the file owner. This is a security leak.

As you have xfce the picture by jimallyn should be the quick solution for you.

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

Thanks Cosmo, yes, the picture that jimallyn posted should be a solution, but it isn't. It takes me to a "log out" screen that gives me a number of choices. The "shut down" option does not power down the computer... However, the method you suggested above "This is the method to restart an otherwise not reacting computer:
Press and hold the alt key and the print key. Whilst still holding both keys pressed enter those letters one after one with a little break between them: r e i s u b. After the last letter the computer will immediately reboot without risking the file system. You can replace the letter b with the letter o, if you want to shut down instead of rebooting" does shut down the computer! Now, is there a way to automate that process? While it works, it is a bit clumsy...
-Howard

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Shutting down linux 17.3

Post by Sir Charles »

Hi Howard,
Have you already tried systemctl poweroff orsystemctl --force poweroff in a terminal to see if either will shutdown the system? If they do, you can make a custom shortcuts to easily shutdown the system with a key combination.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

Neither command seems to work at all. systemctl is not recognized...

howard@howard-Inspiron-11-3147 ~ $ systemctl poweroff
systemctl: command not found
howard@howard-Inspiron-11-3147 ~ $

Any thoughts? Thanks.
Howard

User avatar
Sir Charles
Level 7
Level 7
Posts: 1897
Joined: Thu Jan 04, 2018 1:00 pm

Re: Shutting down linux 17.3

Post by Sir Charles »

I am sorry, I realized after I posted that you are using 17.3 based on Ubuntu 14.04 which doesn't use systemd. So systemctl won't work.
I suppose that's one of the ironies of life, doing the wrong thing at the right moment -C.C.

Cosmo.
Level 23
Level 23
Posts: 17825
Joined: Sat Dec 06, 2014 7:34 am

Re: Shutting down linux 17.3

Post by Cosmo. »

Did the problem exist since day 1 after installing 17.3?

Besides that: You use kernel 3.16, which is since some time out of support and makes your system vulnerable, so you should change this. Install kernel 4.4.latest and see, if this helps.

User avatar
kukamuumuka
Level 16
Level 16
Posts: 6328
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Shutting down linux 17.3

Post by kukamuumuka »

A reason for not shutting down can be a wrong display driver, so it would be good to know command inxi -Fxzo output.

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

Hi-
Here is the output from inxi-Fxzo :
howard@howard-Inspiron-11-3147 ~ $ inxi -Fxzo
System: Host: howard-Inspiron-11-3147 Kernel: 3.16.0-38-generic x86_64 (64 bit gcc: 4.8.2)
Desktop: Xfce 4.12.2 (Gtk 2.24.23) Distro: Linux Mint 17.3 Rosa
Machine: System: Dell product: Inspiron 11 - 3147
Mobo: Dell model: 0VWN94 v: A00 Bios: Dell v: A02 date: 08/19/2014
CPU: Dual core Intel Celeron N2830 (-MCP-) cache: 1024 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 8652
clock speeds: max: 2415 MHz 1: 499 MHz 2: 499 MHz
Graphics: Card: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display
bus-ID: 00:02.0
Display Server: X.Org 1.15.1 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1366x768@59.4hz
GLX Renderer: Mesa DRI Intel Bay Trail
GLX Version: 3.0 Mesa 10.1.3 Direct Rendering: Yes
Audio: Card Intel Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k3.16.0-38-generic
Network: Card-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter
driver: ath9k bus-ID: 01:00.0
IF: wlan0 state: up mac: <filter>
Card-2: Atheros usb-ID: 001-008
IF: N/A state: N/A speed: N/A duplex: N/A mac: N/A
Drives: HDD Total Size: 500.1GB (54.5% used)
ID-1: /dev/sda model: TOSHIBA_MQ01ABF0 size: 500.1GB
Partition: ID-1: / size: 454G used: 250G (59%) fs: ext4 dev: /dev/dm-0
ID-2: /boot size: 237M used: 50M (23%) fs: ext2 dev: /dev/sda2
ID-3: swap-1 size: 4.17GB used: 0.00GB (0%) fs: swap dev: /dev/dm-1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Unmounted: ID-1: /dev/sda3 size: 499.31G label: N/A uuid: N/A
Sensors: System Temperatures: cpu: 38.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 185 Uptime: 3 min Memory: 755.7/3836.5MB
Init: Upstart runlevel: 2 Gcc sys: 4.8.4
Client: Shell (bash 4.3.111) inxi: 2.2.28
howard@howard-Inspiron-11-3147 ~ $

The latest kernel on the update manager is 4.4.0-lts-1 is that what I should use? I've been anxious about doing this, is that a reasonable anxiety or is this safe to do?

For the millionth time thanks to all who are trying to help. -Howard

Cosmo.
Level 23
Level 23
Posts: 17825
Joined: Sat Dec 06, 2014 7:34 am

Re: Shutting down linux 17.3

Post by Cosmo. »

The latest kernel of this series is currently 4.4.0-119. Open the update manager -> view menu -> Linux Kernel.

If there should really be a serious problem with this kernel, you are not stuck. If this should happen, press and hold immediately after powering on the shift-key, until you see the grub menu. From there you can select from a sub-menu the older 3.16 kernel.

I asked you when the problem appeared at first. I will rephrase it a little bit. I believe, that this system was originally installed with 17.2 and you later upgraded it. Is this correct? Did the problem already exist on day 1 of the LM 17.2 installation?

Howard_P
Level 3
Level 3
Posts: 158
Joined: Wed Apr 11, 2018 11:03 pm
Location: California, US

Re: Shutting down linux 17.3

Post by Howard_P »

I'm sorry that I neglected to answer the question about when the problem first appeared. It appeared immediately when I switched over from windows to linux. 17.2 was the first linux I used. Thanks.

Post Reply

Return to “Newbie Questions”