diff options
author | Martin Whitaker <martin@wotan.local.net> | 2017-05-06 12:21:47 +0100 |
---|---|---|
committer | Martin Whitaker <martin@wotan.local.net> | 2017-05-06 15:25:53 +0100 |
commit | 2c6bc491f08d12cf5056a9d3d9777aefc110f1ab (patch) | |
tree | 3d39296b7ef3aaed3a9ebaff6a683f9932a011a1 /lib/Xconfig/various.pm | |
parent | e5506a542b1725bd59187006a9d47136848fe390 (diff) | |
download | drakx-kbd-mouse-x11-2c6bc491f08d12cf5056a9d3d9777aefc110f1ab.tar drakx-kbd-mouse-x11-2c6bc491f08d12cf5056a9d3d9777aefc110f1ab.tar.gz drakx-kbd-mouse-x11-2c6bc491f08d12cf5056a9d3d9777aefc110f1ab.tar.bz2 drakx-kbd-mouse-x11-2c6bc491f08d12cf5056a9d3d9777aefc110f1ab.tar.xz drakx-kbd-mouse-x11-2c6bc491f08d12cf5056a9d3d9777aefc110f1ab.zip |
Remove 'nomodeset' boot option when switching to a modesetting driver (mga#20455).
Diffstat (limited to 'lib/Xconfig/various.pm')
-rw-r--r-- | lib/Xconfig/various.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm index ed43386..d98df16 100644 --- a/lib/Xconfig/various.pm +++ b/lib/Xconfig/various.pm @@ -413,9 +413,13 @@ sub setup_kms() { sub { my ($bootloader) = @_; my $kms_ok = run_program::rooted($::prefix, "/sbin/display_driver_helper", "--is-kms-allowed") || 0; - return if $kms_ok != bootloader::get_append_simple($bootloader, "nokmsboot"); + my $nokmsboot = bootloader::get_append_simple($bootloader, "nokmsboot"); + my $nomodeset = bootloader::get_append_simple($bootloader, "nomodeset"); + my $kms_disabled = $nokmsboot || $nomodeset; + return if $kms_ok != $kms_disabled; if ($kms_ok) { - bootloader::remove_append_simple($bootloader, "nokmsboot"); + bootloader::remove_append_simple($bootloader, "nokmsboot") if $nokmsboot; + bootloader::remove_append_simple($bootloader, "nomodeset") if $nomodeset; } else { bootloader::set_append_simple($bootloader, "nokmsboot"); } |