Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/basic-video/graphic.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2823 by niro, Fri Jul 28 10:00:23 2017 UTC revision 2844 by niro, Fri Nov 16 13:48:00 2018 UTC
# Line 22  helper_graphic_rebuild_xorg_conf_d() Line 22  helper_graphic_rebuild_xorg_conf_d()
22  {  {
23   local CONFIG   local CONFIG
24   local conf   local conf
25     local boardvendor
26     local write_zotac_quirk
27    
28   # rebuild 25-gfxcard.conf   # rebuild 25-gfxcard.conf
29   # always clear the config   # always clear the config
# Line 63  helper_graphic_rebuild_xorg_conf_d() Line 65  helper_graphic_rebuild_xorg_conf_d()
65   helper_graphic_add_configs ${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen   helper_graphic_add_configs ${MROOT}/${MCORE_CONFIG_PATH}/xorg/screen
66   addconfig 'EndSection'   addconfig 'EndSection'
67   fi   fi
68    
69     # always disable hdmi port on zotac devices atm - fixme make it configurable like alx
70     CONFIG="${MROOT}@@SYSCONFDIR@@/X11/xorg.conf.d/30-fix-zotac.conf"
71     clearconfig
72     write_zotac_quirk=0
73     if [ -e /sys/devices/virtual/dmi/id/board_vendor ]
74     then
75     boardvendor="$(< /sys/devices/virtual/dmi/id/board_vendor)"
76     # decapitalize
77     boardvendor="${boardvendor,,}"
78     case ${boardvendor} in
79     *zotac*) write_zotac_quirk=1 ;;
80     esac
81     fi
82     # some zotacs has as the board_vendor "filled by o.e.m"
83     # so we search the whole devices subtree for zotac vendor matches
84     # 0x19da="ZOTAC International (MCO) Ltd."
85     if [[ -n $(cat /sys/devices/*/*/subsystem_vendor  | grep 0x19da) ]]
86     then
87     write_zotac_quirk=1
88     fi
89    
90     if [ -f ${MCORE_CONFIG_PATH}/xorg/device/30-hdmi.conf ]
91     then
92     source ${MCORE_CONFIG_PATH}/xorg/device/30-hdmi.conf
93     case "${graphic_hdmi}" in
94     enabled) write_zotac_quirk=0 ;;
95     disabled) write_zotac_quirk=1 ;;
96     esac
97     fi
98    
99     if [[ ${write_zotac_quirk} = 1 ]]
100     then
101     addconfig "# Autogenerated by mcored"
102     addconfig "Section \"Monitor\""
103     addconfig " Identifier \"LVDS1\""
104     addconfig " Option \"Ignore\" \"True\""
105     addconfig "EndSection"
106     fi
107  }  }
108    
109  help_graphic_resolution()  help_graphic_resolution()
# Line 95  help_graphic_driver() Line 136  help_graphic_driver()
136   mecho " Selects the graphic card driver used by Xorg."   mecho " Selects the graphic card driver used by Xorg."
137  }  }
138    
139    help_graphic_hdmi()
140    {
141     mecho "set graphic.hdmi [action]"
142     mecho " Available actions:"
143     mecho "  enable - enables the hdmi port"
144     mecho "  disable - disables the hdmi port"
145    }
146    
147  # set_graphic_resolution ${value}  # set_graphic_resolution ${value}
148  set_graphic_resolution()  set_graphic_resolution()
149  {  {
# Line 198  set_graphic_driver() Line 247  set_graphic_driver()
247   fi   fi
248  }  }
249    
250    set_graphic_hdmi()
251    {
252     local action="${CLASS_ARGV[0]}"
253     local CONFIG
254    
255     case "${action}" in
256     enable|disable)
257     CONFIG="${MCORE_CONFIG_PATH}/xorg/device/30-hdmi.conf"
258     clearconfig
259     addconfig "graphic_hdmi=\"${action}\""
260     ;;
261     *)
262     help_graphic_driver
263     return 1
264     ;;
265     esac
266    }
267    
268  get_graphic_driver()  get_graphic_driver()
269  {  {
270   local action="${CLASS_ARGV[0]}"   local action="${CLASS_ARGV[0]}"
# Line 226  get_graphic_driver() Line 293  get_graphic_driver()
293   ;;   ;;
294   esac   esac
295  }  }
296    
297    get_graphic_hdmi()
298    {
299     local CONFIG="${MCORE_CONFIG_PATH}/xorg/device/30-hdmi.conf"
300     if [ -f ${CONFIG} ]
301     then
302     rvecho "$(< ${CONFIG})"
303     fi
304    }

Legend:
Removed from v.2823  
changed lines
  Added in v.2844