|
|
|
@ -32,6 +32,7 @@ from calculate.lib.utils.common import (getVideoFromXorgLog,
|
|
|
|
|
from calculate.install.distr import DistributiveError
|
|
|
|
|
import fcntl
|
|
|
|
|
import struct
|
|
|
|
|
from collections import OrderedDict
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate, _
|
|
|
|
|
|
|
|
|
@ -44,15 +45,15 @@ class VideoVariable(Variable):
|
|
|
|
|
"""
|
|
|
|
|
xorg_need = True
|
|
|
|
|
default_video = "default"
|
|
|
|
|
driver_names = {'nvidia': _("NVidia proprietary video driver"),
|
|
|
|
|
'fglrx': _("ATI proprietary video driver"),
|
|
|
|
|
#'amdgpu': _("ATI open source video driver with "
|
|
|
|
|
# "proprietary user-space"),
|
|
|
|
|
'intel': _("Intel video driver"),
|
|
|
|
|
'radeon': _("ATI open source video driver"),
|
|
|
|
|
'nouveau': _("NVidia open source video driver"),
|
|
|
|
|
'default': _("X.Org Server auto detection")
|
|
|
|
|
}
|
|
|
|
|
driver_names = OrderedDict([
|
|
|
|
|
('default', _("X.Org Server auto detection")),
|
|
|
|
|
('radeon', _("AMD Radeon (radeon)")),
|
|
|
|
|
('fglrx', _("AMD Catalyst (fglrx)")),
|
|
|
|
|
('intel', _("Intel Graphic Driver (intel)")),
|
|
|
|
|
('nouveau', _("NVidia open-source driver (nouveau)")),
|
|
|
|
|
('nvidia', _("Nvidia Graphic Driver (nvidia)")),
|
|
|
|
|
('vesa', _("Generic Vesa (vesa)")),
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
def uncompatible(self):
|
|
|
|
|
"""
|
|
|
|
@ -117,7 +118,8 @@ class VariableOsInstallX11Resolution(ResolutionVariable):
|
|
|
|
|
def get(self):
|
|
|
|
|
# get resolution from xorg.log
|
|
|
|
|
res = self.Get('os_x11_resolution')
|
|
|
|
|
if res or self.Get('install.os_install_root_type') in ('livecd', 'usb-hdd'):
|
|
|
|
|
if res or self.Get('install.os_install_root_type') in (
|
|
|
|
|
'livecd', 'usb-hdd'):
|
|
|
|
|
return res or self.fallback_resolution
|
|
|
|
|
else:
|
|
|
|
|
return self.fallback_resolution
|
|
|
|
@ -128,7 +130,7 @@ class VariableOsInstallX11VideoAvailable(VideoVariable):
|
|
|
|
|
Get available (already installed or installable drivers
|
|
|
|
|
"""
|
|
|
|
|
type = "list"
|
|
|
|
|
#supported = ["nvidia", "fglrx", "amdgpu", "nouveau", "intel", "radeon"]
|
|
|
|
|
# supported = ["nvidia", "fglrx", "amdgpu", "nouveau", "intel", "radeon"]
|
|
|
|
|
supported = ["nvidia", "fglrx", "nouveau", "intel", "radeon"]
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
@ -155,7 +157,7 @@ class VariableOsX11KmsVideoDrv(ReadonlyVariable):
|
|
|
|
|
Список KMS драйверов
|
|
|
|
|
"""
|
|
|
|
|
type = "list"
|
|
|
|
|
value = ["radeon", "intel", "nouveau"] #, "amdgpu"]
|
|
|
|
|
value = ["radeon", "intel", "nouveau"] # , "amdgpu"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class VariableOsInstallX11VideoDrv(VideoVariable):
|
|
|
|
@ -176,7 +178,8 @@ class VariableOsInstallX11VideoDrv(VideoVariable):
|
|
|
|
|
values = self.Get('os_install_x11_video_available')
|
|
|
|
|
else:
|
|
|
|
|
values = self.Get('os_x11_kms_video_drv') + [self.default_video]
|
|
|
|
|
return map(lambda x: (x, self.driver_names.get(x, x)), values)
|
|
|
|
|
return map(lambda x: (x, self.driver_names.get(x, x)),
|
|
|
|
|
(x for x in self.driver_names.keys() if x in values))
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
if self.Get('os_install_x11_server_set') == 'on':
|
|
|
|
@ -270,7 +273,7 @@ class VariableOsInstallX11Composite(VideoVariable):
|
|
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
|
"""On/off composite"""
|
|
|
|
|
defaultCompositeOn = ("nvidia", "intel", "fglrx", # "amdgpu",
|
|
|
|
|
defaultCompositeOn = ("nvidia", "intel", "fglrx", # "amdgpu",
|
|
|
|
|
"nouveau", "radeon", "default")
|
|
|
|
|
composite = getValueFromCmdLine(CmdlineParams.Calculate,
|
|
|
|
|
CmdlineParams.Composite)
|
|
|
|
|