diff options
author | Angelo Naselli <anaselli@linux.it> | 2023-04-21 23:20:37 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2023-04-21 23:22:42 +0200 |
commit | 146f0716942496f9177725725d23228601c83a90 (patch) | |
tree | 9e4714d5c46579292d5f5806a7f332b9df2f17ff | |
parent | 3bd8d22b91e482fd8e50292ed965324fe4f31b9c (diff) | |
download | drakx-kbd-mouse-x11-146f0716942496f9177725725d23228601c83a90.tar drakx-kbd-mouse-x11-146f0716942496f9177725725d23228601c83a90.tar.gz drakx-kbd-mouse-x11-146f0716942496f9177725725d23228601c83a90.tar.bz2 drakx-kbd-mouse-x11-146f0716942496f9177725725d23228601c83a90.tar.xz drakx-kbd-mouse-x11-146f0716942496f9177725725d23228601c83a90.zip |
Added XFdrake option to disable (3D) hardware acceleration for some cards (see bug #31695)
-rw-r--r-- | lib/Xconfig/various.pm | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/lib/Xconfig/various.pm b/lib/Xconfig/various.pm index 114390f..d19d62b 100644 --- a/lib/Xconfig/various.pm +++ b/lib/Xconfig/various.pm @@ -61,6 +61,11 @@ sub default { if_($card->{Driver} eq 'savage', HWCursor => 1), if_($card->{Driver} eq 'intel' && $isLaptop, Clone => 0), if_($card->{Driver} eq 'ati' && $isLaptop, Clone => 1, BIOSHotkeys => 0), + if_($card->{Driver} eq 'nouveau' || + $card->{Driver} eq 'nvidia' || + $card->{Driver} eq 'intel' || + $card->{Driver} eq 'modesetting' || + $card->{Driver} eq 'amdgpu', NoAccel => 0), if_(defined $clone, Clone => $clone), # overrides driver-specific default if_(exists $card->{DRI_GLX}, use_DRI_GLX => $card->{DRI_GLX} && !$card->{Xinerama}), if_(member($card->{Driver}, qw(i128 ati sis trident via savage)), EXA => 0), #- list taken from http://wiki.x.org/wiki/ExaStatus @@ -85,13 +90,21 @@ sub various { Clone => 0), if_($card->{Options}{BIOSHotkeys}, BIOSHotkeys => 1), - if_($card->{Options}{AccelMethod}, + if_($card->{Options}{AccelMethod} && $card->{Options}{AccelMethod} ne 'none', EXA => $card->{Options}{AccelMethod} eq 'EXA'), if_($card->{Options}{ModeValidation}, ForceModeDVI => 1), if_($card->{Driver} eq 'nvidia', RenderAccel => !$card->{Options}{RenderAccel}, ), + if_($card->{Driver} eq 'nouveau' || + $card->{Driver} eq 'intel' || + $card->{Driver} eq 'amdgpu', + NoAccel => $card->{Options}{NoAccel},), + if_($card->{Driver} eq 'modesetting', + NoAccel => $card->{Options}{AccelMethod},), + if_($card->{Driver} eq 'nvidia', + NoAccel => !$card->{Options}{Accel},), HWCursor => !$card->{Options}{SWCursor}, DontZap => (configure_ServerFlag($raw_X, 'DontZap') eq 'False' ? 0 : 1), if_($card->{DRI_GLX} || $use_DRI_GLX, use_DRI_GLX => $use_DRI_GLX), @@ -223,6 +236,30 @@ sub config { } } + if (exists $various->{NoAccel}) { + if ($card->{Driver} eq 'nvidia') { + if ($various->{NoAccel}) { + $card->{Options}{Accel} = 'false'; + } else { + delete $card->{Options}{Accel}; + } + } elsif ($card->{Driver} eq 'modesetting') { + if ($various->{NoAccel}) { + $card->{Options}{AccelMethod} = 'none'; + } else { + delete $card->{Options}{AccelMethod}; + } + } elsif ($card->{Driver} eq 'nouveau' || + $card->{Driver} eq 'intel' || + $card->{Driver} eq 'amdgpu') { + if ($various->{NoAccel}) { + $card->{Options}{NoAccel} = 'true'; + } else { + delete $card->{Options}{NoAccel}; + } + } + } + Xconfig::various::runlevel($various->{xdm} ? 5 : 3); } @@ -275,6 +312,9 @@ sub choose { exists $various->{EXA} ? { text => N("Use EXA instead of XAA (better performance for Render and Composite)"), type => 'bool', val => \$various->{EXA} } : (), + exists $various->{NoAccel} ? + { text => N("Disable Hardware Acceleration"), + type => 'bool', val => \$various->{NoAccel} } : (), { label => N("Graphical interface at startup"), title => 1 }, { text => N("Automatically start the graphical interface (Xorg) upon booting"), type => 'bool', val => \$various->{xdm} }, |