Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Screen Flashes After Power Loss (Read 594 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Screen Flashes After Power Loss

So i wasn't watching my battery percentage on my laptop and it ran out. Full power off. I plugged it in an after the grub menu i can see OpenRc start up and about halfway through it just goes to a black screen which flashes every second or so.

I think it's trying to start lightdm (my display manager) and that fails somehow?

I'm not sure how to start fixing this issue. I can use a live usb to mount the system but nothing seems particularly wrong. I see no obvious errors in dmesg. When i try and startx i do see it complaining about an important looking file not existing /run/dbus/system_bus_socket. Anyone have some ideas?


Re: Screen Flashes After Power Loss

Reply #2
>When i try and startx i do see it complaining about an important looking file not existing /run/dbus/system_bus_socket. Anyone have some ideas?

It also complains about not being able to load the i965 driver, that might be related.

Also did you make sure that dbus is running?

Re: Screen Flashes After Power Loss

Reply #3
> Also did you make sure that dbus is running?

I don't think it actually makes it that far in the init process. I tried removing lightdm from the default run level and it still did the same thing. I can't even get to a TTY. I think there is something really messed up. I guess I can just try and reinstall the kernel? I don't know what else might be messed up too.

Re: Screen Flashes After Power Loss

Reply #4
I got the system to boot and the display manager works but I had to do the following (maybe overkill?):

  • reboot with live artix linux usb.
  • remount laptop's hard disk
    Code: [Select]
    mount /dev/nvme0n1p3 /mnt
    mount /dev/nvme0n1p1 /mnt/boot
  • ensure wifi is off and unblocked:
    Code: [Select]
    pkill wpa_supplicant
    rfkill unblock wlan
  • turn on wifi using my laptop's config file of saved networks
    Code: [Select]
    wpa_supplicant -B -i wlan0 -c /mnt/etc/wpa_supplicant/wpa_supplicant.conf
    dhcpcd wlan0
  • ensure wifi is working
    Code: [Select]
    ping artixlinux.org
  • chroot into laptop system
    Code: [Select]
    artix-chroot /mnt
  • re-install linux lts kernel and base system packages
    Code: [Select]
    pacman -S linux-lts base base-devel openrc elogind-openrc
  • (optional) check if kernel, ramdisk and fallback are available in
    Code: [Select]
    ls -lsha /boot
  • reinstall grub
    Code: [Select]
    grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub
  • regenerate grub config
    Code: [Select]
    grub-mkconfig -o /boot/grub/grub.cfg
  • reboot

Re: Screen Flashes After Power Loss

Reply #5
It might be worth running some kind of fsck, in case the drive got some file system corruption from the hard power off.

Re: Screen Flashes After Power Loss

Reply #6
It might be worth running some kind of fsck, in case the drive got some file system corruption from the hard power off.

I just ran
Code: [Select]
fsck /dev/nvme0n1p3
from my live usb. and it seemed to give me just a list of files and clusters which I'm reading on some blogs means it's healthy? The efi system seems to work since it boots and I'm not too concerned about the swap partition.

Is there a good solution to ensure my system warns me and shuts down at low battery instead of going until it powers off?

Re: Screen Flashes After Power Loss

Reply #7
>Is there a good solution to ensure my system warns me and shuts down at low battery instead of going until it powers off?

I don't know of such program, but it shouldn't be hard with a shell script.

Write a shell script that will constantly sleep and check for battery percentage, and if it's lower than a certain amount, send a notification to the desktop using notify-send.

Re: Screen Flashes After Power Loss

Reply #8
I get battery low warnings in Mate, then if I miss that there is a battery critically low warning where you have a few seconds to hit the power switch (because I forgot to turn it on and didn't notice it was on battery)  but you need mate-notification-daemon and mate-power-manager, plus notifications must be enabled in the desktop settings. I think there is something similar in XFCE, and presumably other desktops too. Mate power manager has settings under the system menu which will automatically suspend, hibernate or power off if the battery becomes critically low, which is better than a hard power off.
If the fsck is OK then you could try smartctl -a (from the smartmontools package) as a further precautionary check to confirm the drive is good, without reallocated sectors, logged errors and so on, hopefully it's fine as everything is working now.

Re: Screen Flashes After Power Loss

Reply #9
@0xAA55  By any chance, have you recently upgraded your Linux kernel to 5.19.12?
There is a known bug/regression on this kernel, which provokes exactly this flickering problem at startup and prevents to use the laptop.
As a solution, you may try to go back to 5.19.10.
It is fixed in 6.0.0, and maybe also in 5.19.13.

Ah, you may have solved it yourself when you reinstalled a LTS kernel!