# OpenBSD 7.4 Experiments Part 2: Setup and Refinement As I became more familiar with the system, it was time to reconfigure some things. ## openrsync I started with rsync on the server since I don't actually have a working RAID setup at this time, though it's certainly planned. OpenBSD includes its own tool called openrsync(1), but as of this writing it requires rsync to be installed since it is a work in progress. In spite of that, it's proven to be quite useful since I've set up a cron job to run every hour, making a backup of any files that change. This marks the first time I've ever used cron. Having rsync run directly by crontab will send an email filled with junk as it updates the number of "files to consider", which sadly cannot be turned off without disabling ALL output. I'd like to know when a file transfer fails, so I put the following command in a shell script to be run by cron: openrsync -av --delete $HOME $REMOTE; sync This will preserve the attributes of the files and list only the files that were transferred, resulting in much shorter emails. It also deletes files on the remote which no longer exist on the source. ## SSH On the server, editing /etc/ssh/sshd_config was necessary to prevent dropped connections during idle times. These two lines did the trick just fine: ClientAliveInterval 15 ClientAliveCountMax 4 Now I can use SSHFS from the laptop and mount a remote filesystem securely. ## wsconsctl The wsconsctl command is used to view or set parameters related to the mouse, keyboard and display. When run with no arguments, it shows all available parameters. Iv'e added the following lines to /etc/wsconsctl.conf so they will take effect on every boot of the T490. display.brightness=10.00% # just two steps above off keyboard.repeat.del1=250 # default 400, sets the delay keyboard.repeat.deln=30 # default 100, sets the repeat rate mouse.tp.disable=1 # disable the touchpad, but not the red button It took a while for me to figure this out, which reinforces the need to READ THE MAN PAGES. Unfortunately I couldn't seem to change the values for display.fontwidth and display.fontheight on the server. I tried setting them to 8 and 16 to get a nice 80x30 console on the 8" display, but these values are read-only. Since I rarely use the server directly, I can live with this. ## apmd and obsdfreqd This one is confusing. I enabled apmd in 'auto' mode so that it would adjust the CPU frequency automatically. On battery power, it sets it to 400MHz, while on AC it goes above 2GHz. Unfortunately there's an issue that seems to involve AML (whatever the hell that is). Whenever the cord is plugged in or removed, the xconsole shows '### AML PARSE ERROR', followed by a bunch of stuff that I just don't understand. A direct consequence is that apm(8) fails to update the state of the power connection when it changes. The only way to make it update is to suspend the system with the 'zzz' command, or close the lid. While reading the OpenBSD webzine, I learned that "the behavior of apmd has changed", and that there's a new tool called obsdfreqd for managing CPU speed from userpsace. The default settings set the CPU to 900MHz when on battery, while the high performace mode sets it to over 4GHz. This too fails to update without suspending, so I'm hoping there's a fix around the corner soon. I should mention that with obsdfreqd(1) installed, one must run apmd(8) in manual mode, using either the '-L' or '-H' flags. Either way, the overall power usage remains around 7.2W on average when using the battery. This results in about 6.5 to 7 hours of runtime, similar to how FreeBSD performed on the old T430. ## .xsession This is new to me as I've always used ~/.xinitrc on Void, but it seems to be identical in its purpose. Unlike the latter, this one has a few additions. ### My own .xsession file # Use UTF-8 everywhere export LC_CTYPE="en_US.UTF-8" # Specify location of kshrc # Required to get customized promt and other settings outside of tmux export ENV=$HOME/.kshrc # Load Xresources file for additional customizations (currently unused) #xrdb -merge $HOME/.Xresources # Set the background color of the window manager xsetroot -solid black # Set the keyboard repeat delay and rate xset r rate 250 30 # Disappear the mouse cursor when it doesn't move for a while unclutter -root -idle 2 -noevents & # Disable touchpad while typing (fails on OpenBSD, use wsconsctl) #syndaemon -i 5 -d & # Set the desired window manager with (optional) default programs started cwm & st -g 80x30 -z 22 # NOTE: '-z' flag requires the font-size patch. ### End => ../index.gmi Home => ../core.gmi Core Dump Index