Skip to content

Removed unnecessary configurations, simplifed configuration's and speedup the configuration.#58

Merged
ericbsd merged 2 commits into
ghostbsd:masterfrom
b-aaz:imprv
Jun 9, 2026
Merged

Removed unnecessary configurations, simplifed configuration's and speedup the configuration.#58
ericbsd merged 2 commits into
ghostbsd:masterfrom
b-aaz:imprv

Conversation

@b-aaz

@b-aaz b-aaz commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Hi, sorry for the delay from the last PR #57, this is a follow up going over the points that was missing from the last one.

It needs more testing+review, because there are a lot more changes from the last one.
The new unionfs ISO I shared in the TG group includes all of these changes for easy testing.

Also regarding evdev, libinput was designed as a full replacement of evdev + more features. libinput also supports touchscreens, but I think it is better to be safe and do some testing before it's removal, because it is a tiny driver after all.

Related articles:
https://www.phoronix.com/news/Switching-To-Libinput-Xorg
https://openlib.io/evdev-libinput-and-xorg-interfacing-with-input-devices-in-linux/
https://john-salamon.com/The_Linux_Input_Complex/

Summary by Sourcery

Simplify X configuration handling by consolidating settings and removing obsolete per-environment XF86Config templates.

Enhancements:

  • Streamline the main xconfig script to rely on a unified configuration approach instead of multiple environment-specific variants.

Chores:

  • Remove legacy XF86Config templates for various virtualization and safe/vesa modes from the cardDetect directory.

All the Bhyve, Hyper-v, QEMU, safe, and VESA configurations are
condensed into the "fb" (frame-buffer) configuration, in which xconfig
removes all other X drivers and only keeps the *xf86-video-scfb &
*xf86-video-vesa drives installed without any explicit configurations so
that the X server can choose the correct driver, based on the
frame-buffer API's available. (Normally SCFB only is available when
booting with an UEFI BIOS, and VESA only is available when booting with
a legacy BIOS)

Also made the script default to pkg-static as the `pkg` command, if it
is available, if not, it will choose the normal pkg command.

Additionally instead of doing a manual "from file install" form the
livecd's X drivers repository, use a file based repository named
"XDrivers" and use normal pkg commands. (Needs change in ghostbsd-build)

The package removals have all also been condensed into a single operation
to reduce multiple pkg call overhead.

And finally, the removal operations that are unrelated to the X server's
drivers have been separated into another function that will only be
called if the script is invoked with "-c|--clean|clean" flags.  This is
done to speed up the boot time in the live media, so that we do only the
essential stuff before giving the user a desktop, and do the
non-essential things afterwards in the background with the "-c" flag.
@b-aaz b-aaz requested review from a team as code owners June 6, 2026 20:13
@sourcery-ai

sourcery-ai Bot commented Jun 6, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Simplifies and consolidates Xorg configuration handling by updating the xconfig script and removing several legacy, card-specific XF86Config templates that are no longer needed.

File-Level Changes

Change Details Files
Remove legacy, card-specific XF86Config templates no longer required by the configuration flow.
  • Delete XF86Config.bhyve template
  • Delete XF86Config.hyperv template
  • Delete XF86Config.qemu template
  • Delete XF86Config.safe template
  • Delete XF86Config.vesa template
cardDetect/XF86Config.bhyve
cardDetect/XF86Config.hyperv
cardDetect/XF86Config.qemu
cardDetect/XF86Config.safe
cardDetect/XF86Config.vesa
Adjust the main xconfig helper script to work without the removed template files and rely on the simplified configuration path.
  • Refactor logic that previously referenced per-hypervisor/per-driver XF86Config templates
  • Ensure xconfig now uses the streamlined configuration mechanism instead of cardDetect templates
bin/xconfig

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Since the XF86Config.* templates under cardDetect were removed, double-check that any code paths in bin/xconfig or related scripts that reference those specific files either fall back gracefully or are also cleaned up to avoid runtime file-not-found errors.
  • If libinput is now the assumed default, consider centralizing the configuration toggle (evdev vs libinput) in one place so that future changes to input handling don’t require hunting across multiple config fragments or scripts.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the XF86Config.* templates under cardDetect were removed, double-check that any code paths in bin/xconfig or related scripts that reference those specific files either fall back gracefully or are also cleaned up to avoid runtime file-not-found errors.
- If libinput is now the assumed default, consider centralizing the configuration toggle (evdev vs libinput) in one place so that future changes to input handling don’t require hunting across multiple config fragments or scripts.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@b-aaz

b-aaz commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Also regarding the XDrivers pkg repository, it needs a tiny config with a fille:/// URI and for pkg repo to be ran in the /xdrivers directory during the build time.
I also did all this in the aforementioned ISO for testing.

@ericbsd

ericbsd commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Also regarding the XDrivers pkg repository, it needs a tiny config with a fille:/// URI and for pkg repo to be ran in the /xdrivers directory during the build time. I also did all this in the aforementioned ISO for testing.

Will /xdrivers need to be set like a package repository?

@b-aaz

b-aaz commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Also regarding the XDrivers pkg repository, it needs a tiny config with a fille:/// URI and for pkg repo to be ran in the /xdrivers directory during the build time. I also did all this in the aforementioned ISO for testing.

Will /xdrivers need to be set like a package repository?

Yes, all that is needed, is to run:

pkg repo .

In /xdrivers, and add a config like:

# cat /usr/local/etc/pkg/repo/XDrivers.conf
XDrivers: { 
  url: "file:///xdrivers" 
  mirror_type: "none",
  enabled: yes
}

to the pkg repo configurations.

Comment thread bin/xconfig
Comment on lines -894 to -898
remove_xdrivers() {
if [ -d /xdrivers ]; then
log INFO "Removing /xdrivers"
rm -rf /xdrivers
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed from the system once used on the livecd. It takes up room on the live system.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, I forgot to mention that in the commit message, I removed that function because in the unionfs ISO there is no need for removing anything to save memory space, and keeping the repository can help manual install of other driver versions in case any problems occur.
I added it back.

With some small clean-ups and improvements, and fixes.

@ericbsd ericbsd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericbsd ericbsd merged commit 6403df9 into ghostbsd:master Jun 9, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in Development Tracker Jun 9, 2026
@ghostbsd ghostbsd deleted a comment from Dario-SR Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants