1

I am fairly new to Linux/Ubuntu, and I installed Xubuntu 15.10 on my Windows 10 64-bit PC last week so I can dual-boot. To shut down my computer in Xubuntu, I have to click on "Shut Down" twice before the computer actually powers off. The first time I click it, nothing appears to happen. The second time I click it, Xubuntu shuts down correctly. Is there a way to fix this so I only have to click once?

My specs:

Lenovo Z50-70

  • 8GM DDR3 RAM
  • 1TB HDD
  • Intel Core i7-4510U
  • NVIDIA GeForce 840M

1 Answers1

0
  • If you're using Light Locker, go to the Control Panel and disable it.

  • Afterwards, please run this shell command in order to force a system reboot:

    sudo telinit 6
    

    Note: The command above needs to be run even if you're not using Light Locker.

  • After restarting your computer, does the problem happen again? Test your system a few times. If the problem persists, open /etc/default/grub for editing by running the following command:

    sudo gedit /etc/default/grub
    

    Note: If you don't have Gedit, install it by running this command:

    sudo apt-get install gedit
    
  • The contents of your /etc/default/grub file will look similar to what we see below, except that you'll have to turn GRUB_CMDLINE_LINUX= into GRUB_CMDLINE_LINUX="acpi=force":

    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    

    GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT="10" GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="acpi=force"

    Uncomment to disable graphical terminal (grub-pc only)

    #GRUB_TERMINAL=console

  • Now run this command in order to update GRUB and force a system restart:

    sudo update-grub && sudo telinit 6
    

If the problem still persists, click "Shut Down" only once, then run the following commands and paste their output here:

dmesg
uname -a
  • Thanks Yuri; I had to edit the grub file and update Grub as you described, but I think that did the trick. I restarted Xubuntu five or six times just to make sure, and I haven't had any problems so far. – sixstring Nov 16 '15 at 21:05
  • You're welcome. Glad to hear your problem is solved. If you wish, in XUbuntu you can go to the keyboard settings and define a shortcut for "telinit 6" (forced restart). In XUbuntu/Xfce, you can access the keyboard settings by type-searching "keyboard" at the whisker menu. In the shell terminal window, the respective command is xfce4-keyboard-settings, then go to the "Application shortcuts" tab, hit the "Add" button, type the command gksu telinit 6, click the "OK" button, then hit a key combo of your choice (e.g. hold the keys Ctrl, Alt and Backspace) and it's done. – Yuri Sucupira Nov 16 '15 at 22:30
  • Okay, I may do that. Do you know if there's a way I can still suspend my session/be required to sign back in if I close the laptop lid? Or will I have to manually log out before I close the lid? – sixstring Nov 17 '15 at 21:42
  • Fully install Xscreensaver (sudo apt-get install xscreensaver xscreensaver-data xscreensaver-data-extra xscreensaver-gl xscreensaver-gl-extra), then go to the Xfce Control Panel (xfce4-settings-manager), open the Screen Saver preferences and click the Advanced tab. At the top right corner you'll find some power management preferences. Xscreensaver has some very neat screensavers, too: check out Abstractile, AntInspect, BoxFit, Fireworkx, FluidBalls, GLMatrix, GLSchool, GLText, Intermomentary, Juggler3D, Molecule, Pyro, SpeedMine, Squiral, Substrate, Tangram, Vermiculate, Wormhole... – Yuri Sucupira Nov 17 '15 at 22:14
  • Oh, I forgot to mention how to deal with the notebook lid. Well: open the Xfce Control Panel, then access the Power Manager (from the terminal: xfce4-power-manager-settings). You'll find plenty of options (Suspend, Hibernate etc.). – Yuri Sucupira Nov 17 '15 at 23:42
  • This did not work for my Xubuntu 19.10 which was demonstrating the same issue as the OP. Issue continues. The upgrade to 19.10 introduced the issue – Norman Bird Nov 30 '19 at 00:15
  • @NormanBird This is likely a new bug or (less likely) a previous bug that was reintroduced during the latest system (kernel and drivers) upgrades. My answer above applied to former Ubuntu 15.10 and I'm currently using the 64-bit XUbuntu version 16.04.6 (I've not migrated to any recent version yet). In a nutshell: it's recommended that you add a new question reporting this issue, because it's more likely that some of the linuxists using the same version (19.10) of *Ubuntu has already found a solution or maybe a workaround. – Yuri Sucupira Nov 30 '19 at 22:11
  • @NormanBird You may want to try using acpi=off instead of acpi=force in the GRUB config file (don't forget to run sudo update-grub afterwards and then reboot), in order to check if the issue that you're experiencing is ACPI-related: if by turning ACPI off you still experience this problem, then ACPI is not the root cause. I'm currently using kernel version 4.14.14-041414-generic, which does not have this bug: you may want to try different kernels as explained at https://askubuntu.com/a/142000/389062 (see also https://wiki.ubuntu.com/Kernel/MainlineBuilds). – Yuri Sucupira Nov 30 '19 at 22:51