lucasgabmoreno / linuxmint_lenovod330

Install Linux Mint in Lenovo D330
BSD 3-Clause "New" or "Revised" License
13 stars 1 forks source link

Alternative method to recover from black screen #9

Open vvFiCKvv opened 2 years ago

vvFiCKvv commented 2 years ago

Do the folowing until it works:

xset dpms force off
xset dpms force on

Works with newer kernels

cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.17-x86_64 root=UUID=********** rw i915.fastboot=1 i915.enable_fbc=1 i915.enable_guc=2 video=SVIDEO-1:d fbvon=rotate:1 video=efifb udev.log_priority=3

I wish i could detect when it is working with a command.

lucasgabmoreno commented 2 years ago

Do the folowing until it works:

xset dpms force off
xset dpms force on

Works with newer kernels

cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.17-x86_64 root=UUID=********** rw i915.fastboot=1 i915.enable_fbc=1 i915.enable_guc=2 video=SVIDEO-1:d fbvon=rotate:1 video=efifb udev.log_priority=3

I wish i could detect when it is working with a command.

Can you please detail if your device model is 81H3, 81MD or 82H0?

vvFiCKvv commented 2 years ago

I am not sure, according to hw-probe, IdeaPad D330-10IGM 81H3 https://linux-hardware.org/?probe=6acc89788e

lucasgabmoreno commented 2 years ago

81H3 is FHD version, the more expansive d330 device.

I've tried your lines my 82H0(is the cheaper one) and only returns blank screen:

xset dpms force off
xset dpms force on

This other method works only in 60.00 Hz:

xrandr -s 0

This works always:

xrandr --output DSI-1 --off
xrandr --output DSI-1 --auto

For newer kernels, you can use "nomodeset" flag (instead of UUID=** rw i915.fastboot=1 i915.enable_fbc=1 i915.enable_guc=2 video=SVIDEO-1:d fbvon=rotate:1 video=efifb udev.log_priority=3) and it will work, but you will have more blank screen and wifi problems. That's why I recommend last 4.19.x, is more stable for this device.

vvFiCKvv commented 2 years ago

For me, the settings nomodeset and/or gfxpayload are breaking the kernel when it tries to load graphics.

Also, the following isn't always working: xrandr --output DSI-1 --off xrandr --output DSI-1 --auto

By turning off and on the screen (or use the xset commands) it randomly works.

I made a script that the fist time runs xrandr and the rest runs xset (within 10 seconds), it isn't perfect, but it works for my needs... Also makes the laptop useless for any theft. ;p

#!/bin/bash

LOCK_FILE=~/.xrandr.lock

if [ -e $LOCK_FILE ]; then 
    . $LOCK_FILE
fi 

NOW=$(date +%s)

echo LOCK_TIME=${NOW} > $LOCK_FILE

LOCK_TIME=$(($LOCK_TIME + 10))

echo now ${NOW}
echo locktime ${LOCK_TIME}

if [ $LOCK_TIME -ge $NOW ];
then
    echo run xset
    xset dpms force off
    xset dpms force on
else
    echo run xrandr
    xrandr --output DSI-1 --off
    xrandr --output DSI-1 --auto
fi 
lucasgabmoreno commented 2 years ago

Thanks for advise!
I've removed D330 81H3 from my guide, cause I've no device to test.
If you could make a fork or a new guide for 81H3 devices, I'll link it from this guide. It would be very useful!!!

vvFiCKvv commented 2 years ago

I cannot verify that your guide idn't working for 81H3 as i am testing a newer kernel on manjaro. As for a fork for 81H3, i haven't a stable solution yet, I have just noticed that the black sceen randomly disapears by lopping on and off the screen(either by lid button either by xset). The most stable kernel that i have tried was 5.10.117-1. But that version was behaving slower than the current versions.

lucasgabmoreno commented 2 years ago

Have you ever tried xanmod modded kernel? https://xanmod.org/