I use ubuntu 16.04 on a lenovo legion. When i try to swich it off, the computer hangs and I have to keep the power botton pressed.
EDIT The exact laptop model is Y520-15IKBN
output of uname -a
:
Linux mattia-Y520-15IKBN 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
output of sudo lshw
:
mattia-y520-15ikbn
description: Notebook
product: 80WK (LENOVO_MT_80WK_BU_idea_FM_)
vendor: LENOVO
version: Y520-15IKBN
serial: PF0X5Z8T
width: 64 bits
capabilities: smbios-3.0 dmi-3.0 vsyscall32
configuration: administrator_password=disabled boot=normal chassis=notebook family=IDEAPAD frontpanel_password=disabled keyboard_password=disabled power-on_password=disabled sku=LENOVO_MT_80WK_BU_idea_FM_ uuid=EDDD3B2B-C6E6-E711-8A95-54E1ADFDF15C
*-core
description: Motherboard
product: VIUU4
vendor: LENOVO
physical id: 0
version: SDK0K17763 WIN
serial: PF0X5Z8T
slot: Type2 - Board Chassis Location
*-firmware
description: BIOS
vendor: LENOVO
physical id: 0
version: 4KCN40WW
date: 10/17/2017
size: 128KiB
capacity: 6080KiB
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
*-cpu
description: CPU
product: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
serial: To Be Filled By O.E.M.
slot: U3E1
size: 2858MHz
capacity: 4005MHz
width: 64 bits
clock: 100MHz
capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti retpoline intel_pt rsb_ctxsw spec_ctrl tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp cpufreq
configuration: cores=4 enabledcores=4 threads=8
*-cache:0
description: L1 cache
physical id: 5
slot: L1 Cache
size: 256KiB
capacity: 256KiB
capabilities: synchronous internal write-back unified
configuration: level=1
*-cache:1
description: L2 cache
physical id: 6
slot: L2 Cache
size: 1MiB
capacity: 1MiB
capabilities: synchronous internal write-back unified
configuration: level=2
*-cache:2
description: L3 cache
physical id: 7
slot: L3 Cache
size: 6MiB
capacity: 6MiB
capabilities: synchronous internal write-back unified
configuration: level=3
*-memory
description: System Memory
physical id: 24
slot: System board or motherboard
size: 8GiB
*-bank:0
description: [empty]
physical id: 0
slot: ChannelA-DIMM0
*-bank:1
description: SODIMM Synchronous 2400 MHz (0,4 ns)
product: RMSA3260MH78HAF-2666
vendor: Ramaxel
physical id: 1
serial: 1244E02E
slot: ChannelB-DIMM0
size: 8GiB
width: 64 bits
clock: 2400MHz (0.4ns)
*-pci
description: Host bridge
product: Intel Corporation
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 05
width: 32 bits
clock: 33MHz
*-pci:0
description: PCI bridge
product: Sky Lake PCIe Controller (x16)
vendor: Intel Corporation
physical id: 1
bus info: pci@0000:00:01.0
version: 05
width: 32 bits
clock: 33MHz
capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:122 ioport:4000(size=4096) memory:a3000000-a3ffffff ioport:90000000(size=301989888)
*-display
description: 3D controller
product: NVIDIA Corporation
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=nouveau latency=0
resources: irq:321 memory:a3000000-a3ffffff memory:90000000-9fffffff memory:a0000000-a1ffffff ioport:4000(size=128)
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:322 memory:a2000000-a2ffffff memory:b0000000-bfffffff ioport:5000(size=64) memory:c0000-dffff
*-usb
description: USB controller
product: Sunrise Point-H USB 3.0 xHCI Controller
vendor: Intel Corporation
physical id: 14
bus info: pci@0000:00:14.0
version: 31
width: 64 bits
clock: 33MHz
capabilities: pm msi xhci bus_master cap_list
configuration: driver=xhci_hcd latency=0
resources: irq:126 memory:a4390000-a439ffff
*-usbhost:0
product: xHCI Host Controller
vendor: Linux 4.13.0-43-generic xhci-hcd
physical id: 0
bus info: usb@1
logical name: usb1
version: 4.13
capabilities: usb-2.00
configuration: driver=hub slots=16 speed=480Mbit/s
*-usb:0
description: Keyboard
product: HP Link-5 micro dongle
vendor: HP
physical id: 2
bus info: usb@1:2
version: 3.21
capabilities: usb-2.00
configuration: driver=usbhid maxpower=100mA speed=12Mbit/s
*-usb:1
description: Video
product: EasyCamera
vendor: Bison
physical id: 6
bus info: usb@1:6
version: 53.18
serial: 151027
capabilities: usb-2.00
configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
*-usb:2
description: Bluetooth wireless interface
vendor: Intel Corp.
physical id: b
bus info: usb@1:b
version: 0.01
capabilities: bluetooth usb-2.00
configuration: driver=btusb maxpower=100mA speed=12Mbit/s
*-usbhost:1
product: xHCI Host Controller
vendor: Linux 4.13.0-43-generic xhci-hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 4.13
capabilities: usb-3.00
configuration: driver=hub slots=8 speed=5000Mbit/s
*-generic
description: Signal processing controller
product: Sunrise Point-H Thermal subsystem
vendor: Intel Corporation
physical id: 14.2
bus info: pci@0000:00:14.2
version: 31
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=intel_pch_thermal latency=0
resources: irq:18 memory:a43b0000-a43b0fff
*-communication
description: Communication controller
product: Sunrise Point-H CSME HECI #1
vendor: Intel Corporation
physical id: 16
bus info: pci@0000:00:16.0
version: 31
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=mei_me latency=0
resources: irq:323 memory:a43b1000-a43b1fff
*-storage
description: RAID bus controller
product: 82801 Mobile SATA Controller [RAID mode]
vendor: Intel Corporation
physical id: 17
bus info: pci@0000:00:17.0
version: 31
width: 32 bits
clock: 66MHz
capabilities: storage msi pm bus_master cap_list
configuration: driver=ahci latency=0
resources: irq:319 memory:a43a0000-a43a7fff memory:a43b3000-a43b30ff ioport:5080(size=8) ioport:5088(size=4) ioport:5060(size=32) memory:a4300000-a437ffff
*-pci:1
description: PCI bridge
product: Sunrise Point-H PCI Express Root Port #2
vendor: Intel Corporation
physical id: 1c
bus info: pci@0000:00:1c.0
version: f1
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:123 memory:a4200000-a42fffff
*-generic
description: SD Host controller
product: O2 Micro, Inc.
vendor: O2 Micro, Inc.
physical id: 0
bus info: pci@0000:02:00.0
version: 01
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=sdhci-pci latency=0
resources: irq:17 memory:a4201000-a4201fff memory:a4200000-a42007ff
*-pci:2
description: PCI bridge
product: Sunrise Point-H PCI Express Root Port #3
vendor: Intel Corporation
physical id: 1c.2
bus info: pci@0000:00:1c.2
version: f1
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:124 memory:a4100000-a41fffff
*-network
description: Wireless interface
product: Intel Corporation
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlp3s0
version: 99
serial: cc:2f:71:e2:be:5e
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=4.13.0-43-generic firmware=29.610311.0 ip=192.168.1.100 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:324 memory:a4100000-a4101fff
*-pci:3
description: PCI bridge
product: Sunrise Point-H PCI Express Root Port #4
vendor: Intel Corporation
physical id: 1c.3
bus info: pci@0000:00:1c.3
version: f1
width: 32 bits
clock: 33MHz
capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
configuration: driver=pcieport
resources: irq:125 ioport:3000(size=4096) memory:a4000000-a40fffff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
logical name: enp4s0
version: 10
serial: 54:e1:ad:fd:f1:5c
size: 10Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:320 ioport:3000(size=256) memory:a4004000-a4004fff memory:a4000000-a4003fff
*-isa
description: ISA bridge
product: Sunrise Point-H LPC Controller
vendor: Intel Corporation
physical id: 1f
bus info: pci@0000:00:1f.0
version: 31
width: 32 bits
clock: 33MHz
capabilities: isa bus_master
configuration: latency=0
*-memory UNCLAIMED
description: Memory controller
product: Sunrise Point-H PMC
vendor: Intel Corporation
physical id: 1f.2
bus info: pci@0000:00:1f.2
version: 31
width: 32 bits
clock: 33MHz (30.3ns)
capabilities: bus_master
configuration: latency=0
resources: memory:a43ac000-a43affff
*-multimedia
description: Audio device
product: Intel Corporation
vendor: Intel Corporation
physical id: 1f.3
bus info: pci@0000:00:1f.3
version: 31
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=snd_hda_intel latency=32
resources: irq:325 memory:a43a8000-a43abfff memory:a4380000-a438ffff
*-serial UNCLAIMED
description: SMBus
product: Sunrise Point-H SMBus
vendor: Intel Corporation
physical id: 1f.4
bus info: pci@0000:00:1f.4
version: 31
width: 64 bits
clock: 33MHz
configuration: latency=0
resources: memory:a43b2000-a43b20ff ioport:5040(size=32)
*-scsi
physical id: 1
logical name: scsi2
capabilities: emulated
*-disk
description: ATA Disk
product: ST1000LM035-1RK1
vendor: Seagate
physical id: 0.0.0
bus info: scsi@2:0.0.0
logical name: /dev/sda
version: LCM2
serial: WDEG5PGM
size: 931GiB (1TB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=71d06c57-c367-4333-a303-4ba35003c4b5 logicalsectorsize=512 sectorsize=4096
*-volume:0 UNCLAIMED
description: Windows FAT volume
vendor: MSDOS5.0
physical id: 1
bus info: scsi@2:0.0.0,1
version: FAT32
serial: b4d2-7b1e
size: 255MiB
capacity: 259MiB
capabilities: boot fat initialized
configuration: FATs=2 filesystem=fat label=SYSTEM_DRV name=EFI system partition
*-volume:1
description: reserved partition
vendor: Windows
physical id: 2
bus info: scsi@2:0.0.0,2
logical name: /dev/sda2
serial: 739aa166-e274-4905-b560-c3323e98f10d
capacity: 15MiB
capabilities: nofs
configuration: name=Microsoft reserved partition
*-volume:2
description: Windows NTFS volume
vendor: Windows
physical id: 3
bus info: scsi@2:0.0.0,3
logical name: /dev/sda3
version: 3.1
serial: f6f56815-c2e1-ed4a-bb75-a894d21393ed
size: 782GiB
capacity: 782GiB
capabilities: ntfs initialized
configuration: clustersize=4096 created=2018-03-30 05:40:18 filesystem=ntfs label=Windows name=Basic data partition state=clean
*-volume:3
description: Windows NTFS volume
vendor: Windows
physical id: 4
bus info: scsi@2:0.0.0,4
logical name: /dev/sda4
version: 3.1
serial: aa8f22cb-a416-1444-bf1a-9ab31e90c02e
size: 24GiB
capacity: 24GiB
capabilities: ntfs initialized
configuration: clustersize=4096 created=2018-03-30 05:55:21 filesystem=ntfs label=LENOVO modified_by_chkdsk=true mounted_on_nt4=true name=Basic data partition resize_log_file=true state=dirty upgrade_on_mount=true
*-volume:4
description: Windows NTFS volume
vendor: Windows
physical id: 5
bus info: scsi@2:0.0.0,5
logical name: /dev/sda5
version: 3.1
serial: 021789c5-28d4-0245-98d4-39bf6e1c4ed1
size: 994MiB
capacity: 999MiB
capabilities: boot precious readonly hidden nomount ntfs initialized
configuration: clustersize=4096 created=2018-03-30 05:40:26 filesystem=ntfs label=WINRE_DRV modified_by_chkdsk=true mounted_on_nt4=true name=Basic data partition resize_log_file=true state=dirty upgrade_on_mount=true
*-volume:5
description: EXT4 volume
vendor: Linux
physical id: 6
bus info: scsi@2:0.0.0,6
logical name: /dev/sda6
logical name: /
version: 1.0
serial: 426ca01d-4af1-4883-a940-ee1aebe7ba7c
size: 108GiB
capabilities: journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
configuration: created=2018-05-27 16:09:09 filesystem=ext4 lastmountpoint=/ modified=2018-05-31 15:45:10 mount.fstype=ext4 mount.options=rw,relatime,errors=remount-ro,data=ordered mounted=2018-05-31 13:45:19 state=mounted
*-volume:6
description: Linux swap volume
vendor: Linux
physical id: 7
bus info: scsi@2:0.0.0,7
logical name: /dev/sda7
version: 1
serial: 42e3c348-8e63-4bc9-aeb4-40356a67e8fa
size: 14GiB
capacity: 14GiB
capabilities: nofs swap initialized
configuration: filesystem=swap pagesize=4095
*-battery
description: Zinc Air Battery
product: CRB Battery 0
vendor: -Virtual Battery 0-
physical id: 1
version: 08/08/2010
serial: Battery 0
slot: Fake
*-power UNCLAIMED
description: OEM Define 1
product: OEM Define 5
vendor: OEM Define 2
physical id: 2
version: OEM Define 6
serial: OEM Define 3
capacity: 75mWh
In case someone needs it, I answer my own question with the details of my experience.
Following @DavidFoerseter comment, I have installed the new kernel, but it made things worse: the computer freezed even before I could do anything, so I had to reinstall Ubuntu.
On the other hand, installing the most recent Nvidia driver proved to be the correct step; following this answer I wrote in a terminal the following commands:
Notice that the correct driver's name is
nvidia-396
and notnvidia-driver-396
as claimed in the cited answer. This can be seen using the commandthat checks for available Nvidia driver on the repository.