Does the whole display crash?
If that (was) the case … it may not be any more after you have sorted out your drivers and such.
That said … its possible that maybe you could still access TTY (ctrl+alt+f2,3,4,5,etc)
Also… I could tweak the command to go a bit more like this maybe.
(ok I kinda gave up at the end … because I didnt start out to write a script
)
mimon=$(xrandr | grep " connected" | cut -d' ' -f1); ores=$(xrandr | awk -F'[^0-9x]*' '/*/{print $2}'); orat=$(xrandr | awk -F'[^0-9]*' '/*/{print $4}'); echo ""; echo "Active screen recognized as "$mimon" : "$ores"@"$orat"" ; echo ""; echo "Desired resolution? (example: 1920x1080)"; read mires; echo ""; echo "Desired rate? (example: 60)"; read mirat; echo ""; kscreen-doctor output."$mimon".mode."$mires"@"$mirat"; sleep 6; kscreen-doctor output."$mimon".mode."$ores"@"$orat"; echo ""; echo "If you want to make the resolution change permanent, then please enter the following command:"; echo "kscreen-doctor output."$mimon".mode."$mires"@"$mirat""; echo ""; echo "Enjoy! <3 cscs"
It will take your inputs for resolution, apply them, wait 6 seconds then reapply the original settings.
Sample Output
Active screen recognized as eDP : 1920x1080@60
Desired resolution? (example: 1920x1080)
1680x1050
Desired rate? (example: 60)
60
kscreen.doctor: Taddaaa! Found mode "89" "1680x1050@60"
kscreen.doctor: Output 83 set mode "1680x1050@60"
kscreen.doctor: setop exec returned KScreen::Config(
KScreen::Output( 83 "eDP" connected enabled primary pos: QPoint(0,0) res: QSize(1920, 1080) modeId: "89" scale: 1 clone: no followPreferredMode: false ) )
kscreen.doctor: Taddaaa! Found mode "88" "1920x1080@60"
kscreen.doctor: Output 83 set mode "1920x1080@60"
kscreen.doctor: setop exec returned KScreen::Config(
KScreen::Output( 83 "eDP" connected enabled primary pos: QPoint(0,0) res: QSize(1680, 1050) modeId: "88" scale: 1 clone: no followPreferredMode: false ) )
If you want to make the resolution change permanent, then please enter the following command:
kscreen-doctor output.eDP.mode.1680x1050@60
Enjoy! <3 cscs