Name
- Cyrus Rahman
Work
These patches have been updated to support 13.3-RELEASE.
I've listed uncommitted code/bug fixes I've written for FreeBSD in the hope they might be useful to others.
If you have a system for which these patches are useful, and you want an easy way of installing all of them, download this: multifix-13.3-RELEASE.diff. It contains all the bug fixes and new feature patches listed below.
If you haven't already, then download the repository of FreeBSD sources, create a new branch from RELENG-13.3 (stable should work, but you may have to make corrections for inter-release changes), and build and install a new world and kernel - including updating /etc. The man pages will be updated to reflect the new configuration options, but the defaults should work.
You'll also have to download the patch files for drm-510-kmod (files_drm_510_kmod.shar) and build and install it.
If any of this work gets committed, I'll update the list to indicate that.
Bugs
Bug #264775 - acpi_thermal: passive cooling only reduces power consumption on cpu0.
When the acpi_thermal passive cooling code was written, all the cpus on a chip ran at the same speed. Now that that is no longer true, it is necessary to adjust the frequency of every cpu.Instead of fixing just this bug, use this patch which both fixes the bug, provides for the adjustment of passive and active cooling temperature limits through power_profile, and adds support for suspending the system (instead of shutting it down entirely) if it overheats: thermal_management-13.3-RELEASE.diff
- The portion of this patch that provides support for suspending the system if it overheats has made it into 14-STABLE so the patch will only apply cleanly to 13.3-RELEASE.
Bug #265742 - Some mouse controllers do not handle the USB SetProtocol negotiation.
As a result, they cannot be used with FreeBSD. The attached patch adds a quirk to inhibit the use of SetProtocol, and also fixes a problem wherein a USB endpoint which provides both mouse and keyboard services cannot be configured to act as a keyboard. For futher information read the bug report.Here is a patch relative to 13.3-RELEASE: usb_hid_setprotocol-13.3-RELEASE.diff
Bug 265001 - lua incorrectly parses lines that contain comments containing the double-quote '"' character.
The bug report gives examples.Here is a patch relative to 13.3-RELEASE: lua_commentparse-13.3-RELEASE.diff
Bug 264729 - System time becomes erratically incorrect after suspend/resume if ntpd is running.
The mechanism by which this happens is described in the bug report.Here is a patch relative to 13.3-RELEASE: ntp-13.3-RELEASE.diff
Device Drivers
- acpi_hidd - One of the ACPI to-do list items, this provides a general way of handling ACPI keys, generating evdev and devd events from them. It currently directly handles brightness changes in the same way as acpi_video, but ideally would be properly integrated with it and the various vendor ACPI drivers. On the other hand, this way it can be easily installed
by downloading it from github and building it as a loadable module or port.
- gmlgpio - A driver providing gpio control for Intel CPUs based upon the Gemini Lake / Goldmont Plus architecture. As Intel's GPIO API finally stabilized on something reasonable here, it's perhaps also a reasonable beginning of a general Intel GPIO driver.
This also can be downloaded from github and built as a loadable module or port.
New Developments
- Rotation of FreeBSD's vt(4) and loader consoles:
LCD panel have a native orientation, namely that which puts the pixel addressed by 0,0 in the upper left corner. It is increasingly common to obtain a panel intended for use in portrait mode (in, e.g., a tablet) and use it in landscape mode in a laptop/notebook.
Such a device will need to have the screen rotated by the correct multiple of 90 degrees by each display management system. In FreeBSD, this would typically be the boot loader, the console driver (usually vt(4)), and X or Wayland.
In the cases of X and Wayland, the rotation is easily handled by existing configuration options. This is not the case with the boot loader or console, and the purpose of this code.
The specification of any required rotation should be done in the SMBIOS VBT table (when this option is available), where there are bits reserved there for this purpose. They are rarely used at this time, probably because the engineers building these devices don't know about them. Other options include a quirk table and manual configuration in /boot/loader.conf.
The quirk table and VBT lookup is done by the linux code in the drm-kmod module. The loader.conf file data is obtained by the loader's parser. The information from each of these sources must be shared with the other participants. Inside of FreeBSD, this is done with kenv(2). One problem remains - how to pass it to the loader when it starts, before it has had a chance to read the (possibly encrypted, requiring a prompt and a response) root filesystem? The solution used here is to store the data in a UEFI variable.
There are three separate patches providing full functionality; one for each of the loader, the vt(4) framebuffer, and the drm-kmod module.Each of the patches will work with or without the others.
Loader patch: loader_rotate-13.3-RELEASE.diff
This patch will add functionality to rotate the loader screen as directed in /boot/loader.conf, or as otherwise directed by the drm-kmod module. It includes an /etc/rc.d script to store a drm-kmod discovered orientation in a UEFI variable for use during startup.vt(4) framebuffer patch: vt_rotate-13.3-RELEASE.diff
drm-510-kmod patch: files_drm_510_kmod.shar
This patch is in the form of 4 patch files bundled in a shell archive, to be added to the port's files directory. The port should then be rebuilt and reinstalled.
Contact
Feel free to contact me regarding these projects, which are somewhat elaborated on here: Laptops/GPD_MicroPC
Email: <crahman AT gmail DOT com>