Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sam1am/4cd60d04724afd853120961321d14df5 to your computer and use it in GitHub Desktop.

Select an option

Save sam1am/4cd60d04724afd853120961321d14df5 to your computer and use it in GitHub Desktop.
Workaround for black screen when booting linux on p8 mini laptop

Fixing Display Issues on 8" Mini Laptops (P8, Topton, etc.) Running Linux

Problem

Many 8" mini laptops from brands like Topton experience a display issue in Linux where the screen doesn't work at boot time, but works correctly after a sleep/wake cycle.

Solution

This workaround automatically performs a brief sleep/wake cycle during boot to activate the display. The system will sleep for 3 seconds and then wake up with a working display.

Step-by-Step Instructions

1. Create a systemd service

Create a new systemd service file:

sudo nano /etc/systemd/system/rtcwake-on-boot.service

Add the following content to the file:

[Unit]
Description=Suspend system briefly after boot
DefaultDependencies=no
Before=basic.target
After=local-fs.target

[Service]
Type=oneshot
ExecStart=/usr/bin/rtcwake -u -s 3 -m mem
RemainAfterExit=yes

[Install]
WantedBy=basic.target

Save and exit by pressing Ctrl+X, then Y to confirm.

2. Enable the service

Enable the service to run at boot:

sudo systemctl enable rtcwake-on-boot.service

3. Test the service

You can test if the service works correctly:

sudo systemctl start rtcwake-on-boot.service

Your system should sleep and wake up after 3 seconds with a working display.

Troubleshooting

  • If 3 seconds isn't enough time, try increasing the value in the -s parameter (e.g., -s 5 for 5 seconds)
  • If you tried a 1-second sleep and it didn't work, stick with 3 seconds or more

Compatibility

This solution has been confirmed working on Arch Linux with KDE, but should work on most Linux distributions that use systemd.


Note: This is a workaround until the underlying bug is fixed in a future update. If you know the root cause of this issue, please contribute to fixing it!

@Luigi-Pizzolito

Copy link
Copy Markdown

Thank you! This worked after trying many things. Cheers.

@HubDroider

Copy link
Copy Markdown

Another Luigi here thanks you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment