--- mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.client.class.in 2017/08/04 08:41:23 2829 +++ mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.client.class.in 2017/08/15 11:22:47 2830 @@ -23,6 +23,7 @@ local CONFIG local conf local boardvendor + local write_zotac_quirk # rebuild 25-gfxcard.conf # always clear the config @@ -68,21 +69,31 @@ # always disable hdmi port on zotac devices atm - fixme make it configurable like alx CONFIG="${MROOT}@@SYSCONFDIR@@/X11/xorg.conf.d/30-fix-zotac.conf" clearconfig + write_zotac_quirk=0 if [ -e /sys/devices/virtual/dmi/id/board_vendor ] then boardvendor="$(< /sys/devices/virtual/dmi/id/board_vendor)" # decapitalize boardvendor="${boardvendor,,}" case ${boardvendor} in - *zotac*) - addconfig "# Autogenerated by mcored" - addconfig "Section \"Monitor\"" - addconfig " Identifier \"LVDS1\"" - addconfig " Option \"Ignore\" \"True\"" - addconfig "EndSection" - ;; + *zotac*) write_zotac_quirk=1 ;; esac - fi + fi + # some zotacs has as the board_vendor "filled by o.e.m" + # so we search the whole devices subtree for zotac vendor matches + # 0x19da="ZOTAC International (MCO) Ltd." + if [[ -n $(cat /sys/devices/*/*/subsystem_vendor | grep 0x19da) ]] + then + write_zotac_quirk=1 + fi + if [[ ${write_zotac_quirk} = 1 ]] + then + addconfig "# Autogenerated by mcored" + addconfig "Section \"Monitor\"" + addconfig " Identifier \"LVDS1\"" + addconfig " Option \"Ignore\" \"True\"" + addconfig "EndSection" + fi } help_graphic_resolution()