Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trident_init should not invoke generate-xorg-conf.sh when xorg.conf exists #43

Closed
jgroenveld opened this issue Nov 26, 2018 · 4 comments
Closed

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@jgroenveld
Copy link

@jgroenveld jgroenveld commented Nov 26, 2018

Would like trident_init to wrap generate-xorg-conf.sh with an -e test for xorg.conf.
I have an early model Optimus laptop which doesn't work with the 18.11 pre-release.
[I'll open a separate bug for that issue with pciconf(8), devinfo(8), and dmidecode(8) output]

John
groenveld@acm,org
@beanpole135
Copy link
Member

@beanpole135 beanpole135 commented Nov 26, 2018

If you want to bypass the automated xorg.conf generation, you just need to place your own xorg.conf into /usr/local/etc/X11/xorg.conf.

The /etc/X11/xorg.conf file which is auto-generated will only be used if you do not provide your own local config file.

@jgroenveld
Copy link
Author

@jgroenveld jgroenveld commented Nov 27, 2018

If you want to bypass the automated xorg.conf generation, you just need to place your own xorg.conf into /usr/local/etc/X11/xorg.conf.

*** /root/trident_init.trident  Tue Nov 27 07:46:12 2018
--- /usr/local/etc/init.d/trident_init  Tue Nov 27 07:55:43 2018
***************
*** 50,57 ****
--- 50,59 ----
  start(){
  # Verify that an xorg.conf exists, and generate one as needed
  xorg_conf="/etc/X11/xorg.conf" #This is used as the default/fallback config
+   if [ ! -e "/usr/local/etc/X11/xorg.conf" ] ; then
  #Use the "auto" flag to automatically detect/set the proper driver for each GPU
  /usr/local/share/trident/scripts/generate-xorg-conf.sh "auto" "${xorg_conf}"
+   fi
  #Automatically probe/update the available fonts for Xorg
  /usr/local/share/trident/scripts/update-xorg-fonts.sh
  # Check for extra kernel modules to load for video driver support

The /etc/X11/xorg.conf file which is auto-generated will only be used if you do not provide your own local config file.

xorg.conf(5)
       xorg.conf configuration file is searched for in the following places
       when the server is started as a normal user:

           /etc/X11/<cmdline>
           /usr/local/etc/X11/<cmdline>
           /etc/X11/$XORGCONFIG
           /usr/local/etc/X11/$XORGCONFIG
           /etc/X11/xorg.conf
           /etc/xorg.conf
           /usr/local/etc/X11/xorg.conf.<hostname>
           /usr/local/etc/X11/xorg.conf
           /usr/local/lib/X11/xorg.conf.<hostname>
           /usr/local/lib/X11/xorg.conf

John
groenveld@acm.org

@jgroenveld
Copy link
Author

@jgroenveld jgroenveld commented Jan 16, 2019

Ken, two fixes for trident_init to support a user's custom xorg.conf in /etc/X11
John
groenveld@acm.org
*** trident_init.trident-core-201901101126      Wed Jan 16 15:52:25 2019
--- trident_init        Wed Jan 16 15:57:37 2019
***************
*** 47,53 ****
    #Change between PRERELASE and 18.12-RELEASE:
    # Remove the /etc/X11/xorg.conf file if it was the old auto-generated one
    # That location needs to be left available for user-overrides later
!   local oldconf = "/etc/X11/xorg.conf"
    if [ -e "${oldconf}" ] ; then
      #Verify this is the old auto-generated file (look for the old comment in the header)
      grep -q -E '^#  /usr/local/etc/X11/xorg.conf$' "${oldconf}"
--- 47,53 ----
    #Change between PRERELASE and 18.12-RELEASE:
    # Remove the /etc/X11/xorg.conf file if it was the old auto-generated one
    # That location needs to be left available for user-overrides later
!   local oldconf="/etc/X11/xorg.conf"
    if [ -e "${oldconf}" ] ; then
      #Verify this is the old auto-generated file (look for the old comment in the header)
      grep -q -E '^#  /usr/local/etc/X11/xorg.conf$' "${oldconf}"
***************
*** 66,72 ****
    #Automatically probe/update the available fonts for Xorg
    /usr/local/share/trident/scripts/update-xorg-fonts.sh
    # Check for extra kernel modules to load for video driver support
!   xorg_confs="/usr/local/etc/X11/xorg.conf /etc/X11/xorg.conf"
    for conf in ${xorg_confs}
    do
      if [ ! -e "${conf}" ] ; then continue ; fi
--- 66,72 ----
    #Automatically probe/update the available fonts for Xorg
    /usr/local/share/trident/scripts/update-xorg-fonts.sh
    # Check for extra kernel modules to load for video driver support
!   xorg_confs="/etc/X11/xorg.conf /usr/local/etc/X11/xorg.conf"
    for conf in ${xorg_confs}
    do
      if [ ! -e "${conf}" ] ; then continue ; fi

@beanpole135
Copy link
Member

@beanpole135 beanpole135 commented Jan 17, 2019

Fixed: 065f171
In the future, please open up a pull request with the desired changes instead of sending the contents of these odd patch files. That will ensure that the PR gets seen/addressed ASAP, whereas replying to an old/closed issue might get missed by a developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment