freebsd on a thinkpad w530
Table of Contents
- overview
- networking (wpa supplicant)
- window manager (x11 / fluxbox)
- display manager (xdm)
- better video drivers (drm-kmod)
- wake up laptop on lid-up
- audio (pulse)
- improve battery life (powerd, xbrightness)
- brightness via function keys
- put all .core files in one directory
- extra little things (sakura, rofi, scrot)
- helpful resources
- helpful commands
overview
freebsd on a thinkpad W530
my bro found a thinkpad w530 for cheap, as it needed a replaced power jack. i fixed it and put freebsd on it, & am happy to be using it :3
while configuring the system, i wrote down my process in a text file, so that i could write this web page. it's mostly just for future reference for myself, so hi, me
- cpu:
intel i7-3740qm - gpu:
quadro k1000m - memory:
8gb - username:
mahkesis - os:
freebsd 14.2 amd64 - shell:
ksh93 - window manager:
fluxbox - terminal:
sakura
sorry that i don't use wayland / pipewire / other cool stuff. i am old :3
networking (wpa supplicant)
i didn't set up networking during the install process, so i had to figure that out manually afterwards.
i checked which wifi card i have with:
sysctl net.wan.devices pciconf -lv | grep -A1 -B3 network
my card is listed as Centrino Advanced-N 6205 and iwn0. i checked the hardware compatibility page for wireless networking adapters, which tells me that the driver i want is iwn.
# in /etc/rc.conf wlans_iwn0="wlan0" ifconfig_wlan0="WPA DHCP"
and i also made sure to have an /etc/wpa_supplicant.conf file:
ctrl_interface=/var/run/wpa_supplicant eapol_version=2 ap_scan=1 fast_reauth=1 network={ ssid="my ssid" scan_ssid=1 psk="my_password123" priority=5 } network={ priority=0 key_mgmt=NONE }
window manager (x11 / fluxbox)
i installed fluxbox because i think its cute
pkg install fluxbox xorg xorg-server xorg-fonts xorg-apps xeyes
i have to add the user to the video group in order to use x11.
pw usermod mahkesis -G video
i have an ~/.xinit file that looks like:
setxkbmap us dvp -option:ctrl:nocaps
exec startfluxbox
then i can run startx and everything works ;3
display manager (xdm)
i personally don't use a display manager. i opt to start my server manually if i want graphics. i do so like this:
pkg install xdm
in /etc/rc.conf i put xdm_enable="YES.
in /etc/ttys, on the line:
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure
i changed off to on.
in ~/.xsession, i put:
xrdb -Dhostname=siwapoy $HOME/.config/X11/Xresources set c off s 300 startfluxbox
i edited /usr/local/etc/xdm/Startup_0 and added:
setxkbmap us dvp -option ctrl:nocaps
better video drivers (drm-kmod)
i checked to see what video card i have:
pciconf -lv | grep -B4 VGA
im running intel, so i did:
pkg install drm-kmod
sysrc kld_list+=i915kms
- In the past, my tty display would be broken with this driver, but i don't have this issue anymore.
For NVIDIA drivers
i don't use my discrete graphics card, but I can if I install:
pkg install nvidia-driver-390 nvidia-xconfig nvidia-settings
i install the 390 driver as that's the driver my card (Quadro K1000M)is supported by.
then i run nvidia-xconfig, putting the file in /etc/X11/xorg.conf and restart xorg.
Change brightness on NVIDIA via: nvidia-settings -a BacklightBrightness=50
wake up laptop on lid-up
sysctl hw.acpi.lid_switch_state=S3 sysctl hw.acpi.reset_video=0 sysctl acpi.handle_reboot=0
- also check out
hw.acpi.reset_video=1if the display won't turn back on.
audio (pulse)
i installed pavucontrol and it works out of the box.
i installed pamixer so that i can bind keys to volume up/down.
- volume up:
pamixer -i 5 - volume down:
pamixer -d 5
improve battery life (powerd, xbrightness)
- you can check the battery life with
apm. - put
powerd_enable="YES"in/etc/rc.conf kldload backlight(requiresdrm-kmod) and thenbacklight 50
brightness via function keys
backlight(8) module requires drm-kmod
in /usr/local/etc/devd/thinkpad-backlight.conf, write:
notify 100 {
match "system" "ACPI";
match "subsystem" "IBM";
match "notify" "0x10";
action "/usr/bin/backlight + 5";
};
notify 100 {
match "system" "ACPI";
match "subsystem" "IBM";
match "notify" "0x11";
action "/usr/bin/backlight - 5";
};
then kldload acpi_ibm and service devd restart
put all .core files in one directory
normally, freebsd puts all .core dump files in the current working directory, which is silly. i edited /etc/sysctl.conf to make it put them all in a single place
# in /etc/sysctl.conf kern.corefile=/var/coredumps/%U/%N.core
extra little things (sakura, rofi, scrot)
i installed the sakura terminal emulator, the rofi application launcher, and the scrot screenshotting utility.
see my keys file in my fluxbox config for how i utilize them :3
helpful resources
- the freebsd handbook - a freely available guide to the system
- absolute freebsd - a nicely formatted book about freebsd
- any old physical book on unix is nice to have as a hardcopy reference.
- ed mastery - a book all about ed
helpful commands
man 7 intro- a list of miscellaneous man pages that are good to skim through.- check the cpu information with
sysctl hw.model hw.machine hw.ncpu - view all kernel state variables with
sysctl -a - see ram info with
sysctl hw.physmemor withtop - suspend the machine with
zzz - upgrade with
freebsd-update fetch,freebsd-update install,freebsd-update upgrade -r 15.1 - or update packages with
pkg update && pkg upgrade
i guess that's everything. overall i'm really pleased with how easy everything has been to set up :3
time will tell how well the system holds up long-term, but i hope i get to use this operating system and laptop for a long time <3