Black Screen Error after kernel version change

Hi all, recently I changed my kernel version while messing around in Manjaro for the first time and I’ve come across a recent issue where the following happens:

  1. Booting up my laptop is slower than usual.
  2. When it boots up the login prompt is available although my mouse/trackpad doesn’t work.
  3. When I attempt to sign in after a few seconds the screen goes black and I can’t access anything.

I presume this is an issue with the kernel so I’ve been trying to change it. Since I can’t get access to the terminal via the login I’ve tried getting access to the bash terminal by editing the kernel via grub (Adding the line init=/bin/bash) which has worked so far. From there I’ve tried to install and change the kernel via command line although when using sudo or logged in as root no command is found.

With that in mind, does anyone have a solution to sudo not finding the commands or perhaps another way compared to my original idea? If so that’d be great and if you need any further information please ask, thanks all! :slightly_smiling_face:

can you boot ,
and provide

inxi -Fza
sudo mhwd-kernel -li
sudo ls /etc/mkinitcpio.d/*.preset
1 Like

Since I can’t upload images I’ve stuck them on Imgur so here’s the link:

Hope this helps, thanks.

Welcome to the forum! :wave:

From which to which? Can you boot from the previous kernel?

You should copy terminal output and paste it here instead. Then highlight it and use the Preformatted text </> button.

Alternatively, add three backticks ` above and below the text:

```
text
```

Please edit your post accordingly.

1 Like

Thanks for the welcome! and I went from version 5.10 to 5.4 from what I can remember. I would upload the terminal outputs directly although I can’t get access to the desktop since it black screens. So I have access to the terminal but that’s it, currently I’m using my main desktop to look up solutions and what may be causing this :slightly_smiling_face:

this is a recent cpu , you can’t add a 5.4
so you boot on USB iso manjaro
open a terminal

sudo manjaro-chroot -a
mhwd-kernel -i linux510 
mhwd-kernel -i linux511
mhwd-kernel -i linux512
mhwd-kernel -r linux54
exit ( end-chroot)

then reboot , press Esc to see grub ,
and select version kernel for boot

2 Likes

Sweet I’ve managed to boot in and I’m having an issue with mhwd-kernel -i

All I get ‘error: no targets specified’

Is there a path I need to specify or is there something else wrong?

As stephane showed, you need to specify the kernel you want to install.

mhwd-kernel -i linux510

mhwd-kernel -h will display usage instructions.

[manjaro /]# sudo mhwd-kernel -i linux510
:: Synchronizing package databases...
 core                                                    165.5 KiB  1303 KiB/s 00:00 [#################################################] 100%
 extra                                                  1968.1 KiB  5.72 MiB/s 00:00 [#################################################] 100%
 community                                                 6.6 MiB  6.84 MiB/s 00:01 [#################################################] 100%
 multilib                                                180.5 KiB  5.88 MiB/s 00:00 [#################################################] 100%
error: no targets specified (use -h for help)
[manjaro /]#

what have you done exactly ?
this is not chroot …

[manjaro@manjaro ~]$ sudo manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
 --> mount: [/mnt/boot/efi]
[manjaro /]# mhwd-kernel -i linux510
:: Synchronizing package databases...
 core                                                    165.5 KiB  1273 KiB/s 00:00 [#################################################] 100%
 extra                                                  1968.1 KiB  5.90 MiB/s 00:00 [#################################################] 100%
 community                                                 6.6 MiB  7.25 MiB/s 00:01 [#################################################] 100%
 multilib                                                180.5 KiB  5.88 MiB/s 00:00 [#################################################] 100%
error: no targets specified (use -h for help)
[manjaro /]# 

I booted into a usb iso of Manjaro and done the following

then try ( under chroot )

pacman-mirrors -a
pacman -Syy
ls /etc/mkinitcpio.d/*preset 
mhwd-kernel -li
cat /etc/fstab
[manjaro /]# pacman-mirrors -a
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: http://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  0.382 Germany        : https://mirror.alpix.eu/manjaro/
  0.828 Germany        : https://manjaro.re/
  0.611 Germany        : http://manjaro.re/
  0.393 Germany        : https://ftp.gwdg.de/pub/linux/manjaro/
  0.347 Germany        : http://ftp.gwdg.de/pub/linux/manjaro/
  1.282 Germany        : ftp://ftp.gwdg.de/pub/linux/manjaro/
  0.373 Germany        : https://mirror.atysleaks.org/manjaro/
  0.418 Germany        : http://mirror.atysleaks.org/manjaro/
  0.465 Germany        : https://mirror.23media.com/manjaro/
  0.255 Germany        : http://mirror.23media.com/manjaro/
  0.412 Germany        : https://ftp.halifax.rwth-aachen.de/manjaro/
  0.840 Germany        : ftp://ftp.halifax.rwth-aachen.de/manjaro/
  0.296 Germany        : https://manjaro.moson.eu/
  0.251 Germany        : http://manjaro.moson.eu/
  0.330 Germany        : https://manjaro.moson.org/
  0.294 Germany        : http://manjaro.moson.org/
  0.463 Russia         : https://mirror.yandex.ru/mirrors/manjaro/
  1.142 Russia         : https://mirror.truenetwork.ru/manjaro/
[manjaro /]# pacman-mirrors -a            
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: http://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  0.361 Germany        : https://mirror.alpix.eu/manjaro/
  0.343 Germany        : https://manjaro.re/
  0.244 Germany        : http://manjaro.re/
  0.422 Germany        : https://ftp.gwdg.de/pub/linux/manjaro/
  0.299 Germany        : http://ftp.gwdg.de/pub/linux/manjaro/
  1.166 Germany        : ftp://ftp.gwdg.de/pub/linux/manjaro/
  0.822 Germany        : https://mirror.atysleaks.org/manjaro/
  0.938 Germany        : http://mirror.atysleaks.org/manjaro/
  0.713 Germany        : https://mirror.23media.com/manjaro/
  0.250 Germany        : http://mirror.23media.com/manjaro/
  0.401 Germany        : https://ftp.halifax.rwth-aachen.de/manjaro/
  1.085 Germany        : ftp://ftp.halifax.rwth-aachen.de/manjaro/
  0.307 Germany        : https://manjaro.moson.eu/
  0.251 Germany        : http://manjaro.moson.eu/
  0.451 Germany        : https://manjaro.moson.org/
  0.252 Germany        : http://manjaro.moson.org/
  0.493 Russia         : https://mirror.yandex.ru/mirrors/manjaro/
  1.138 Russia         : https://mirror.truenetwork.ru/manjaro/
  0.889 Russia         : http://mirror.truenetwork.ru/manjaro/
::INFO Writing mirror list
::Germany         : https://manjaro.re/stable/$repo/$arch
::Germany         : https://mirror.23media.com/manjaro/stable/$repo/$arch
::Germany         : https://manjaro.moson.eu/stable/$repo/$arch
::Germany         : https://manjaro.moson.org/stable/$repo/$arch
::Germany         : https://mirror.alpix.eu/manjaro/stable/$repo/$arch
::Russia          : https://mirror.yandex.ru/mirrors/manjaro/stable/$repo/$arch
::Russia          : https://mirror.truenetwork.ru/manjaro/stable/$repo/$arch
::Germany         : https://mirror.atysleaks.org/manjaro/stable/$repo/$arch
::Germany         : https://ftp.halifax.rwth-aachen.de/manjaro/stable/$repo/$arch
::Germany         : https://ftp.gwdg.de/pub/linux/manjaro/stable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run  'sudo pacman-mirrors -c all'
[manjaro /]# pacman -Syy
:: Synchronizing package databases...
 core                            165.5 KiB  2.02 MiB/s 00:00 [#################################] 100%
 extra                          1968.1 KiB  5.19 MiB/s 00:00 [#################################] 100%
 community                         6.6 MiB  6.46 MiB/s 00:01 [#################################] 100%
 multilib                        180.5 KiB  5.88 MiB/s 00:00 [#################################] 100%
[manjaro /]# ls /etc/mkinitcpio.d/*preset
/etc/mkinitcpio.d/linux54.preset
[manjaro /]# mhwd-kernel -li
Currently running: 5.9.16-1-MANJARO (linux59)
The following kernels are installed in your system:
   * linux54
[manjaro /]# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=BA31-37B4                            /boot/efi      vfat    umask=0077 0 2
UUID=0ba30ed9-2fd2-4733-8683-0ec28dbe2a4c /              ext4    defaults,noatime 0 1
/swapfile                                 swap           swap    defaults,noatime 0 0
[manjaro /]# 

Here’s what I got

then try

mhwd-kernel -i linux510
[manjaro /]# mhwd-kernel -i linux510
:: Synchronizing package databases...
 core                            165.5 KiB  1994 KiB/s 00:00 [#################################] 100%
 extra                          1968.1 KiB  6.20 MiB/s 00:00 [#################################] 100%
 community                         6.6 MiB  7.12 MiB/s 00:01 [#################################] 100%
 multilib                        180.5 KiB  6.53 MiB/s 00:00 [#################################] 100%
error: no targets specified (use -h for help)
[manjaro /]# 

Weird, its still giving me the same error

then

pacman -S linux510 linux510-headers

Alright that looked to have installed alright, I’ll chuck in the output just in case

[manjaro /]# pacman -S linux510 linux510-headers
resolving dependencies...
looking for conflicting packages...

Packages (2) linux510-5.10.34-1  linux510-headers-5.10.34-1

Total Download Size:    94.84 MiB
Total Installed Size:  198.12 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 linux510-5.10.34-1-x86_64        85.4 MiB  8.72 MiB/s 00:10 [#################################] 100%
 linux510-headers-5.10.34-1...     9.5 MiB  9.43 MiB/s 00:01 [#################################] 100%
(2/2) checking keys in keyring                               [#################################] 100%
(2/2) checking package integrity                             [#################################] 100%
(2/2) loading package files                                  [#################################] 100%
(2/2) checking for file conflicts                            [#################################] 100%
(2/2) checking available disk space                          [#################################] 100%
:: Processing package changes...
(1/2) installing linux510                                    [#################################] 100%
Optional dependencies for linux510
    crda: to set the correct wireless channels of your country [installed]
(2/2) installing linux510-headers                            [#################################] 100%
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Install DKMS modules
==> dkms install --no-depmod -m tuxedo-keyboard -v 3.0.5 -k 5.10.34-1-MANJARO
==> depmod 5.10.34-1-MANJARO
(4/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.34-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.34-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
(5/5) Updating Grub-Bootmenu
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
It's output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done
[manjaro /]#

can you check return

pacman -Qs linux54-
[manjaro /]# pacman -Qs linux54-
local/linux54-headers 5.4.116-1
    Header files and scripts for building modules for Linux54 kernel
local/linux54-virtualbox-host-modules 6.1.22-2 (linux54-extramodules)
    Host kernel modules for VirtualBox
[manjaro /]#

then add

pacman -S linux510-virtualbox-host-modules
pacman -Syyu