Skip to content

Latest commit

 

History

History
137 lines (130 loc) · 6.2 KB

File metadata and controls

137 lines (130 loc) · 6.2 KB

Enhancements

By enabling a locale using UTF-8 character encoding, the system can understand and display each of the 1112064 characters in the Unicode character set, instead of just US ASCII as its default with LANG=C.

  1. Some third-party software options can only be set at compile time. You should consider the following softwares:
  • Common UNIX Printing System (CUPS),
  • Network Audio System (NAS) and
  • Qt style that renders using GTK (QGTKSTYLE).

Do this with

echo "QT4_OPTIONS= CUPS QGTKSTYLE NAS" >> /etc/make.conf

Note that if you change QT4_OPTIONS after Qt toolkit is installed you will need to rebuild devel/qt4-corelib and x11-toolkits/qt4-gui.

  1. Changes to vi /etc/sysctl.conf file include
  • expanding amount of shared memory,
  • tuning process scheduler and
  • increasing the limit of simultaneously open files (to something sensible).
# Enhance shared memory X11 interface
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768
# Enhance desktop responsiveness under high CPU use (200/224)
kern.sched.preempt_thresh=224
# Bump up maximum number of open files
kern.maxfiles=200000
# Disable PC Speaker
hw.syscons.bell=0
# Shared memory for Chromium
kern.ipc.shm_allow_removed=1

Note that:

  • printf "\a" to test the beep sound or its absence
  • kern.ipc.shm_allow_removed=1 removes the need of manually changing this flag for Chrome users.
    • It also improves compatibility with Linux applications running under Linuxulator compatibility layer, and possibly also helps in porting software from Linux.
    • The flag allows applications to create the shared memory segment, attach it, remove it, and then continue to use it and to reattach it later.
      • This means that the kernel will automatically "clean up" after the application exits.
  1. Some enhancements can only be set at boot in vi /boot/loader.conf. This is also where you define kernel modules to load at boot. [p662 Absolute FreeBSD 2ndEd] See this example /boot/loader.conf.
# Use new graphical console driver
kern.vty=vt
# Devil worship in loader logo
loader_logo="beastie"
# Boot-time kernel tuning [https://en.wikipedia.org/wiki/Shared_memory]
kern.ipc.shmseg=1024  # maximum number of System V shared memory segments any one process can open
kern.ipc.shmmni=1024  # maximum number of System V shared memory segment identifiers in the system
kern.maxproc=10000    # maximum number of processes the system can run at any one time
# Load MMC/SD card-reader support
mmc_load="YES"
mmcsd_load="YES"
sdhci_load="YES"
# Access ATAPI devices through the CAM subsystem
atapicam_load="YES" # Even if the computer has modern sata drives and compatible with SAS controllers
# Filesystems in Userspace
fuse_load="YES"     # to mount NTFS drives under FreeBSD
# CPU thermal sensors
coretemp_load="YES" # Intel Core thermal sensors
#amdtemp_load="YES" # AMD K8, K10, K11 thermal sensors
# In-memory filesystems
tmpfs_load="YES"
# Asynchronous I/O
aio_load="YES"
# Handle Unicode on removable media
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES"
# Load sound subsystem
snd_driver_load="YES"
# Enable better trackpad support
hw.psm.synaptics_support=1
[See https://blog.wedrop.it/freebsd/2016/04/23/freebsd-setup.html]
  1. Enable everything by setting vi /etc/rc.conf
moused_enable="YES"
# powerd: hiadaptive speed while on AC power, adaptive while on battery power
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive"
# Reduce power consumption by using higher C-states than the default of C1
performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"
# Enable BlueTooth
hcsecd_enable="YES"
sdpd_enable="YES"
# Synchronize system time
ntpd_enable="YES"
# Let ntpd make time jumps larger than 1000sec
ntpd_flags="-g"
# Enable hardware detection and interprocess communication.
hald_enable="YES"
dbus_enable="YES"