graphics: Remove spice GL/rendernode version support warnings
The versions we are warning about are all over 4 years old, and these warnings were initially just informative to help users know when the config wasn't going to work. Drop most of it. Still warn in the UI when a VM misconfig will prevent spice GL from working Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
c2dbdbfab1
commit
f15cdd732d
|
@ -713,6 +713,20 @@ test-many-devices, like an alternate RNG, EOL OS ID, title field
|
|||
<vsock model='virtio'>
|
||||
<cid auto='yes'/>
|
||||
</vsock>
|
||||
|
||||
<!-- To hit some spice GL warning UI code paths -->
|
||||
<graphics type='spice'>
|
||||
<listen type='none'/>
|
||||
<gl enable="yes" rendernode="/dev/dri/renderD128"/>
|
||||
</graphics>
|
||||
<graphics type='spice'>
|
||||
<listen type='network' network='default'/>
|
||||
</graphics>
|
||||
<video>
|
||||
<model type="virtio">
|
||||
<acceleration accel3d="yes"/>
|
||||
</model>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
|
|
|
@ -417,7 +417,9 @@ class AddHardware(uiutils.UITestCase):
|
|||
newpass = "foobar"
|
||||
passwd.typeText(newpass)
|
||||
tab.find("Show password", "check").click()
|
||||
self.assertEqual(passwd.text, newpass)
|
||||
uiutils.check_in_loop(lambda: passwd.text == newpass)
|
||||
tab.find("Show password", "check").click()
|
||||
uiutils.check_in_loop(lambda: passwd.text != newpass)
|
||||
finish.click()
|
||||
|
||||
# Catch a port error
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -138,7 +138,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="top_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -261,7 +261,7 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -339,45 +339,23 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="graphics-rendernode-box">
|
||||
<object class="GtkComboBox" id="graphics-rendernode">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">3</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="graphics-rendernode">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="has_entry">True</property>
|
||||
<signal name="changed" handler="on_graphics_rendernode_changed" swapped="no"/>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">False</property>
|
||||
<property name="has_entry">True</property>
|
||||
<signal name="changed" handler="on_graphics_rendernode_changed" swapped="no"/>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="graphics-rendernode-atkobject">
|
||||
<property name="AtkObject::accessible-name">graphics-rendernode</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="graphics-rendernode-warn">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-dialog-warning</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="graphics-rendernode-atkobject">
|
||||
<property name="AtkObject::accessible-name">graphics-rendernode</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -388,20 +366,8 @@
|
|||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">7</property>
|
||||
<property name="top_attach">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -104,10 +104,9 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||
devs = self.conn.filter_nodedevs("drm")
|
||||
for i in devs:
|
||||
drm = i.xmlobj
|
||||
if not drm.is_drm_render():
|
||||
continue
|
||||
rendernode = drm.get_devnode().path
|
||||
model.append([rendernode, i.pretty_name()])
|
||||
if drm.is_drm_render():
|
||||
rendernode = drm.get_devnode().path
|
||||
model.append([rendernode, i.pretty_name()])
|
||||
|
||||
def _get_config_graphics_ports(self):
|
||||
port = uiutil.spin_get_helper(self.widget("graphics-port"))
|
||||
|
@ -161,7 +160,9 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||
|
||||
if val == -1 or gfx.autoport:
|
||||
auto.set_active(True)
|
||||
if val and val != -1:
|
||||
if val and val != -1: # pragma: no cover
|
||||
# Triggering this with the test driver is tough
|
||||
# because it doesn't fill in runtime port values
|
||||
label = _("A_uto (Port %(port)d)") % {"port": val}
|
||||
elif val is None:
|
||||
auto.set_inconsistent(True)
|
||||
|
@ -195,39 +196,12 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||
|
||||
if is_spice:
|
||||
opengl_warning = ""
|
||||
rendernode_warning = ""
|
||||
opengl_supported = self.conn.support.conn_spice_gl()
|
||||
rendernode_supported = self.conn.support.conn_spice_rendernode()
|
||||
glval = bool(gfx.gl)
|
||||
renderval = gfx.rendernode or None
|
||||
|
||||
# * If spicegl isn't supported, show a warning icon and
|
||||
# and desensitive everything
|
||||
# * If qemu:///system and rendernode isn't supported,
|
||||
# show a warning icon and desensitize everything, since
|
||||
# rendernode support is needed for it to work out of the box.
|
||||
# * Otherwise, enable all UI, but show warning icons anyways
|
||||
# for potential config issues
|
||||
|
||||
glval = False
|
||||
renderval = None
|
||||
glsensitive = False
|
||||
if not opengl_supported:
|
||||
opengl_warning = (
|
||||
_("Hypervisor/libvirt does not support spice GL"))
|
||||
elif not rendernode_supported:
|
||||
rendernode_warning = (
|
||||
_("Hypervisor/libvirt does not support manual rendernode"))
|
||||
if self.conn.is_qemu_privileged():
|
||||
opengl_warning = rendernode_warning
|
||||
|
||||
if not opengl_warning:
|
||||
glval = bool(gfx.gl)
|
||||
glsensitive = True
|
||||
if not rendernode_warning:
|
||||
renderval = gfx.rendernode or None
|
||||
|
||||
if opengl_warning:
|
||||
pass
|
||||
elif not [v for v in self.vm.xmlobj.devices.video if
|
||||
# If the config doesn't support spice GL, show a warning
|
||||
# but still let the user set the value in case we are wrong
|
||||
if not [v for v in self.vm.xmlobj.devices.video if
|
||||
(v.model == "virtio" and v.accel3d)]:
|
||||
opengl_warning = _("Spice GL requires "
|
||||
"VirtIO graphics configured with accel3d.")
|
||||
|
@ -243,19 +217,11 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||
uiutil.set_list_selection(
|
||||
self.widget("graphics-rendernode"), renderval)
|
||||
|
||||
self.widget("graphics-opengl").set_sensitive(glsensitive)
|
||||
self.widget("graphics-opengl-warn").set_tooltip_text(
|
||||
opengl_warning or None)
|
||||
self.widget("graphics-opengl-warn").set_visible(
|
||||
bool(opengl_warning))
|
||||
|
||||
self.widget("graphics-rendernode").set_sensitive(
|
||||
rendernode_supported)
|
||||
self.widget("graphics-rendernode-warn").set_tooltip_text(
|
||||
rendernode_warning or None)
|
||||
self.widget("graphics-rendernode-warn").set_visible(
|
||||
bool(rendernode_warning))
|
||||
|
||||
uiutil.set_list_selection(self.widget("graphics-type"), gtype)
|
||||
return title
|
||||
|
||||
|
@ -297,7 +263,7 @@ class vmmGraphicsDetails(vmmGObjectUI):
|
|||
|
||||
def _change_opengl(self, ignore):
|
||||
uiutil.set_grid_row_visible(
|
||||
self.widget("graphics-rendernode-box"),
|
||||
self.widget("graphics-rendernode"),
|
||||
self.widget("graphics-opengl").get_active())
|
||||
self.emit("changed-opengl")
|
||||
|
||||
|
|
|
@ -198,12 +198,9 @@ class DeviceGraphics(Device):
|
|||
return None
|
||||
|
||||
def _default_spice_gl(self, _guest):
|
||||
if not self.conn.support.conn_spice_gl(): # pragma: no cover
|
||||
raise ValueError(_("Host does not support spice GL"))
|
||||
|
||||
# If spice GL but rendernode wasn't specified, hardcode
|
||||
# the first one
|
||||
if not self.rendernode and self.conn.support.conn_spice_rendernode():
|
||||
if not self.rendernode:
|
||||
for nodedev in self.conn.fetch_all_nodedevs():
|
||||
if not nodedev.is_drm_render():
|
||||
continue
|
||||
|
|
|
@ -262,12 +262,6 @@ class SupportCache:
|
|||
version="1.1.1", hv_version={"qemu": 0})
|
||||
# spice GL is actually enabled with libvirt 1.3.3, but 3.1.0 is the
|
||||
# first version that sorts out the qemu:///system + cgroup issues
|
||||
conn_spice_gl = _make(version="3.1.0",
|
||||
hv_version={"qemu": "2.6.0", "test": 0})
|
||||
conn_spice_rendernode = _make(version="3.1.0",
|
||||
hv_version={"qemu": "2.9.0", "test": 0})
|
||||
conn_video_virtio_accel3d = _make(version="1.3.0",
|
||||
hv_version={"qemu": "2.5.0", "test": 0})
|
||||
conn_graphics_listen_none = _make(version="2.0.0")
|
||||
conn_rng_urandom = _make(version="1.3.4")
|
||||
conn_usb3_ports = _make(version="1.3.5")
|
||||
|
|
Loading…
Reference in New Issue