====== Information ====== * FreeBSD ((https://www.freebsd.org/)) * 14.1 ((https://www.freebsd.org/releases/14.1R/relnotes/)) ((https://www.freebsd.org/releases/14.1R/announce/)) * Xfce ((https://www.xfce.org/)) ====== TODOs ====== * [[bsd;notes;freebsd]] * Joystick [[bsd;notes;joystick#devdconf|devd.conf]] * Android ''adb'' ([[https://forums.freebsd.org/threads/adb-android-tools.93731/#post-670844|post]]) * PC speaker beep at log-in ([[https://forums.freebsd.org/threads/how-to-have-pc-speaker-beep-when-log-in-is-ready.94934/|thread]]) * Xfce theme sounds with libcar-something-gtk3 * Solo U2F key and Firefox * ZFS repair notes/commands * Wargus with GOG files (works; wine gog install, :?: no xpac 2nd extract) * 720p 1080p desktop res change desktop launchers * Wine ''wine.bin'' kill desktop launcher * Look into ''/dev/dsp'' magic (doesn't exist with ''ls'', sometimes stuff complains about it not existing) * Xfce Sticky Keys notification ([[https://forums.freebsd.org/threads/disable-random-notification-about-sticky-keys.94929/|thread]]) * i915 GuC/HuC firmware ([[https://forums.freebsd.org/threads/is-intel-gpu-guc-huc-firmware-used-hw-i915kms-enable_guc.94924/|thread]]) ====== Download ====== * https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/14.1/ * ''dvd1.iso'' can also be ''dd'''d to USB drives according to [[https://www.freebsd.org/releases/14.1R/announce/|Announcement]] ((''dvd1: Additionally, this can be written to a USB memory stick (flash drive) for the amd64 architecture and used to do an install on machines capable of booting off USB drives.'')) and worked fine for installing FreeBSD-14.1-RELEASE-amd64-memstick.img ====== Installation Notes ====== ===== Partitioning ===== ==== Notes ==== * 2024/09/09: openSUSE TW Xfce LiveUSB could mount UFS through command-line (not GNOME Disks/GUI) ((''mount -t ufs -o loop,ro,ufstype=ufs2 /dev/nvme0n1p2 /media/p2'')) * :!: 2024/09/09: openSUSE TW Xfce LiveUSB could not mount ZFS even after adding the filesystems repo and installing ''zfs'' ((''zfs'' module not found; some users mention it hasn't built since kernel 6.3)) * 2024/09/10: UFS (NVMe 512e/4K) doesn't appear faster than ZFS real-world testing ==== ZFS ==== * Auto ZFS on Root * Pool Type/Disks: stripe: 1 disk (''nda0'', [[linux;notes;drive_wipe#k_sectors|4k Sectors, wiped NVMe]]) * Partition Scheme: GPT (UEFI) (defaults to ''BIOS+UEFI'') ===== System Configuration ===== * [x] ''local_unbound'' * ''sshd'' unchecked * ''moused'' unchecked * [x] ''ntpd'' * [x] ''ntpd_sync_on_start'' * ''powerd'' unchecked * ''dumpdev'' unchecked ===== System Hardening ===== * 2024/09/13: Everything enabled * [x] ''hide_uids'' * [x] ''hide_gids'' * [x] ''hide_jail'' * [x] ''read_msgbuf'' * [x] ''proc_debug'' * [x] ''random_pid'' * [x] ''clear_tmp'' * [x] ''disable_syslogd'' * [x] ''secure_console'' * [x] ''disable_ddtrace'' ===== User ===== * Invite to other groups: ''wheel'' * Shell: ''sh'' ===== Network ===== * DHCP or Static on Ethernet (''em0'') * DHCP on USB Tether (''ue0'') * :!: Wifi didn't seem to ask for a passcode after scan/select during install ((works [[#wireless|post-install]])) * 2024/09/12: Enabling IPv6 DHCP causes a long-pause during boot ====== Network ====== ===== Troubleshooting ===== * :?: TODO: There's a command iirc to reset routing tables; ''netstart'' only seems to refresh and not replace the old tables * :?: 2024/09/10: NAS transfer speeds over 1Gbps Ethernet connected to a bridged AC router caps around 25MB/s; TODO: Windows got 40MB/s su -l /etc/netstart ===== Wireless ===== * https://docs.freebsd.org/en/books/handbook/network/#network-wireless * :!: AC speeds aren't supported ((2024/09/08: Intel Wireless-AC 9560: 30MB/s from NAS with ''wifibox'', 2MB/s native, 15MB/s USB Tether)) su -l ee /etc/wpa_supplicant.conf network={ ssid="myssid" psk="mypsk" } ===== USB Tethering ===== * https://forums.freebsd.org/threads/usb-tethering-detected-and-up-but-no-internet.88441/ * May also be any USB network device if it shows under ''ue#'' su - sysrc ifconfig_ue0=SYNCDHCP /etc/netstart ====== Update ====== * https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-security-patches su - freebsd-update fetch install sync && reboot su - pkg update --force pkg upgrade ====== Xorg ====== * https://docs.freebsd.org/en/books/handbook/x11/#x-install su - pkg install xorg drm-kmod pw groupmod video -m espionage724 sysrc kld_list+=i915kms ====== Xfce ====== * https://docs.freebsd.org/en/books/handbook/desktop/#xfce-environment su - pkg install xfce ee /etc/fstab # Xfce proc /proc procfs rw 0 0 sysrc dbus_enable="YES" echo '. /usr/local/etc/xdg/xfce4/xinitrc' > /home/espionage724/.xinitrc chown espionage724:espionage724 /home/espionage724/.xinitrc sync && reboot ===== Login ===== * Username -> Password -> ''startx'' startx ====== Software ====== su - pkg install firefox pkg install evince-lite evolution filezilla foliate gbrainy gimp keepassxc libreoffice mate-calc mpv thunar-archive-plugin transmission-gtk xfce4-screensaver xfce4-screenshooter-plugin xfce4-whiskermenu-plugin android-tools aria2 cups en-freebsd-doc en-hunspell fluid-soundfont gnome-keyring gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-libav gtk-sharp30 htop icoutils libressl mesa-demos noto unar wget xarchiver xdg-user-dirs xrandr yt-dlp ===== Test ===== **** TODO ===== VirtualBox ===== **** virtualbox-ose ===== Wine ===== * https://docs.freebsd.org/en/books/handbook/wine/#installing-wine-on-freebsd wine wine-gecko wine-mono winetricks ===== Intel ===== * ''libva-intel-media-driver'' is theoretically better but is mentioned to be unmaintained libva-intel-driver ===== Games ===== * [[games;bsd;devilutionx|DevilutionX]] * [[games;bsd;doomsday_engine|Doomsday Engine]] * TODO: Joystick fix for ''neverball'' devilutionx doomsday neverball xonotic ==== FlightGear ==== * [[games;controller_bindings;flightgear_sidewinder_joystick|Sidewinder Precision Pro Joystick Bindings]] * ''flightgear'' is launched with ''fgfs'' and has no desktop launcher * ''fgfs'' can quick-check if game controllers are usable flightgear flightgear-data fgfs --launcher fgjs ==== Other ==== **** minecraft-client ===== Tor Browser ===== **** tor-browser ====== Settings ====== ===== Groups ===== * ''operator'' to allow general reboot/power-off and [[https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-virtualbox-usb-support|VirtualBox]] su -l pw groupmod 'operator' -m 'espionage724' ===== XDG Dirs ===== * Requires [[#software|xdg-user-dirs]] xdg-user-dirs-update --force ===== 32-bit Wine ===== * :!: Needs done as regular user running Wine apps and **not** from ''su -'' ((''pkg32.sh'' has ''echo "Don't run this script as root!"'')) '/usr/local/share/wine/pkg32.sh' install wine mesa-dri gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-libav libressl '/usr/local/share/wine/pkg32.sh' update --force '/usr/local/share/wine/pkg32.sh' upgrade ===== Xfce ===== ==== Appearance ==== * TODO: https://github.com/grassmunk/Chicago95/blob/master/INSTALL.md#install_theme * Style -> Greybird * Icons -> elementary Xfce * Fonts -> **Enable** anti-aliasing -> Uncheck and re-check for full check-mark * Fonts -> Rendering -> Hinting: None * Fonts -> Rendering -> Sub-pixel order: None * Fonts -> DPI -> Uncheck Custom DPI setting ==== Panel Preferences ==== * Items -> Add -> Whisker Menu (move to beginning of Items and remove Applications Menu) ((default app menu doesn't allow right-clicking desktop entries which prevents extra 2004scape and Wine launcher stuff)) * Items -> Window Buttons -> Settings Wrench -> Uncheck ''Group windows by application'' ==== Terminal ==== * General -> [x] Unlimited Scrollback * Appearance -> [x] Use system font ((seemingly resolves arrow-scrolling-commands text from sometimes getting stuck, and looks better)) * Appearance -> Background -> Transparent Background ''0.80'' ==== Window Manager ==== * Style -> Theme -> Greybird-dark-accessibility ===== loader.conf ===== ==== Spinesnap ==== * Last updated: 2024/09/14 su - ee '/boot/loader.conf' ecurity.bsd.allow_destructive_dtrace=0 kern.geom.label.disk_ident.enable="0" kern.geom.label.gptid.enable="0" cryptodev_load="YES" zfs_load="YES" autoboot_delay="2" hw.usb.usbhid.enable="1" ==== Unused ==== hw.acpi.osname="Windows 2017" exec="gop set 0" ==== Boot Commands ==== * TODO: Under misc boot gop list ===== rc.conf ===== ==== Spinesnap ==== * Last updated: 2024/09/13 su - ee '/etc/rc.conf' clear_tmp_enable="YES" syslogd_flags="-ss" hostname="Spinesnap" ifconfig_em0="inet 192.168.1.150 netmask 255.255.255.0" defaultrouter="192.168.1.1" local_unbound_enable="YES" ntpd_enable="YES" ntpd_sync_on_start="YES" moused_nondefault_enable="NO" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="NO" zfs_enable="YES" kld_list="i915kms" dbus_enable="YES" cupsd_enable="YES" ===== sysctl.conf ===== ==== Spinesnap ==== * https://docs.freebsd.org/en/books/handbook/config/#hwpstate_intel * TODO: Device hint or devd.conf to change the epp state on AC/BAT states? * Last updated: 2024/09/14 su - ee '/etc/sysctl.conf' security.bsd.see_other_uids=0 security.bsd.see_other_gids=0 security.bsd.see_jail_proc=0 security.bsd.unprivileged_read_msgbuf=0 security.bsd.unprivileged_proc_debug=0 kern.randompid=1 vfs.zfs.min_auto_ashift=12 dev.hwpstate_intel.0.epp=0 ===== syslog.conf ===== ==== all.log ==== ==== Enable ==== * Uncomment su -l ee '/etc/syslog.conf' #*.* /var/log/all.log ==== Permissions ==== su -l touch '/var/log/all.log' && chmod '600' '/var/log/all.log' ==== View ==== su -l ee '/var/log/all.log' ===== device.hints ===== ==== Spinesnap ==== * https://docs.freebsd.org/en/books/handbook/multimedia/#sound-mixer * https://forums.freebsd.org/threads/thinkpad-x270-audio-device-hints-for-headphones.74193/ * For built-in speaker and 3.5mm headphone jack auto-switch * Last updated: 2024/09/09 su - ee '/boot/device.hints' hint.hdac.0.cad0.nid20.config="as=1 seq=0" hint.hdac.0.cad0.nid33.config="as=1 seq=15 device=Headphones" ===== Keyboard Shortcuts ===== bash -c "secret-tool lookup 'keepass' 'default' | keepassxc --pw-stdin ~/'Documents/keepass.kdbx'" xfce4-terminal --title='FreeBSD Updater' --command "su -l 'root' -c 'pkg update --force && pkg upgrade && freebsd-update fetch install && sync && echo 'Done' && sleep '3''" xfce4-popup-whiskermenu mixer 'vol'='+5%' >> /dev/null 2>&1 mixer 'vol'='-5%' >> /dev/null 2>&1 mixer 'vol'='mute=toggle' >> /dev/null 2>&1 ==== Keys ==== * Listed respectively to above * Ctrl + Alt + Z * F6 * Super/Windows Key * ''mixer'' commands bound to ''AudioRaiseVolume'', ''AudioLowerVolume'', and ''Audio Mute'' ((when set from a USB keyboard, requires ''hw.usb.usbhid.enable=1'')) ===== Network ===== ==== local-unbound DNS ==== * https://docs.freebsd.org/en/books/handbook/network/#configuring-nameserver * Already done during install by ''local_unbound'' su - ee '/etc/rc.conf' local_unbound_enable="YES" ee '/etc/resolv.conf' nameserver 127.0.0.1 options edns0 ===== Printer ===== * https://docs.freebsd.org/en/books/handbook/printing/ ==== CUPS ==== * https://docs.freebsd.org/en/articles/cups/ su - ee '/etc/rc.conf' cupsd_enable="YES" service 'cupsd' start ==== Printer ==== * http://localhost:631/ * Log-in as regular user * Internet Printing Protocol (ipps) -> HP -> IPP Everywhere * Output Mode: DeviceGray * Duplex: DuplexNoTumble ((presumably double-sided printing, flip-on-long-edge)) * Administration -> Set As Server Default * :!: TODO: Test ipp://192.168.1.164/ipp/print ===== Game Controllers ===== * :!: See [[bsd;notes;joystick|Joystick]] ===== profile.d ===== ==== SDL ==== * 2024/09/09: ''SDL_SOUNDFONTS'' was needed for [[games;bsd;doomsday_engine#audio|Doomsday Engine]] su - ee '/usr/local/etc/profile.d/SDL-tweaks.sh' # SDL export SDL_SOUNDFONTS='/usr/local/share/sounds/sf2/FluidR3_GM.sf2' export SDL_AUDIODRIVER='dsp' # End ===== VirtualBox ===== * :!: Requires ''src'' for kmod * https://wiki.freebsd.org/VirtualBox * https://docs.freebsd.org/en/books/handbook/virtualization/#virtualization-host-virtualbox * Reboot after doing everything su -l ee '/boot/loader.conf' vboxdrv_load="YES" ee '/etc/rc.conf' vboxnet_enable="YES" devfs_system_ruleset="system" pw groupmod vboxusers -m 'espionage724' ee '/etc/devfs.conf' # VirtualBox own vboxnetctl root:vboxusers perm vboxnetctl 0660 [system=10] add path 'usb/*' mode 0660 group operator perm cd* 0660 perm xpt0 0660 perm pass* 0660 # End ==== Install Notes ==== Running VirtualBox as non-root user may fail with a fatal error NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file. If you experience "Network: write Failed: Cannot allocate memory" errors try to increase net.graph.maxdata in /boot/loader.conf vm.max_user_wired https://bugs.freebsd.org/252227 ("RAM in GB" - max(1, "RAM in GB" / 32)) * 1024*1024*1024 / PAGE_SIZE PAGE_SIZE on x86 is 4096. https://bugs.freebsd.org/259399 ===== KeePassXC ===== ==== Settings ==== * General -> [ ] Load previous databases on startup * Security -> [x] Use DuckDuckGo service to download website icons ==== Add Database Password to GNOME Keyring ==== **** secret-tool store --label='KeePass' 'keepass' 'default' ===== mpv ===== mkdir -p ~/'.config/mpv' && ee ~/'.config/mpv/mpv.conf' save-position-on-quit sub-auto=fuzzy force-window=yes profile=gpu-hq scale=ewa_lanczossharp cscale=ewa_lanczossharp video-sync=display-resample interpolation tscale=oversample hwdec=vaapi hwdec-codecs=all ===== Secure Shell ===== * TODO ===== Drive Maintenance ===== * TODO ===== Wine ===== * See [[bsd;notes;wine|Wine]] ===== Xorg ===== * [[bsd;notes;xorg.conf_snippets|xorg.conf Snippets]] ==== Full RGB HDMI ==== * ''xrandr'' lines go above ''xfce4/xinitrc'' ee ~/'.xinitrc' xrandr --output HDMI-1 --set "Broadcast RGB" Full xrandr --output HDMI-1 --set "content type" Game . /usr/local/etc/xdg/xfce4/xinitrc ====== Firefox ====== * See [[programs;firefox|Firefox]] ====== Notable Folders and Commands ====== ===== Drive Wipe ===== gpart show gpart destroy -F 'da0' ===== USB Flash Drive ===== camcontrol devlist usbconfig -d '/dev/ugen0.6' power_off ===== User/Group ===== awk -F":" '{print $1}' /etc/passwd awk -F":" '{print $1}' /etc/group ===== pkg ===== * ''x'' is package name pkg info -l x pkg autoremove ===== Handbook ===== pkg info -l 'en-freebsd-doc' gio open '/usr/local/share/doc/freebsd/en/books/handbook' ===== CPU Frequency ===== **** su -l root -c "sysctl 'dev.cpu.0.freq' 'dev.cpu.1.freq' 'dev.cpu.2.freq' 'dev.cpu.3.freq' 'dev.cpu.4.freq' 'dev.cpu.5.freq' 'dev.cpu.6.freq' 'dev.cpu.7.freq'" ===== Network Restart ===== su -l /etc/netstart ===== hw-probe ===== * https://bsd-hardware.info/ * https://bsd-hardware.info/?view=howto * 2024/09/13: [[https://bsd-hardware.info/?probe=99f8e55057|Spinesnap]] su -l pkg install 'hw-probe' hw-probe -all -upload ===== Crashdump Clean-up ===== **** rm -fv ~/*'.core' ===== Xfce Settings Reset ===== rm -fv ~/'.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml' gio open ~/'.config/xfce4/xfconf/xfce-perchannel-xml' ===== Audio Output Switch ===== * https://docs.freebsd.org/en/books/handbook/multimedia/#sound-mixer * https://man.freebsd.org/cgi/man.cgi?query=mixer mixer -a echo ' Headphones ' && mixer -d 'pcm1' -f '/dev/mixer1' echo ' Onboard ' && mixer -d 'pcm0' -f '/dev/mixer0' ===== Logs ===== newsyslog -v -CC -N cat '/dev/null' > '/var/log/all.log' cat '/dev/null' > '/var/log/Xorg.0.log' gio open '/var/log' ls -la '/var/log' ===== Other Files/Paths ===== * TODO