Project

General

Profile

Bug #1685

[linux-libre-lts]: Computer does not shut down

nona - about 6 years ago - . Updated almost 6 years ago.

Status:
fixed
Priority:
bug
Assignee:
% Done:

0%


Description

Hello,

I have tried with different kernels, and my computer does not shut down. I can't go into suspend mode either (blank screen afterwards; is that related?).
1 Way to reproduce

I click on the power button, select the shutdown option, and wait for the computer to turn off. I only get a bunch of lines saying that it is trying to power down, but the computer stays on afterwards. It does close the desktop environment and everything else. At the end, I have to click on the power button for some time for the computer to shut down.
2 Expected behaviour

I want the computer to shutdown and power off.
3 System characteristics

mate-about --version

MATE Desktop Environment 1.20.0

uname -r

4.14.26-gnu-1-lts


Files

lspci.txt (42 KB) lspci.txt lspci -vvnnn nona, 2018-03-31 06:04 PM

Related issues

Related to Packages - Bug #1630: [linux-libre] [linux-libre-lts]: not shutting down open

Actions

History

#1

Updated by bill-auger about 6 years ago

  • Status changed from open to info needed

are you using openRC - is you problem anything like issue #1630 ?
did this problem begin after updating the LTS kernel ?
did you have this problem with the previous LTS kernel ?

https://labs.parabola.nu/issues/1630

#2

Updated by nona about 6 years ago

bill-auger wrote:

are you using openRC - is you problem anything like issue #1630 ?

I use systemD. It seems similar in that I can also shutdown with 4.9.70-gnu-1-lts

did this problem begin after updating the LTS kernel ?

Yes

did you have this problem with the previous LTS kernel ?

No, if previous means 4.9.70-gnu-1-lts

https://labs.parabola.nu/issues/1630

Thanks. I use cryptsetup. I have never been able to restore after suspension (if that is useful).

Any kernel update shows something similar to this as the last line after trying to shut down or reboot:
kvm: hardware virtualization

#3

Updated by bill-auger about 6 years ago

  • Status changed from info needed to open
  • Subject changed from Computer does not shut down to [linux-libre-lts]: Computer does not shut down
#4

Updated by bill-auger about 6 years ago

  • Related to Bug #1630: [linux-libre] [linux-libre-lts]: not shutting down added
#5

Updated by bill-auger about 6 years ago

  • Assignee set to Megver83
#6

Updated by Megver83 about 6 years ago

  • Status changed from open to forwarded upstream

I'll mark this as "forwarded upstream" but in fact it's continuing on #1630

#7

Updated by nona almost 6 years ago

Megver83 wrote:

I'll mark this as "forwarded upstream" but in fact it's continuing on #1630

Solved! Call me crazy, but I think that my two issues (this, and https://labs.parabola.nu/issues/1819#note-18, https://labs.parabola.nu/issues/1750?issue_count=267&issue_position=46&next_issue_id=1749&prev_issue_id=1752#note-7) were related.

I don't know if anything of what I did had to do with the solution, but (this took months of trial and error):

  1. Install my old backup (some version of the MATE Desktop live ISO updated to linux-libre 4.13.13 <-- lucky number!) with GPT and LUKS (/boot partition without encryption and esp partition mounted on /boot/efi)
# Format a FAT32 partition for efi with 550 MB (see archlinux wiki), an EXT4 boot partition and a raw partition for LUKS
parted -a optimal /dev/sda
> mklabel gpt
> mkpart primary fat32 0% 550MB
> name 1 efi
> set 1 esp
> mkpart primary 550MB 
> name 2 boot
> mkpart primary <550MB + BootPartitionSize> 100%
> name 3 crypt

# Encrypt a partition (/dev/sda3), activate it, make it LVM and create 3 logical partitions (one for the OS, the other one for your personal use and the other one for swap space)
cryptsetup luksFormat <your options -s (size) -h (hash) -c (cipher) --iter-time (decryption time)> /dev/sda3
cryptsetup luksOpen /dev/sda3 cryptpart  # cryptpart can be changed here and in the next step if you want
pvcreate /dev/mapper/cryptpart
vgcreate cryptovol /dev/sda3 # cryptovol will go into your configuration (/etc/default/grub), change it here and there if you want
lvcreate -L <size1 in GiB>GiB -n Main cryptolvm  # Main, Home and Swap: for fstab
lvcreate -L <size2 in GiB>GiB -n Swap cryptolvm  # ~1.5 of your RAM should be fine
lvcreate -L <size3 in GiB>GiB -n Home cryptolvm  # consider -l 100%Free

# Format
vgchange -ay cryptolvm
mkswap -L "Swap" /dev/cryptolvm/Swap  # The "Swap" (after -L) here is irrelevant
swapon /dev/cryptolvm/Swap
for i in Main Home Swap; do mkfs.ext4 -L "$i" /dev/"$i"; done
  1. Back-up your system
    If you have the time and disk space, create a virtual disk and a separate partition (besides Main) where you can test things (virtual machines don't always behave in the same way as the hosts). I am assuming that you had a working installation of an old system. Copy the contents of your old system with a Live ISO (USB) into the virtual image or the separate partition. If EFI or GPT is needed, look for qemu-img create -f qcow `file' `size'; modprobe nbd max_part=`n'; qemu-nbd --connect; qemu -enable-kvm -drive file=`file'; pacman -Ql ovmf (/usr/share/ovmf/x64/OVMF_VARS.fd) blog.system76.com/post/139138591598; qemu -drive if=pflash,format=raw, etc.
  1. Clean the boot partition
    My configuration had a separate partition for testing, and I had to make sure that the boot partition was clear (make sure that you have a file to reinstall the linux kernel or a connection to Internet).
    # Create 
    umount --recursive /boot/
    rm -fr /boot
    mkdir /boot/
    mount /dev/sda2 /boot/
    rm -fr /boot/*
    mkdir /boot/efi
    mount /dev/sda1 /boot/efi
    
  1. Prepare the encrypted boot
    Modify the line
    GRUB_CMDLINE_LINUX_DEFAULT="..." 
    

    to have this
    GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/sda3:cryptolvm resume=/dev/mapper/cyptolvm-Swap ..." 
    

Include keyboard block keymap encrypt lvm2 before filesystems and autodetect in the HOOKS of /etc/mkinitcpio.conf (example):

HOOKS="base udev keyboard block keymap encrypt lvm2 filesystems autodetect modconf fsck" 

Generate a proper /etc/fstab (with genfstab -p / >> /etc/fstab or manually)

/dev/cryptolvm/Main / ext4 rw,relatime,data=ordered 0 1
/dev/cryptolvm/Home /home/<your user>/ ext4 rw,relatime,data=ordered 0 2
/dev/mapper/cryptolvm-Swap none swap defaults 0 2
/dev/sda2 /boot ext4 rw,relatime,data=ordered 0 2
/dev/sda3 /boot/efi vfat rw,relatime,errors=remount-ro 0 2

I don't know if this had to do with it, but my computer has a 16:9 aspect ratio, and I changed the mode in /etc/default/grub:

GRUB_GFXMODE="1280x720" 
GRUB_GFXPAYLOAD_LINUX="keep" 

  1. Update the system
    # optional: rm -fr /var/lib/pacman/db.lck
    pacman -Rnucs libxfont
    pacman -S libxfont2
    pacman -Sy parabola-keyring archlinux-keyring
    pacman-key --refresh-keys
    pacman -Syu --noconfirm
    

My computer has an AMD video card which gets broken by amdgpu. I need to remove it (will create a bug report):

pacman -Rnucs xf86-video-amdgpu
sed 's/\(MODULES[[:space:]]*=[[:space:]]*[("].*\)/amdgpu\(.*\)-\1\2-g' /etc/mkinitcpio.conf  # remove amdgpu from mkinitcpio.conf (MODULES = "...amdgpu..." --> MODULES = "... ...")

  1. Get rid of-- and reinstall lightdm
    # Manually CTRL + ALT + F2 to login into a virtual console (login with your credentials)
    systemctl stop lightdm
    ps aux | grep lightdm  # get any running instance
    top  # just to make sure that it's not hanging around
    kill -30 <any lightdm related process>
    pacman -Rnucs lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
    pacman -U /var/cache/pacman/pkg/linux-libre-4.17.2*  # reinstall any kernel you want (just to make sure)
    pacman -S lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings efibootmgr
    
  1. Reinstall the bootloader
    grub-install --target=x86_64-efi --efi-directory=/boot/efi --recheck  # --boot-directory=/boot automatically; the --bootloader-id=parabola
    grub-mkconfig -o /boot/grub/grub.cfg
    
  1. Reboot
    If everything went well, back-up your configuration:
    cp -a /boot /boot-bak
    parted /dev/sda unit s p free > /boot-bak/partitions.txt
    cp -a /etc/default/grub /boot-bak/grub.bak
    cp -a /etc/fstab /boot-bak/fstab.bak
    cp -a /etc/mkinitcpio.conf /boot-bak/mkinitcpio.conf
    
#8

Updated by nona almost 6 years ago

I nailed it down to this:
amdgpu is breaking my installation. If I remove it from mkinitcpio.conf (MODULES) and run pacman -Rnucs xf86-video-amdgpu, I can boot and shutdown

#9

Updated by Megver83 almost 6 years ago

  • Status changed from forwarded upstream to fixed

nona wrote:

I nailed it down to this:
amdgpu is breaking my installation. If I remove it from mkinitcpio.conf (MODULES) and run pacman -Rnucs xf86-video-amdgpu, I can boot and shutdown

Right, I'll mark this as fixed then

Also available in: Atom PDF