Ubuntu 16 cannot suspend and shutdown properly (Nvidia driver issue)

Environment: i56300-HQ + GTX950M
Ubuntu 16.04 64Bit

When using ubuntu, the notebook often fails to shut down and suspend normally. The main performance is that the power button is still on after closing the screen, and there is no response to any operation. You can only press and hold the power button to force shutdown.

At first I thought it was because the laptop-mode was not turned on, but after following the tutorial, there was still no change. Later, I thought it was a problem with the graphics card according to the fan spinning wildly.

1、sudo apt-get install pm-utils

2. Whether the laptop-mode-tools toolkit is installed, you can enter the following command in the terminal to confirm whether it is installed.
  dpkg -l | grep laptop-mode-tools
  If there is no result output after executing the command on your computer, it means that it is not installed, then you can install it through the following command.
  sudo apt-get install laptop-mode-tools
  Although the system has automatically installed laptop-mode-tools, does it automatically start the laptop_mode mode? We use the following command to determine whether the laptop_mode is enabled. If the displayed result is 0, it means that it is not started. If it is not A number of 0 means it is enabled.
  cat /proc/sys/vm/laptop_mode

3、修改laptop-mode配置文件
`sudo gedit /etc/laptop-mode/laptop-mode.conf`

To modify the opened file is to change the two places with 0 to 1, and save it.

#
#Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1

#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=1

#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1

Generally, it should be able to solve it
, but later found that it was not solved, the hang is still abnormal, or can only be forced to shut down, I feel that it may be a problem with the graphics card, so I tried to install a new driver according to the following tutorial, and found that it can be closed and hung normally get up

Install Nvidia driver

  1. Find the right driver and go to nvidia official website to download the latest driver.

  2. Uninstall the original driver
    sudo apt-get remove –purge nvidia*

  3. disable nouveau

Open the configuration file for editing:
/etc/modprobe.d/blacklist.conf

Add in the last line:
blacklist nouveau
This is to disable the nouveau third-party driver, and there is no need to change it back later

4. Execute:
sudo update-initramfs -u

5. Execute after reboot:

lsmod | grep nouveau

If there is no output, it is shielded

6. Disable X service
execution :
sudo /etc/init.d/lightdm stop

7. Install the driver
Enter the command line interface
Ctrl-Alt+F1

Grant execution permission to the driver run file
sudo chmod a+x NVIDIA-Linux-x86_64-375.20.run

Installation (note the parameters)
sudo ./NVIDIA-Linux-x86_64-375.20.run –no-opengl-files

--no-opengl-files Only install the driver files, not the OpenGL files. This parameter is the most important
– no-x-check does not check the X service when installing the driver
– no-nouveau-check does not check nouveau when installing the driver.
The latter two parameters can be omitted.

The computer should then suspend and shut down normally.

Guess you like

Origin blog.csdn.net/inghoG/article/details/82721087