Removed unnecessary configurations, simplifed configuration's and speedup the configuration.#58
Conversation
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.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSimplifies 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
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Also regarding the XDrivers |
Will /xdrivers need to be set like a package repository? |
Yes, all that is needed, is to run: In to the pkg repo configurations. |
| remove_xdrivers() { | ||
| if [ -d /xdrivers ]; then | ||
| log INFO "Removing /xdrivers" | ||
| rm -rf /xdrivers | ||
| fi |
There was a problem hiding this comment.
This should be removed from the system once used on the livecd. It takes up room on the live system.
There was a problem hiding this comment.
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.
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:
Chores: