Tag Archives: openbox

FreeBSD Zero to Desktop Speedrun Challenge

I decided to take part in the FreeBSD Zero to Desktop speedrun challenge – https://wiki.freebsd.org/Speedruns – described here. On my 13 years old ThinkPad W520 from 2011 I managed to do that in 4:23 total time. As previous leader used IceWM for the task – I have chosen Openbox as its also small.

The operations and commands that needed to be done took me 1:33 and installation of base.txz/kernel.txz datasets took 0:28. Downloading and installing needed pkg(8) packages took 2:22 of time.

I used most recent 14.0-RELEASE FreeBSD version and I used native FreeBSD hypervisor called Bhyve with vm-bhyve-devel toolkit. I created a VM with 2 CPUs and 2 GB RAM and with 10 GB NVMe disk.

This is the Bhyve template for vm-bhyve-devel I used for the guest VM.

W520 % cat /vm/.templates/freebsd-uefi.conf
loader="uefi"
graphics="yes"
cpu=1
memory=1G
network0_type="virtio-net"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"

Commands I used during the speedrun are below. First install needed pkg(8) packages in the background to be able to prepare for later tasks. Because FreeBSD’s POSIX /bin/sh does not support !command syntax I switched to csh(1) to make things faster.

VM # nohup pkg install -y -g '*scfb*' xorg-minimal xinit xterm openbox &

To configure X11 with scfb driver the following /usr/local/etc/X11/xorg.conf config is needed for that (with BusID).

VM # cat /usr/local/etc/X11/xorg.conf
Section "Device"
  Identifier "Card0"
  Driver "scfb"
  BusID "0:4:0"
EndSection

To make it less typing I first generate a whole X11 config and then just trim it for the needed part.

VM # X -configure

VM # grep -B 19 -A 3 modes xorg.conf.new | sed s/modesetting/scfb/g > asd

VM # mv asd /usr/local/etc/X11/xorg.conf

I also needed to remove the X11 files at /tmp dir.

VM # rm -rf /tmp/.*unix

As these steps complete the only things need were to switch to regular asd user and start xinit(1) with openbox window manager.

VM # su - asd

VM % xinit openbox

The video that I posted on YouTube.

I also used small bash(1) written stop watch script called sw(1)https://github.com/coryfklein/sw/ – available here.

Not sure what I should add here moreΒ  – feel free to port you comment in that πŸ™‚

FreeBSD Desktop – Part 29 – Configuration – Audio Improvements

I recently added some improvements to my audio configs and settings on FreeBSD desktop.


freebsd-audio

Each of these ideas is nothing special or groundbreaking – but they all improve usability of daily FreeBSD desktop experience.

The Table of Contents for this article contains.

  • Default Audio Output
  • PulseAudio Output Change
  • Openbox Generated Sound Menu
  • Automatic Audio Output Change
  • Direct Deadbeef Audio Controls
  • Reset mixer(1) Settings
  • Sound for USB Device Attach/Detach
  • Default Audio Output
  • Summary

One of the usual things on a FreeBSD desktop is that user needs to – after attaching USB headphones – manually switch to them with sysctl(8) as root and then restart all audio apps so they will be able to use new audio output.

// LIST SOUND DEVICES

desktop # cat /dev/sndstat
Installed devices:
pcm0: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default
No devices installed from userspace



// AFTER ATTACHING USB HEADPHONES NEW pcm1 DEVICE APPEARS

desktop # cat /dev/sndstat
Installed devices:
pcm0: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <USB audio> (play/rec) default
No devices installed from userspace



// SWITCH TO NEW pcm1 DEVICE WITH sysctl(8) COMMAND

desktop # sysctl hw.snd.default_unit=1

… and after you are done listening the audio on USB audio device – then You need to do the opposite – switch back the hw.snd.default_unit to 0 sound device and also restart the audio apps again.

PulseAudio Output Change

On of the things that is indirectly forced on FreeBSD desktop users is PulseAudio. Not that long from now Firefox default audio output was switched from native FreeBSD OSS to PulseAudio for example. More and more apps are switched to it … but there at least is ONE advantage in that situation. When using PulseAudio You can switch its output on the fly as many times as You want without the need to kill or restart the applications playing audio.

Here is how it looks from the command line perspective.

// LIST PulseAudio OUTPUTS

desktop % pactl list sinks | grep 'Name: '
        Name: oss_output.dsp0
        Name: oss_output.dsp1

desktop % pactl get-default-sink
oss_output.dsp0



// SET dsp1 (ITS pcm1 ON FREEBSD DEVICES) AS DEFAULT AUDIO OUTPUT

desktop % pactl set-default-sink oss_output.dsp1

desktop % pactl get-default-sink
oss_output.dsp1



// SWITCH BACK TO dsp0 AUDIO OUTPUT

desktop % pactl set-default-sink oss_output.dsp0

desktop % pactl get-default-sink
oss_output.dsp0

But You can also use GUI pavucontrol(1) command to change PulseAudio output.

Here is the Playback tab opened.

pavucontrol-list

… and here is how You can switch current output audio device on the fly.

pavucontrol-select

Openbox Generated Sound Menu

I used it since quite long time – but I updated it with news links – for example to PulseAudio graphical interface.

The part that goes into the Openbox menu configurations is shown below.

<menu id="sound" label="sound" execute="__openbox_freebsd_sound.sh" icon="/home/vermaden/.config/openbox/icons/speaker.png" />

It looks like that on my system.

openbox-sound-menu

If You use Openbox then you may download it from this – __openbox_freebsd_sound.sh – place.

Automatic Audio Output Change

It is possible – with the use of FreeBSD devd(8) daemon – to make FreeBSD automatically switch to new audio source after its attach. I wrote the audio-source-switch.sh script for that purpose.

Here is the needed devd(8) configuration to make it work.

desktop # pkg install -y x11/zenity

desktop % cat /usr/local/etc/devd/audio_source.conf
                                                                                                                                                         
# USB/HEADPHONES/attach
attach 100 {
  device-name "pcm[0-9]+";
  action "su -l vermaden -c 'env DISPLAY=:0 /home/vermaden/scripts/audio-source-switch.sh attach 1> /dev/null 2> /dev/null &' &";
};

# USB/HEADPHONES/detach
detach 100 {
  device-name "pcm[0-9]+";
  action "su -l vermaden -c 'env DISPLAY=:0 /home/vermaden/scripts/audio-source-switch.sh detach 1> /dev/null 2> /dev/null &' &";
};

Remember to restart the devd(8) daemon everytime You dump a new config in the /usr/local/etc/devd directory.

Keep in mind that x11/zenity is needed for it to display information properly.

Now – after this change – when You plug in new USB audio output – You will see this zenity(1) dialog window.

new-audio-nothing-playing-attach

But that is only if You DO NOT play any audio currently.

If – for example – You currently use Deadbeef audio player to play music – You will see this zenity(1) dialog instead.

new-audio-output-attach

It will ask You if You want to kill that Deadbeef PID – so if You start it again – You will be able to use new audio output – but You may NOT want to kill it – hence the question.

You may also recompile Deadbeef with PulseAudio output support. Here is how the Deadbeef options in Preferences looks like after recompilation with PulseAudio support.

deadbeed-pulseaudio-output

If You already have another USB audio output attached and decided to detach it – and nothing is playing the audio – my zenity(1) script will dialog this dialog.

new-audio-nothing-playing-detach

… and if something is using the FreeBSD audio/sound subsystem – then this one.

tint2-deadbeef-buttons

Direct Deadbeef Audio Controls

I really like the mouse I use daily – the Logitech M720 – as much as I really like to use the additional buttons to increase/decrease the volume – I would really wish it would have ANOTHER two additional buttons for the next and previous song on the Deadbeef player.

Because of that I decided to add a dedicated set of buttons on my Tint2 bar on top – that would allow me to change the current Deadbeef song to the next one … or previous one … or pause it.

new-audio-output-detach

The Tint2 config was updates with this content.

desktop % grep player ~/.tint2rc
  launcher_item_app      = /home/vermaden/.apps/player-prev.desktop
  launcher_item_app      = /home/vermaden/.apps/player-stop.desktop
  launcher_item_app      = /home/vermaden/.apps/player-pause.desktop
  launcher_item_app      = /home/vermaden/.apps/player-play.desktop
  launcher_item_app      = /home/vermaden/.apps/player-next.desktop

… and the Deadbeef buttons configs looks as follows.

desktop % cat ~/.apps/player-next.desktop
[Desktop Entry]
Type=Application
Name=Deadbeef
Exec=deadbeef --next
Icon=/home/vermaden/.icons/vermaden/player-next.png

desktop % cat ~/.apps/player-pause.desktop
[Desktop Entry]
Type=Application
Name=Deadbeef
Exec=deadbeef --toggle-pause
Icon=/home/vermaden/.icons/vermaden/player-pause.png

desktop % cat ~/.apps/player-play.desktop
[Desktop Entry]
Type=Application
Name=Deadbeef
Exec=deadbeef --play
Icon=/home/vermaden/.icons/vermaden/player-play.png

desktop % cat ~/.apps/player-prev.desktop
[Desktop Entry]
Type=Application
Name=Deadbeef
Exec=deadbeef --prev
Icon=/home/vermaden/.icons/vermaden/player-prev.png

desktop % cat ~/.apps/player-stop.desktop
[Desktop Entry]
Type=Application
Name=Deadbeef
Exec=deadbeef --stop
Icon=/home/vermaden/.icons/vermaden/player-stop.png

Reset mixer(1) Settings

One of the things that annoyed me was the mixer settings when I tried to join some call/teleconference. It seemed like a random pointless fuckup. Not anymore. With small and simple mix.sh script it all gets to normal and everything works out of the box.

Here is how the mix.sh script looks like.

desktop % cat ~/scripts/mix.sh
mixer vol.volume=0.6
mixer mic.volume=0.85
mixer rec.volume=0.85
mixer pcm.volume=1.0
mixer speaker.volume=0.0
mixer monitor.volume=0.0
mixer

… and how it works.

desktop % mix.sh 
pcm0:mixer:  on hdaa0  (play/rec) (default)
    vol       = 0.60:0.60     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 0.00:0.00     pbk
    mic       = 0.85:0.85     rec src
    rec       = 0.85:0.85     pbk
    monitor   = 0.00:0.00     rec

Sound for USB Device Attach/Detach

Most desktop oriented operating systems do play some type of sound for device attach/detach so the user would get a feedback that the system is aware of his actions – like – well – attaching or detaching a USB device πŸ™‚

By default FreeBSD does not do anything like that – but its not hard to add such an action to the FreeBSD devd(8) daemon.

With the following devd(8) config FreeBSD will now play a dedicated sound on each USB device attach or detach event.

In the beginning I did not knew which sound to pick from – but after some thoughts I decided to pick some Worms Armageddon sounds – from the 007 sound theme.

worms-logo

The devd(8) config looks like that one below.

desktop # pkg install -y audio/mpg123

desktop % cat /usr/local/etc/devd/USB.conf

# USB/attach
notify 10 {
  match "system" "USB";
  match "type"   "ATTACH";
  action "su -l vermaden -c 'env DISPLAY=:0 /usr/local/bin/mpg123 /usr/local/etc/devd/USB.attach.mp3' &";
};

# USB/detach
notify 10 {
  match "system" "USB";
  match "type"   "DETACH";
  action "su -l vermaden -c 'env DISPLAY=:0 /usr/local/bin/mpg123 /usr/local/etc/devd/USB.detach.mp3' &";
};

I also assume that You will have audio/mpg123 installed to play these sounds.

Because WordPress is very limited – it will not allow me to upload plain MP3 files – but we will overcome that limitation. For the record – it is not a technical limitation – its just a limitation of the FREE PLAN that I am using on the WordPress page.

bear-grylls

Here are the commands You need to execute to fetch these two MP3 files.

desktop ~ # fetch \
              -o /usr/local/etc/devd/usb.detach.mp3.zip
              https://vermaden.files.wordpress.com/2024/01/usb.detach.mp3_.docx
/usr/local/etc/devd/usb.detach.mp3.zip                9588  B   40 MBps    00s

desktop ~ # fetch \
              -o /usr/local/etc/devd/usb.attach.mp3.zip \
              https://vermaden.files.wordpress.com/2024/01/usb.attach.mp3_.docx
/usr/local/etc/devd/usb.attach.mp3.zip                  11 kB   41 MBps    00s

desktop ~ # cd /usr/local/etc/devd

desktop /usr/local/etc/devd # unzip usb.detach.mp3.zip
Archive:  usb.detach.mp3.zip
 extracting: USB.detach.mp3  

desktop /usr/local/etc/devd # unzip usb.attach.mp3.zip
Archive:  usb.attach.mp3.zip
 extracting: USB.attach.mp3  

Now as You have the needed MP3 files – restart the devd(8) daemon.

Now everytime You will attach or detach USB device You will hear appropriate Worms Armageddon sound.

Summary

I think that I can say that nothing prevents You from running FreeBSD desktop daily. If the FreeBSD is the desktop You want – and You are still running macOS or Windows instead – You are just lazy as fuck πŸ™‚

UPDATE 1 – Other FreeBSD Audio Improvements

As usual I got a lot additional good stuff from the comments from many places.

Below I would try to summarize them.

Firefox

For the Firefox browser its possible to check the media/audio devices with about:support#media URL.

UPDATE1-firefox-media

GTK-Mixer

To have a GUI for the various volume settings You can use GTK-Mixer and its available in the FreeBSD package as audio/gtk-mixer name.

desktop # pkg install audio/gtk-mixer

desktop % gtk-mixer

Here is how it looks like.

UPDATE1-gtk-mixer

FreeBSD Audio Stack Improvements

Seems that Christos Margiolis is already working on some Audio Stack Improvements on FreeBSD thanks to FreeBSD Foundation.

This is his message:

The past (and first) week working on the audio stack, sponsored by the FreeBSD Foundation, I:

- Set up my development environment; a VM image running -CURRENT in bhyve with PCI-passthru
  enabled to do all of the driver (kernel generallly) development in the VM.

- Wrote a small series of patches for vmrun.sh:
  https://reviews.freebsd.org/D43269
  https://reviews.freebsd.org/D43270

- Modified the snd_uaudio(4) driver to provide information about the sound card
  (manufacturer, model and attached driver), as opposed to the current generic "USB Audio"
  string, so /dev/sndstat and programs like mixer(8) can output more useful information
  about USB audio devices.
  https://reviews.freebsd.org/D43347

- Submitted a patch to update (and unify) the description format for all sound devices,
  since some of them haven't been touched for years.
  https://reviews.freebsd.org/D43349

- Implemented device_set_descf() , a printf-like version of device_set_desc().
  https://reviews.freebsd.org/D43370

- Was preparing a few more smaller patches.

- Started looking into possible solutions to
  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194727
  also mentioned in the first paragraph of the BUGS section of the snd_uaudio(4) man page.

Christos

Check the the links from the message above – a lot of great FreeBSD Audio Stack changes are coming.

PulseAudio

Someone also notified my that instead of writing a script for PulseAudio to automatically switch to just connected device on could load the module-switch-on-port-available or module-switch-on-connect module.

Check the details in the pacmd list-modules command.

desktop % pacmd list-modules | grep -B 1 -A 7 module-switch 
    index: 4
        name: 
        argument: 
        used: -1
        load once: yes
        properties:
                module.author = "David Henningsson"
                module.description = "Switches ports and profiles when devices are plugged/unplugged"
                module.version = "16.1"

EOF

FreeBSD Desktop – Part 28 – Configuration – Corner Actions

I am not a big fan of macOS desktop experience. I use latest macOS daily on M1 laptop and its quite far from what I call ‘productive’ environment. Yes – all the ‘enterprise’ applications are the … but that does not make a productive desktop alone. To be honest – the version that I enjoyed the most was Mac OS X Snow Leopard … but that was about a decade ago … and I still preferred my FreeBSD desktop even way back then.

One of the nice features that macOS (or earlier Mac OS X) provided were the so called Corner Actions. They are not crucial to any workload as one can either quite fast launch the needed processes by hand or by dmenu(1) or by other means (such as keyboard shortcuts) – but yeah – its not bad to have another useful feature under your mouse … assuming that mouse make You more productive – its not counter-productive for some.

You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.

Python Based Solution

Upon my FreeBSD desktop/laptop/workstation journey I once found a Python based solution called cb-hotcorners from now discontinued CrunchBang Linux. It was not very usable as it used ‘polling’ type of thing – You set the ‘delay’ between checks and the Python script ACTIVELY checked if anything is needed to be done – if not it skips to next ‘wait’ cycle – if yes – it starts your configured executable. It may not sound as bad as it seams but keeping your cursor parked for about a second or so in the corner hoping for the script to do the right job is far from productive … not to mention wasted battery time and CPU cycles on that active waiting loop … just no.

While the CrunchBang is long gone there are two spiritual successors – CrunchBang++ and BunsenLabs ones. Seems I need to check them some time for other possible Openbox friendly features.

xidle(1)

Recently someone poked me on X/Twitter about xidle(1) running the suspend/resume command twice instead of just once … but after some digging I figured out that the xidle(1) also has some other features … and one of them is the Corner Actions feature.

After ‘bad’ experiences of slow and inefficient Python solution I checked how it would do the job … and it was instant match! πŸ™‚

For the record – the pkg(8) packages that need to be installed are listed below.

% pkg install -y xidle caja leafpad xterm skippy-xd

These two scripts below the __openbox_restart_xidle.sh and __openbox_stop_xidle.sh do all the needed job here. First one is to start needed config. Second one is to ‘stop’ all running xidle(1) instances.

% cat ~/scripts/__openbox_restart_xidle.sh
#! /bin/sh

xidle -area 3 -delay 0 -nw -program '/usr/local/bin/caja --no-desktop' &
xidle -area 3 -delay 0 -ne -program '/usr/local/bin/skippy-xd'         &
xidle -area 3 -delay 0 -sw -program '/usr/local/bin/leafpad'           &
xidle -area 3 -delay 0 -se -program '/home/vermaden/scripts/xterm.sh'  &


% cat ~/scripts/__openbox_stop_xidle.sh
#! /bin/sh

killall -9 xidle &

Below you will find xidle(1) in action on a screencast.

Actions

I configured the following xidle(1) actions:

  TOP-LEFT   caja(1) file manager
  BOT-LEFT   leafpad(1) text editor
  TOP-RIGHT  skippy-xd(1) task switcher
  BOT-RIGHT  xterm(1) terminal

Below are the running xidle(1) processes for that purpose.

xidle-ps

I still did not yet got used to it and I sometimes forgot that its there – but I would definitely keep it – muscle memory would come πŸ™‚

Side Effect

As a side effect of getting involved with xidle(1) the person from X/Twitter created a FreeBSD BUG report – 275761 – x11/xidle: triggers twice – and it was also fixed.

Delayed Automatic Suspend

As the bug is now fixed You may also want to use xidle(1) for automatic suspend of the machine after some period of inactivity. Here is the command You would use to get that feature.

% xidle -timeout 900 -program '/usr/local/bin/doas /usr/sbin/zzz'

Summary

Feel free to comment and share other useful desktop features that make your daily work better.

UPDATE 1 – Using xdotool(1) Instead

Someone on Lobsters made me realize that the same Corner Actions can be made with xdotool(1) instead. As I already use xdotool(1) for several other tasks – that would limit the amount of needed tools to accomplish the tasks for needed features of my customized FreeBSD Desktop experience.

Here are the stop and startup scripts for xdotool(1) based solution.

% cat ~/scripts/__openbox_restart_xdotool.sh
#! /bin/sh

xdotool behave_screen_edge top-left     exec caja --browser --no-desktop &
xdotool behave_screen_edge top-right    exec skippy-xd                   &
xdotool behave_screen_edge bottom-left  exec leafpad                     &
xdotool behave_screen_edge bottom-right exec xterm.sh                    &



% cat ~/scripts/__openbox_stop_xdotool.sh
#! /bin/sh

killall -9 xdotool &

It generally works the same so why bother with xidle(1) … after short test seems that xidle(1) is a lot more efficient and takes a lot less CPU time to do the same.

I have made a simple test of starting the solution – then using all four corners action and then checked CPU time (and RAM) used.

To my surprise the xdotool(1) while doing the same took slightly more RAM … but about 8 times more CPU time then xidle(1) tool. Below you will find the results after usage of both solutions.

// xidle(1)
% ps aux | grep -e xidle -e xdotool -e RSS | cut -c 42-
  RSS TT  STAT STARTED         TIME COMMAND
 4344  3  S    13:13        0:00.01 xidle -area 3 -delay 0 -nw -program caja --browser --no-desktop
 4332  3  S    13:13        0:00.01 xidle -area 3 -delay 0 -ne -program skippy-xd
 4336  3  S    13:13        0:00.01 xidle -area 3 -delay 0 -sw -program leafpad
 4332  3  S    13:13        0:00.01 xidle -area 3 -delay 0 -se -program xterm.sh

// xdotool(1)
% ps aux | grep -e xidle -e xdotool -e RSS | cut -c 42-
  RSS TT  STAT STARTED         TIME COMMAND
 5244  3  S    13:14        0:00.08 xdotool behave_screen_edge top-left exec caja --browser --no-desktop
 5236  3  S    13:14        0:00.08 xdotool behave_screen_edge top-right exec skippy-xd
 5244  3  S    13:14        0:00.08 xdotool behave_screen_edge bottom-left exec leafpad
 5252  3  S    13:14        0:00.08 xdotool behave_screen_edge bottom-right exec xterm.sh

Does that make a huge difference? No. If you already have xdotool(1) installed then you may use it for that purpose – I just wanted to check out of curiosity.

EOF

AMD Based FreeBSD Desktop

While I started to use and learn FreeBSD on an oldschool Gigabyte-GA-7DPXDW motherboard (more about that here My FreeBSD Story page) that could handle two AMD AthlonXP CPUs in SMP configuration I got used to work on the laptops in the last 10+ years or so. I did not had a desktop PC for more then a decade … and that changed recently. My buddy showed me how much fun can be to ride Dirt Rally 2.0 game on a wheel controller. I really enjoyed that so I though that I will make my own cheap gaming rig and also got some old Logitech wheel and Dirt Rally 2.0 on some Steam sale. I do not like Windows systems so I picked one that is really stripped to the core – and also preconfigured for gaming – the Windows 10 Atlas edition – https://atlasos.net/ – available here.

While the gaming rig works really nice … I rarely have time to ride that rally stages – so while hardware was already there – I thought that I will make it a FreeBSD lab box while I do not play the games (which would be 99% of the time).

logo-freebsd

Also – having various Intel based ThinkPads in past years I also wanted to check how FreeBSD copes with AMD only based hardware – on all aspects such as motherboard/CPU/GPU subsystems.

Hardware

Many years ago – somewhere about 2010 – I got SilverStone SG05 Mini ITX case for my ZFS mirror setup – yes – the one that had only 512 MB RAM and run without a problem from one power outage to another πŸ™‚

While I changed my backup solutions multiple times:

That Silverstone SG05 Mini ITX case remained unused … till recently πŸ™‚

The case is quite small for a gaming PC with less then 11 L of volume and 22.2 x 17.6 x 27.6 cm in dimensions.

case-outside-1

The attached USB dongles are used for wireless mouse and keyboard.

case-outside-2

The hardware used here is as follows:

CASE: Silverstone SG05
 PSU: Sharkoon Silent Storm SFX 500 Gold 500W
MOBO: ASUS PRIME A320I-K Mini ITX
 CPU: AMD Ryzen 3 1200 4C/4T 3.1GHz
 GPU: Sapphire AMD Radeon RX 5500 XT 8GB GDDR6
 RAM: 16 GB DDR4
DISK: SSD NVMe M.2 Intel 660p 512GB
SCRN: HP E221c FullHD Monitor

Its nice that Sharkoon Silent Storm SFX 500 Gold PSU does have detachable cables – but even with that feature the inside of the Silverstone SG05 looks quite busy.

case-inside
The another SSD that is stripped from its case is Crucial MX300 525GB SATA drive – this is the drive that hosts the Windows 10 Atlas installation. I got it for about $15 so lack of case was not a problem :p The FreeBSD is installed on the SSD NVMe M.2 Intel 660p 512GB drive.

Daily the system works vertically on a ‘side’ to take less space.

case-shelf

Dual Boot

I use the most convenient known boot loader ever invented – the [F8] key on system startup – to enter the BIOS Boot Menu πŸ™‚

FreeBSD Setup

Below I will share the setup that will allow accelerated graphics desktop along with Direct Rendering at Xorg/X11 level.

The FreeBSD version I used was 13.2-RELEASE.

CPU

To read/show CPU temperatures we will need amdtemp.ko kernel module. We will load it and enable its automatic load after each reboot.

# kldload amdtemp

# sysrc kld_list+=amdtemp

# sysctl -a | grep temperature
dev.cpu.3.temperature: 32.1C
dev.cpu.2.temperature: 32.1C
dev.cpu.1.temperature: 32.1C
dev.cpu.0.temperature: 32.1C

One thing to note here – the amdtemp.ko is used only to read/show the CPU cores temperatures. It has nothing to do with frequency scaling for which the powerd(8) is used. If you do not intent to display these temps on some infobar or use them in scripts – then you may omit this step. I was just curious what the temperatures at idle and at load were. The powerd(8) is able to choose from three frequencies on that AMD Ryzen 3 1200 CPU.

# sysctl dev.cpu.0
dev.cpu.0.temperature: 32.0C
dev.cpu.0.cx_method: C1/hlt C2/io
dev.cpu.0.cx_usage_counters: 0 0
dev.cpu.0.cx_usage: 0.00% 0.00% last 1000000us
dev.cpu.0.cx_lowest: C8
dev.cpu.0.cx_supported: C1/1/1 C2/2/400
dev.cpu.0.freq_levels: 3100/3681 2800/2940 1550/1331
dev.cpu.0.freq: 1550
dev.cpu.0.%parent: acpi0
dev.cpu.0.%pnpinfo: _HID=none _UID=0 _CID=none
dev.cpu.0.%location: handle=\_PR_.C000
dev.cpu.0.%driver: cpu
dev.cpu.0.%desc: ACPI CPU

One may got one step further and use mine sensors.sh script. Example below is with disabled powerd(8) daemon and CPU frequency set to 1.5GHz manually.

# sensors.sh

            BATTERY/AC/TIME/FAN/SPEED 
 ------------------------------------ 
               dev.cpu.0.cx_supported: C1/1/1 C2/2/400
                   dev.cpu.0.cx_usage: 0.00% 0.00% last 1000000us
                       dev.cpu.0.freq: 1550 
                hw.acpi.cpu.cx_lowest: C8 
                powerd(8)/powerdxx(8): disabled

                  SYSTEM/TEMPERATURES 
 ------------------------------------ 
                dev.cpu.0.temperature: 44.1C
                dev.cpu.1.temperature: 44.1C
                dev.cpu.2.temperature: 44.1C
                dev.cpu.3.temperature: 44.1C

                   DISKS/TEMPERATURES 
 ------------------------------------ 
       smart.ada0.temperature_celsius: 46.0C
              smart.nvme0.temperature: 43.0C

GPU

Now we will need to install the graphics/drm-kmod packages. We will just use the latest repository to have most fresh packages.

# sed -i '' -e 's|quarterly|latest|g' /etc/pkg/FreeBSD.conf

# pkg install -y drm-kmod

While the above sed(1) command works properly – the proper and official way to do that is shown below.

# mkdir -p /usr/local/etc/pkg/repos

# sed -e 's|quarterly|latest|g' /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf

The final effect is the same.

We will now check what is our GPU – as seen by the FreeBSD operating system.

# pciconf -lv vgapci0
vgapci0@pci0:10:0:0:    class=0x030000 rev=0xc5 hdr=0x00 vendor=0x1002 device=0x7340 subvendor=0x1da2 subdevice=0xe423
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Navi 14 [Radeon RX 5500/5500M / Pro 5500M]'
    class      = display
    subclass   = VGA

Accurately its AMD Radeon RX 5500 with NAVI 14 codename.

We can check if we need the radeonkms.ko module or amdgpu.ko module in following way.

# pkg search navi14
gpu-firmware-amd-kmod-navi14-20230210_1 Firmware modules for navi14 AMD GPUs

# pkg info -l gpu-firmware-amd-kmod-navi14-20230210_1
gpu-firmware-amd-kmod-navi14-20230210_1:
        /boot/modules/amdgpu_navi14_asd_bin.ko
        /boot/modules/amdgpu_navi14_ce_bin.ko
        /boot/modules/amdgpu_navi14_ce_wks_bin.ko
        /boot/modules/amdgpu_navi14_gpu_info_bin.ko
        /boot/modules/amdgpu_navi14_me_bin.ko
        /boot/modules/amdgpu_navi14_me_wks_bin.ko
        /boot/modules/amdgpu_navi14_mec2_bin.ko
        /boot/modules/amdgpu_navi14_mec2_wks_bin.ko
        /boot/modules/amdgpu_navi14_mec_bin.ko
        /boot/modules/amdgpu_navi14_mec_wks_bin.ko
        /boot/modules/amdgpu_navi14_pfp_bin.ko
        /boot/modules/amdgpu_navi14_pfp_wks_bin.ko
        /boot/modules/amdgpu_navi14_rlc_bin.ko
        /boot/modules/amdgpu_navi14_sdma1_bin.ko
        /boot/modules/amdgpu_navi14_sdma_bin.ko
        /boot/modules/amdgpu_navi14_smc_bin.ko
        /boot/modules/amdgpu_navi14_sos_bin.ko
        /boot/modules/amdgpu_navi14_ta_bin.ko
        /boot/modules/amdgpu_navi14_vcn_bin.ko
        /usr/local/share/licenses/gpu-firmware-amd-kmod-navi14-20230210_1/AMD
        /usr/local/share/licenses/gpu-firmware-amd-kmod-navi14-20230210_1/LICENSE
        /usr/local/share/licenses/gpu-firmware-amd-kmod-navi14-20230210_1/catalog.mk

As we can see the NAVI 14 is supported by amdgpu.ko kernel module – so we will enable its loading after each reboot and we will also load it now.

# kldload amdgpu

# sysrc kld_list+=amdgpu

# kldstat 
Id Refs Address                Size Name
 1  105 0xffffffff80200000  1f3e2d0 kernel
 2    1 0xffffffff8213f000   59dfa8 zfs.ko
 3    1 0xffffffff826dd000     a4a0 cryptodev.ko
 4    1 0xffffffff82e10000     3378 acpi_wmi.ko
 5    1 0xffffffff82e14000     3218 intpm.ko
 6    1 0xffffffff82e18000     2180 smbus.ko
 7    1 0xffffffff82e1b000     3340 uhid.ko
 8    1 0xffffffff82e1f000     4350 ums.ko
 9    1 0xffffffff82e24000     3380 usbhid.ko
10    1 0xffffffff82e28000     31f8 hidbus.ko
11    1 0xffffffff82e2c000     3320 wmt.ko
12    1 0xffffffff82e30000     3160 amdtemp.ko
13    1 0xffffffff82e34000     2138 amdsmn.ko
14    1 0xffffffff83000000   418220 amdgpu.ko
15    2 0xffffffff82e37000    739e0 drm.ko
16    3 0xffffffff82eab000     5220 linuxkpi_gplv2.ko
17    4 0xffffffff82eb1000     62d8 dmabuf.ko
18    1 0xffffffff82eb8000     c758 ttm.ko
19    1 0xffffffff82ec5000    2f048 amdgpu_navi14_sos_bin.ko
20    1 0xffffffff82ef5000    2c2d8 amdgpu_navi14_asd_bin.ko
21    1 0xffffffff82f22000     a3d8 amdgpu_navi14_ta_bin.ko
22    1 0xffffffff82f2d000    42a68 amdgpu_navi14_smc_bin.ko
23    1 0xffffffff82f70000    425d8 amdgpu_navi14_pfp_bin.ko
24    1 0xffffffff82fb3000    425d8 amdgpu_navi14_me_bin.ko
25    1 0xffffffff83419000    42558 amdgpu_navi14_ce_bin.ko
26    1 0xffffffff8345c000     c840 amdgpu_navi14_rlc_bin.ko
27    1 0xffffffff83469000    43a08 amdgpu_navi14_mec_bin.ko
28    1 0xffffffff834ad000    43a08 amdgpu_navi14_mec2_bin.ko
29    1 0xffffffff834f1000     a4d8 amdgpu_navi14_sdma_bin.ko
30    1 0xffffffff834fc000     a4d8 amdgpu_navi14_sdma1_bin.ko
31    1 0xffffffff83507000    64398 amdgpu_navi14_vcn_bin.ko

This is what will appear on your screen after the kldload(8) command.

amdgpu

To properly use GPU hardware we will need to add our user to the video group.

# pw groupmod video -m vermaden

We will now add some basic X11 tools along with Xorg to test our setup.

# pkg install -y xorg openbox xterm xinit mesa-demos scrot radeontop

While my desktop/laptop setup is well described in the FreeBSD Desktop page – I will only configure basic X11 setup to make sure everything works.

% echo openbox > ~/.xinitrc

% xinit

The X11 loaded Openbox properly and we can indeed verify that hardware GPU acceleration works properly.

openbox-mesa-demos

While the above image is quite small the important part is you want to see the direct rendering: Yes message from the glxinfo | grep direct command.

% glxinfo | grep direct
direct rendering: Yes

You can also check the full resolution screenshot HERE.

AUDIO

By default the audio goes out to the Mini Jack output on the motherboard.

My DisplayPort attached monitor has builtin speakers so I will switch the audio to them instead.

# cat /dev/sndstat   
Installed devices:
pcm0:  (play)
pcm1:  (play)
pcm2:  (play)
pcm3:  (play)
pcm4:  (play)
pcm5:  (play/rec) default
pcm6:  (play/rec)
No devices installed from userspace.

# sysctl hw.snd.default_unit=1

# cat /dev/sndstat
Installed devices:
pcm0:  (play)
pcm1:  (play) default
pcm2:  (play)
pcm3:  (play)
pcm4:  (play)
pcm5:  (play/rec)
pcm6:  (play/rec)
No devices installed from userspace.

To make that permanent I have added below lines to /etc/sysctl.conf file.

# cat /etc/sysctl.conf 

# AUDIO @ DisplayPort
  hw.snd.default_unit=1

While the /dev/sndstat states the output as HDMI the AMD Radeon 5500 XT has two DisplayPort outputs and two HDMI outputs.

The fifth HDMI output will be from the motherboard.

OTHER

This is how the FreeBSD main /etc/rc.conf file looks like.

# cat /etc/rc.conf
# NETWORK
  hostname=games.lab.org
  ifconfig_re0="inet 10.0.0.4/24 up"
  defaultrouter="10.0.0.1"
  gateway_enable=YES

# DAEMONS
  sshd_enable=YES
  powerd_enable=YES
  zfs_enable=YES
  ntpdate_enable=YES
  syslogd_flags="-ss"

# MODULES
  kld_list="amdgpu amdtemp"

# OTHER
  clear_tmp_enable=YES
  keymap=pl.kbd
  dumpdev=AUTO
  rc_startmsgs=NO
  rc_info=NO

# POWER
  performance_cx_lowest="Cmax"
  economy_cx_lowest="Cmax"

No other additional configuration is need.

I also uploaded the hardware probe to the bsd-hardware.info page and its available HERE.

Summary

I will use the box to test some things that I always wanted to – like Bhyve for example – or its sysutils/vm-bhyve manager. Expect some posts on this topic in the future πŸ™‚

Regards.

EOF

FreeBSD 13.2 on ThinkPad T14 (GEN1)

I used to run FreeBSD on older laptops – some more then a decade old – like my favorite ThinkPad W520 daily driver or ThinkPad X220 mobile companion. Today I will share with you my experiences of running latest production ready FreeBSD 13.2-RELEASE system on a quite modern ThinkPad T14 (GEN1) from 2021/2022 (depending on the source of the information) – which is quite new I would say.

… do not interpret this article wrong – The W520 and X220 (sometimes T420s) are still my daily/mobile/… drivers and my points explained in the Epitaph to Laptops article remain the same. I just had an opportunity to use ThinkPad T14 for several days so I thought it would be a good idea to check and document FreeBSD behavior on it.

In many parts this article will be a copy cat of the earlier FreeBSD 13.1 on ThinkPad W520 article – as the topic and configs are mostly the same – you have been warned πŸ™‚

ThinkPad T14 (GEN1)

As the ThinkPad T490 was released Lenovo needed to rethink their naming convention as the next one could have been ThinkPad T4100 (like 100 is after 90) or something different as T500 was already taken by older model … their new naming scheme is not bad – definitely better then their idea of newer keyboard layout after ditching the 7-row keyboard from 2011 and earlier models.

The model I was able to test on had quad core Intel i5-10210U model CPU which is somewhere between 25-35% faster (according to benchmarks) then the Intel i7-2860QM CPU from my ThinkPad W520. Not bad – especially knowing that the time span between their releases is 9 years … but to be honest – in real usage I do not feel that 25-35% more speed.

T14 % lscpu
Architecture:            amd64
Byte Order:              Little Endian
Total CPU(s):            8
Thread(s) per core:      2
Core(s) per socket:      4
Socket(s):               1
Vendor:                  GenuineIntel
CPU family:              6
Model:                   142
Model name:              Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
Stepping:                12
L1d cache:               32K
L1i cache:               32K
L2 cache:                256K
L3 cache:                6M
Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
                         cflsh ds acpi mmx fxsr sse sse2 ss htt tm pbe sse3 pclmulqdq dtes64
                         monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1
                         sse4_2 x2apic movbe popcnt tsc_deadline aes xsave osxsave avx f16c rdrnd
                         fsgsbase tsc_adjust sgx bmi1 avx2 smep bmi2 erms invpcid fpcsds mpx rdseed
                         adx smap clflushopt intel_pt syscall nx pdpe1gb rdtscp lm lahf_lm lzcnt

Below you can see how ThinkPad T14 (GEN1) looks like.

thinkpad-t14

To be honest I would even prefer to use ThinkPad SK-8855 USB keyboard as showed here below.

T14s-keyboard-upgraded

Specifications

Below You will find specs of this machine.

CPU: Intel Core i5-10210U (4C/8T) 14nm
RAM: 16 GB (2 * 8GB DDR4)
HDD0: 256GB WD Black SN750 M.2 [nvd(4)]
GFX0: Intel UHD Graphics (integrated) [graphics/drm-kmod]
SCR: 14.1 1920x1080 Touch Screen
USB: 2 x USB-A 3.0 + 1 x USB-C 3.0 [ehci(4) + xhci(4)]
AUDIO: Realtek ALC257 [snd_hda(4)]
PORTS: 1 x HDMI
SD: microSD Card Reader [sdhci(4)]
LAN: 10/100/1000 Intel I219-V Gigabit [em(4)]
WIFI: Intel Comet Lake PCH-LP CNVi WiFi 802.11ax [iwlwifi(4)]
CAM: Webcam 720p [multimedia/webcamd]

I have uploaded the https://bsd-hardware.info/ probe of that ThinkPad T14 to their database and its available – https://bsd-hardware.info/?probe=8aede62ca8 – here.

After messing with this laptop for a while I can tell you that in most areas its on par with mine ThinkPad W520 laptop. The battery time is similar (about 5 hours). The suspend/resume works when you use X11 with graphics/drm-kmod package. Even the touch screen works like a charm – the same as my other ThinkPad X220t (tablet) … and even no additional configuration was needed – I just used the configuration that I use daily on my ThinkPad W520 laptop. But … the WiFi does not work πŸ™‚ While iwlwifi(4) properly attaches to this card the wpa_supplicant(8) is just not able to connect to the Access Point. There are at least several ways on how to Cope with WiFi Fuckup on FreeBSD – feel free to check them out. I used my favorite fallback solution – Realtek RTL8188CUS USB dongle and that one worked really well with rtwn(4) driver.

FreeBSD System Configuration

From many things that I really like about FreeBSD (more here – Quare FreeBSD? – in separate article) is that it can be entirely configured using just 3 files. This configuration already features all power management settings that I described in the The Power to Serve – FreeBSD Power Management article.

I installed FreeBSD in a pretty standard way with GELI encryption enabled and with ZFS as the filesystem. When in doubt the installation procedure is described in the FreeBSD Desktop – Part 2.1 – Install FreeBSD 12 article.

Main FreeBSD configuration files.

  • /etc/rc.conf – to system services
  • /etc/sysctl.conf – for runtime parameters
  • /boot/loader.conf – for parameters configurable at boot

I will also include these as their are also crucial for the configuration:

  • /etc/devfs.rules – devices configuration/li>
  • /etc/fstab – filesystems configuration
  • /etc/ttys – terminal initialization configuration
  • /etc/wpa_supplicant.conf – WiFi configuration
  • /usr/local/etc/automount.confautomount(8) configuration
  • /usr/local/etc/doas.confdoas(1) configuration
  • Groups membership.

First the main /etc/rc.conf configuration file.

% cat /etc/rc.conf
# SILENCE # ------------------------------------------------------------------
  rc_startmsgs=NO

# NETWORK # ------------------------------------------------------------------
  hostname=t14.local
  background_dhclient=YES
  extra_netfs_types=NFS
  wlans_rtwn0=wlan0
  create_args_wlan0="country PL regdomain FCC4"
  ifconfig_wlan0="WPA SYNCDHCP"
  defaultroute_delay=3
  defaultroute_carrier_delay=3
  gateway_enable=YES
  harvest_mask=351
  rtsol_flags="-i"
  rtsold_flags="-a -i"

# MODULES/COMMON/BASE # ------------------------------------------------------
  kld_list="${kld_list} /boot/modules/i915kms.ko"
  kld_list="${kld_list} fusefs coretemp sem cpuctl ichsmb cuse"
  kld_list="${kld_list} libiconv cd9660_iconv msdosfs_iconv udf_iconv"

# MODULES/VIRTUALBOX # -------------------------------------------------------
  vboxnet_enable=YES
  kld_list="${kld_list} vboxdrv vboxnetadp vboxnetflt"

# POWER
  performance_cx_lowest=C1
  economy_cx_lowest=Cmax
  powerd_enable=YES
  powerd_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 2000"

# DAEMONS | yes # ------------------------------------------------------------
  zfs_enable=YES
  xdm_enable=YES
  xdm_tty=ttyv4
  nfs_client_enable=YES
  ubuntu_enable=YES
  moused_enable=YES
  syslogd_flags='-s -s'
  sshd_enable=YES
  local_unbound_enable=YES
  webcamd_enable=YES
  rctl_enable=YES

# DAEMONS | no # -------------------------------------------------------------
  linux_enable=NO
  sendmail_enable=NONE
  sendmail_submit_enable=NO
  sendmail_outbound_enable=NO
  sendmail_msp_queue_enable=NO

# FS # -----------------------------------------------------------------------
  fsck_y_enable=YES
  clear_tmp_enable=YES
  clear_tmp_X=YES
  growfs_enable=YES

# OTHER # --------------------------------------------------------------------
  keyrate=fast
  keymap=pl.kbd
  virecover_enable=NO
  update_motd=NO
  devfs_system_ruleset=desktop
  hostid_enable=NO
  savecore_enable=NO

Now the runtime parameters /etc/sysctl.conf file.

% cat /etc/sysctl.conf
# SECURITY
  security.bsd.see_jail_proc=0
  security.bsd.unprivileged_proc_debug=0

# SECURITY/RANDOM PID
  kern.randompid=1

# ANNOYING THINGS
  vfs.usermount=1
  kern.coredump=0
  hw.syscons.bell=0
  kern.vt.enable_bell=0

# ZFS DELETE FUCKUP TRIM (DEFAULT: 64)
  vfs.zfs.vdev.trim_max_active=1

# ZFS ARC TUNING
  vfs.zfs.arc.min=134217728
  vfs.zfs.arc.max=536870912

# ZFS ARC FREE ENFORCE @ 1024 \* 1024 \* 3
  vfs.zfs.arc_free_target=3145728

# JAILS/ALLOW UPGRADES IN JAILS
  security.jail.chflags_allowed=1

# JAILS/ALLOW RAW SOCKETS
  security.jail.allow_raw_sockets=1

# DESKTOP/INTERACTIVITY
  kern.sched.preempt_thresh=224

# DESKTOP QUANTUM FOR TIMESHARE THREADS IN stathz TICKS (12) NomadBSD
  kern.sched.slice=3

# DESKTOP/IRIDIUM/CHROMIUM
  kern.ipc.shm_allow_removed=1

# SAMPLE RATE CONVERTER QUALITY (0=low .. 4=high) (1) NomadBSD
  hw.snd.feeder_rate_quality=3

# PERFORMANCE/ALL SHARED MEMORY SEGMENTS WILL BE MAPPED TO UNPAGEABLE RAM
  kern.ipc.shm_use_phys=1

# VIRTUALBOX aio(4) SETTINGS
  vfs.aio.max_buf_aio=8192
  vfs.aio.max_aio_queue_per_proc=65536
  vfs.aio.max_aio_per_proc=8192
  vfs.aio.max_aio_queue=65536

# POWER CONSUMPTION / SILENT FANS Intel 6th GEN+ / ONE LINE FOR EACH TH
# DETAILS IN THE hwpstate_intel(4) MAN PAGE
  dev.hwpstate_intel.0.epp=100
  dev.hwpstate_intel.1.epp=100
  dev.hwpstate_intel.2.epp=100
  dev.hwpstate_intel.3.epp=100
  dev.hwpstate_intel.4.epp=100
  dev.hwpstate_intel.5.epp=100
  dev.hwpstate_intel.6.epp=100
  dev.hwpstate_intel.7.epp=100

# NETWORK/DO NOT SEND RST ON SEGMENTS TO CLOSED PORTS
  net.inet.tcp.blackhole=2

# NETWORK/DO NOT SEND PORT UNREACHABLES FOR REFUSED CONNECTS
  net.inet.udp.blackhole=1

# NETWORK/LIMIT ON SYN/ACK RETRANSMISSIONS (3)
  net.inet.tcp.syncache.rexmtlimit=0

# NETWORK/USE TCP SYN COOKIES IF THE SYNCACHE OVERFLOWS (1)
  net.inet.tcp.syncookies=0

# NETWORK/ASSIGN RANDOM ip_id VALUES (0)
  net.inet.ip.random_id=1

# NETWORK/ENABLE SENDING IP REDIRECTS (1)
  net.inet.ip.redirect=0

# NETWORK/IGNORE ICMP REDIRECTS (0)
  net.inet.icmp.drop_redirect=1

# NETWORK/DROP TCP PACKETS WITH SYN+FIN SET (0)
  net.inet.tcp.drop_synfin=1

# NETWORK/RECYCLE CLOSED FIN_WAIT_2 CONNECTIONS FASTER (0)
  net.inet.tcp.fast_finwait2_recycle=1

# NETWORK/CERTAIN ICMP UNREACHABLE MESSAGES MAY ABORT CONNECTIONS IN SYN_SENT (1)
  net.inet.tcp.icmp_may_rst=0

The biggest difference for ThinkPad T14 against the ThinkPad W520 is this part below.

# POWER CONSUMPTION / SILENT FANS Intel 6th GEN+ / ONE LINE FOR EACH TH
# DETAILS IN THE hwpstate_intel(4) MAN PAGE
  dev.hwpstate_intel.0.epp=100
  dev.hwpstate_intel.1.epp=100
  dev.hwpstate_intel.2.epp=100
  dev.hwpstate_intel.3.epp=100
  dev.hwpstate_intel.4.epp=100
  dev.hwpstate_intel.5.epp=100
  dev.hwpstate_intel.6.epp=100
  dev.hwpstate_intel.7.epp=100

It was not needed/non existent on the ThinkPad W520 hardware.

Now the boot parameters /boot/loader.conf file.

% cat /boot/loader.conf
# CONSOLE COMMON
  autoboot_delay=2       # OPT. '-1' => NO WAIT | OPT. 'NO' => INFINITE WAIT
  hw.usb.no_boot_wait=1  # DO NOT WAIT FOR USB DEVICES FOR ROOT (/) FILESYSTEM
  boot_mute=YES          # LIKE '-m' IN LOADER - MUTE CONSOLE WITH FreeBSD LOGO
  loader_logo=none       # DESIRED LOGO OPTIONS: fbsdbw beastiebw beastie none
  loader_menu_frame="none"
  screen.font="6x12"

# CONSOLE RESOLUTION
  kern.vt.fb.default.mode="1920x1080"
  efi_max_resolution="1920x1080"

# WINE FIX
  machdep.max_ldt_segment=2048

# MODULES - BOOT
  aesni_load=YES
  geom_eli_load=YES
  cryptodev_load=YES
  zfs_load=YES

# drm-kmod PACKAGE - USE SEMAPHORES FOR INTER-RING SYNC
  compat.linuxkpi.semaphores=1

# drm-kmod PACKAGE - ENABLE POWER-SAVING RENDER C-STATE 6
  compat.linuxkpi.enable_rc6=7

# drm-kmod PACKAGE - ENABLE POWER-SAVING DISPLAY C-STATES
  compat.linuxkpi.enable_dc=2

# drm-kmod PACKAGE - ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS
  compat.linuxkpi.enable_fbc=1

# ENABLE SYNAPTICS
  hw.psm.synaptics_support=1

# DISABLE /dev/diskid/* ENTRIES FOR DISKS
  kern.geom.label.disk_ident.enable=0

# DISABLE /dev/gptid/* ENTRIES FOR DISKS
  kern.geom.label.gptid.enable=0

# TERMINAL vt(4) COLORS
  kern.vt.color.0.rgb="#000000"
  kern.vt.color.1.rgb="#dc322f"
  kern.vt.color.2.rgb="#859900"
  kern.vt.color.3.rgb="#b58900"
  kern.vt.color.4.rgb="#268bd2"
  kern.vt.color.5.rgb="#ec0048"
  kern.vt.color.6.rgb="#2aa198"
  kern.vt.color.7.rgb="#94a3a5"
  kern.vt.color.8.rgb="#586e75"
  kern.vt.color.9.rgb="#cb4b16"
  kern.vt.color.10.rgb="#859900"
  kern.vt.color.11.rgb="#b58900"
  kern.vt.color.12.rgb="#268bd2"
  kern.vt.color.13.rgb="#d33682"
  kern.vt.color.14.rgb="#2aa198"
  kern.vt.color.15.rgb="#6c71c4"

# RACCT/RCTL RESOURCE LIMITS
  kern.racct.enable=1

# DISABLE ZFS PREFETCH
  vfs.zfs.prefetch_disable=1

# POWER MGMT / POWER OFF DEVICES WITHOUT ATTACHED DRIVER
  hw.pci.do_power_nodriver=3

# POWER MANAGEMENT FOR EVERY USED AHCI CHANNEL (ahcich 0-7)
  hint.ahcich.0.pm_level=5
  hint.ahcich.1.pm_level=5
  hint.ahcich.2.pm_level=5
  hint.ahcich.3.pm_level=5
  hint.ahcich.4.pm_level=5
  hint.ahcich.5.pm_level=5
  hint.ahcich.6.pm_level=5
  hint.ahcich.7.pm_level=5

# GELI THREADS
  kern.geom.eli.threads=4

Now the mentioned /etc/devfs.rules file.

% cat /etc/devfs.rules
[desktop=10]
add path 'acd*'      mode 0660 group operator
add path 'cd*'       mode 0660 group operator
add path 'da*'       mode 0660 group operator
add path 'pass*'     mode 0660 group operator
add path 'xpt*'      mode 0660 group operator
add path 'fd*'       mode 0660 group operator
add path 'md*'       mode 0660 group operator
add path 'uscanner*' mode 0660 group operator
add path 'lpt*'      mode 0660 group cups
add path 'ulpt*'     mode 0660 group cups
add path 'unlpt*'    mode 0660 group cups
add path 'ugen*'     mode 0660 group operator
add path 'usb/*'     mode 0660 group operator
add path 'video*'    mode 0660 group operator
add path 'cuse*'     mode 0660 group operator

Filesystems and SWAP configuration.

% cat /etc/fstab
# SWAP
  /dev/gpt/swap0  none  swap  sw  0 0

# FreeBSD PSEUDO - NEEDED BY wine(1)
  procfs  /proc  procfs  rw  0 0

# Ubuntu Linux PSEUDO
  linprocfs  /compat/ubuntu/proc     linprocfs  rw,late                    0 0
  linsysfs   /compat/ubuntu/sys      linsysfs   rw,late                    0 0
  devfs      /compat/ubuntu/dev      devfs      rw,late                    0 0
  fdescfs    /compat/ubuntu/dev/fd   fdescfs    rw,late,linrdlnk           0 0
  tmpfs      /compat/ubuntu/dev/shm  tmpfs      rw,late,size=1g,mode=1777  0 0
  /home      /compat/ubuntu/home     nullfs     rw,late                    0 0
  /tmp       /compat/ubuntu/tmp      nullfs     rw,late                    0 0

Terminals configuration under /etc/ttys file. Important part is the ttyv4 entry to match the xdm_tty=ttyv4 value from /etc/rc.conf file.

% grep '^[^#]' /etc/ttys | cat
console none                            unknown off insecure
ttyv0   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv1   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv2   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv3   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv4   "/usr/libexec/getty Pc"         xterm   off secure
ttyv5   "/usr/libexec/getty Pc"         xterm   off secure
ttyv6   "/usr/libexec/getty Pc"         xterm   off secure
ttyv7   "/usr/libexec/getty Pc"         xterm   off secure
ttyv4   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu1   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu2   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu3   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
xc0     "/usr/libexec/getty Pc"         xterm   onifconsole secure
rcons   "/usr/libexec/getty std.9600"   vt100   onifconsole secure

I kept wireless config in /etc/rc.conf file this time – it does conflicts with my own network.sh solution to connect to various both wire and wireless networks – FreeBSD Network Management with network.sh Script – described in details here.

# cat /etc/wpa_supplicant.conf
# GENERAL
eapol_version=2
ap_scan=1
fast_reauth=1

# OPEN NETWORKS
network={
  key_mgmt=NONE
  priority=0
}

# NETWORK WITH HIDDEN SSID
network={
  scan_ssid=1
  ssid="hidden-network"
  psk="12341234"
  priority=0
}

# NAMED OPEN NETWORK
network={
  ssid="Free_Internet"
  key_mgmt=NONE
  priority=0
}

# NORMAL WPA/WPA2 SECURED NETWORK
network={
  ssid="SECURED"
  psk="12345678"
}

The automount(8) config.

% cat /usr/local/etc/automount.conf
  USERUMOUNT=YES
  USER=vermaden
  FM='caja --no-desktop'
  NICENAMES=YES

The doas(1) configuration.

# cat /usr/local/etc/doas.conf
# CORE
  permit nopass keepenv root     as root
  permit nopass keepenv vermaden as root

# THE network.sh SCRIPT
  # pw groupmod network -m YOURUSERNAME
  # cat /usr/local/etc/doas.conf
  permit nopass :network as root cmd /etc/rc.d/netif args onerestart
  permit nopass :network as root cmd /usr/sbin/service args squid onerestart
  permit nopass :network as root cmd dhclient
  permit nopass :network as root cmd ifconfig
  permit nopass :network as root cmd killall args -9 dhclient
  permit nopass :network as root cmd killall args -9 ppp
  permit nopass :network as root cmd killall args -9 wpa_supplicant
  permit nopass :network as root cmd ppp
  permit nopass :network as root cmd route
  permit nopass :network as root cmd tee args -a /etc/resolv.conf
  permit nopass :network as root cmd tee args /etc/resolv.conf
  permit nopass :network as root cmd umount
  permit nopass :network as root cmd wpa_supplicant

Groups I am member of.

% id vermaden | tr ' ' '\n' | tr ',' '\n'
uid=1000(vermaden)
gid=1000(vermaden)
groups=1000(vermaden)
0(wheel)
5(operator)
44(video)
69(network)
145(webcamd)
920(vboxusers)

I also do not rely on ‘stock’ fan speeds and set my own speeds according to CPU temperature with acpi-thinkpad-fan.sh script.

X11

While X11 did not need any custom configuration and it worked out of the box – I have done two things to make it work slightly differently.

First one is to allow CTRL+ALT+BACKSPACE fast way to restart X11.

t14 % cat /usr/local/etc/X11/xorg.conf.d/flags.conf
Section "ServerFlags"
  Option "DontZap" "off"
EndSection

The other one is to enable Tap to Click and Natural Scrolling on a Synaptics touchpad.

t14 % cat /usr/local/etc/X11/xorg.conf.d/touchpad.conf
Section "InputClass"
  Identifier "touchpad"
  MatchIsTouchpad "on"
  Driver "libinput"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
EndSection

Comparison to ThinkPad W520

I compared the two laptops. While ThinkPad W520 is heavy and bulky the ThinkPad T14 (GEN1) is light and slim. They both have similar 5 hours battery time on FreeBSD.

You can see the screen brightness comparison between these two below.

LARGE-compare-screen-brightness

The ThinkPad T14 (GEN1) has several flavors of the FullHD screen – check reviews and specs for details. For the record – ThinkPad W520 is on the left.

Below you will find size comparisons.

The view from the top.

LARGE-compare-top

View from the side.

LARGE-compare-side

… and from the side one over another.

LARGE-compare-over

Desktop Environment

Openbox

As for the ‘desktop environment’ that I use – its my custom setup with Openbox along with tools like Tint2 and Dzen2 – for the most basic setup. The screenshot is from FreeBSD 11.1 but it looks exactly the same today.

freebsd-desktop-2019-04

I described this setup in details in the entire FreeBSD Desktop series.

XFCE

I have also tried XFCE – I liked it especially with the Global Menu appmenu plugin. You go this way with this XFCE Cupertino Way handy guide.

xfce-ghostbsd

GNOME

I also tried GNOME for a test – it did not suit me well so I went back to my Openbox setup – but You may find it more comfortable to use. Here is the FreeBSD GNOME 3 Fast Track article that will help you with that.

gnome-8-fixed

Temperatures

I used mine sensors.sh script for that – results below.

t14 # sensors.sh

            BATTERY/AC/TIME/FAN/SPEED
 ------------------------------------
             dev.acpi_ibm.0.fan_level: 1
             dev.acpi_ibm.0.fan_speed: 65535
                   dev.acpi_ibm.0.fan: 0
               dev.cpu.0.cx_supported: C1/1/1 C2/2/151 C3/3/1034
                   dev.cpu.0.cx_usage: 9.02% 35.95% 55.02% last 35us
                       dev.cpu.0.freq: 802
                       hw.acpi.acline: 0
                 hw.acpi.battery.life: 99
                 hw.acpi.battery.time: 275
                hw.acpi.cpu.cx_lowest: C8
                            powerd(8): running

                  SYSTEM/TEMPERATURES
 ------------------------------------
                dev.cpu.0.temperature: 38.0C (max: 100.0C)
                dev.cpu.1.temperature: 39.0C (max: 100.0C)
                dev.cpu.2.temperature: 39.0C (max: 100.0C)
                dev.cpu.3.temperature: 39.0C (max: 100.0C)
                dev.cpu.4.temperature: 40.0C (max: 100.0C)
                dev.cpu.5.temperature: 41.0C (max: 100.0C)
                dev.cpu.6.temperature: 38.0C (max: 100.0C)
                dev.cpu.7.temperature: 38.0C (max: 100.0C)
           dev.pchtherm.0.temperature: 46.0C
      hw.acpi.thermal.tz0.temperature: 46.1C (max: 128.1C)

                   DISKS/TEMPERATURES
 ------------------------------------
             smart.nvme0.temperature:: 44.0C

Accessories

There are some accessories that are very handy with the ThinkPad T14 laptop – I will describe them below.

Power Supply

You can use the default ThinkPad T14 power supply and you can also use any USB-C power delivery charger – that is nice addition.

Mouse Companion

After checking many mouse models – as described in the UNIX Mouse Shootout article – I finally settled with Logitech Triathlon M720 mouse. I have plugged the Lenovo USB Receiver into the back ‘powered’ USB port. While I use that mouse over the USB receiver you can also connect it using Bluetooth – also to other computers. This mouse has a special dedicated button to switch between 3 different computers. Unfortunately the copy-paste between them does not work πŸ™‚

mouse-M720

Battery

Some battery details below.

t14 % acpiconf -i 0
Design capacity:        50450 mWh
Last full capacity:     45760 mWh
Technology:             secondary (rechargeable)
Battery Swappable Capability:   Non-swappable
Design voltage:         11520 mV
Capacity (warn):        2288 mWh
Capacity (low):         200 mWh
Cycle Count:            204
Mesurement Accuracy:    95 %
Max Average Interval:   1000 ms
Min Average Interval:   500 ms
Low/warn granularity:   -1 mWh
Warn/full granularity:  -1 mWh
Model number:           5B10W13906
Serial number:           1071
Type:                   LiP
OEM info:               SMP
State:                  discharging
Remaining capacity:     99%
Remaining time:         4:31
Present rate:           10094 mW
Present voltage:        12681 mV

Experience

Today I ‘recognize’ three laptop keyboard layouts.

  • Best in class 7-row keyboards with INS/DEL and HOME/END and PGUP/PGDN keys block on the right top side.
  • Least PITA ThinkPad T14 like keyboards where PGUP/PGDN keys are in the ARROWS area and HOME/END/INS/DEL block is provided on the top right part.
  • Everything else that I treat like shit.

My fingers do not remember this HOME/END/INS/DEL block that much well – but at its still several ways of magnitude better then any Macbook keyboard layout.

Summary

I will still use mine ThinkPad W520 daily – I still do not need to move to other/less old laptop.

As you can see FreeBSD works quite well with modern laptops – hope someone can find that article useful.

UPDATE 1 – WiFi Works with FreeBSD 14.0-BETA1

As the FreeBSD 14.0-RELEASE is approaching completion I checked again the ThinkPad T14 WiFi with newer FreeBSD version. I am happy to report that now – with 14.0-BETA1 version of FreeBSD – the WiFi works. The iwlwifi(4) driver now successfully works. There is only one downside – its very slow – usable for browsing the Internet and stuff – but slow.

My ThinkPad W520 has Intel Centrino Ultimate-N 6300 WiFi card supported by the iwn(4) driver. This card was introduced in 2011 – 12 years ago. With that old Intel 6300 card I am able to reach 12 MB/s speed both for upload and download speeds on FreeBSD – using 802.11g mode as 802.11n is not (yet) supported on FreeBSD.

The Intel Comet Lake CNVi WiFi card from 2019 on ThinkPad T14 with current state of iwlwifi(4) driver allows about 500 KB/s for upload and 2.5 MB/s for download.

Still better then attaching the additional USB WiFi adapter or device passthru to Bhyve hypervisor for wifibox workaround πŸ™‚

EOF

Desktop Environments Resource Usage Comparison

Some of them use more RAM. Some less. Today in a rather simplified benchmark I will check some popular desktop environments for their RAM usage. I recently came to see some more or less old comparisons of various desktop environments RAM usage.

They were focused on difference between XFCE and KDE/Plasma environments. I am used to idea that XFCE is smaller and lighter of the two – so it should be also lighter on resources – but these two movies state that they RAM usage is similar and sometimes even KDE/Plasma is lighter. These results seemed strange to me so I wanted to test them under latest FreeBSD 13.1-RELEASE UNIX system.

Example XFCE on FreeBSD desktop screenshot from the XFCE Cupertino Way article.

xfce-ghostbsd

Upon some popular demand I also added GNOME (the 42 version) to the comparison.

Today we will test these desktop environments:

  • XFCE (4.16)
  • MATE (1.26)
  • KDE/Plasma (5.24)
  • Openbox (3.6)
  • GNOME (42)

We all know that Openbox is just a window manager but I wanted to include it here just from comparison.

Test Environment and Process

To save time I used VirtualBox virtual machine for the purpose of these simplified benchmarks. For that purpose he created VM had:

  • 1 x CPU
  • 8 GB RAM
  • 128 MB GPU Memory
  • 30 GB Disk

After installing the vanilla FreeBSD 13.1-RELEASE I switched to the latest pkg(8) repository. Then I added needed packages:

# pkg install xorg xfce kde5 mate openbox dzen2 tint2 xbindkeys xterm geany gnome

All of the desktop environments and their dependencies were installed on that test machine. The main FreeBSD config at /etc/rc.conf file had following contents.

% cat /etc/rc.conf
hostname="freebsd"
ifconfig_em0="DHCP"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
dumpdev="AUTO"
zfs_enable="YES"
dbus_enable="YES"

The only thing I added after installation was the dbus service startup. I did not changed any settings in these environments. The were compared at their default settings.

The test was rather simple and naive but these were the tasks that I done on each of them.

  • Run gstat(8) command in terminal application.
  • Display /etc/ in file manager with scroll to end of display of dir.
  • Open /etc/ssh/moduli file in text editor with scroll to end of file.

These were different for various environments:

XFCE

  • xfce4-terminal
  • thunar
  • mousepad

MATE

  • mate-terminal
  • caja
  • pluma

KDE/Plasma

  • konsole
  • dolphin
  • kate

Openbox

  • xterm
  • caja
  • geany

GNOME

  • gnome-terminal
  • nautilus
  • gedit

I powered off that FreeBSD machine before each test – so each test looked like:

  • boot cold FreeBSD system
  • login into system (in text console)
  • type xinit(1) command
  • do the 3 defined tasks

Each desktop environment had different ~/.xinitrc file. Below you will find their contents.

% cat ~/.xinitrc.xfce
. /usr/local/etc/xdg/xfce4/xinitrc

% cat ~/.xinitrc.mate
exec ck-launch-session mate-session

% cat ~/.xinitrc.kde
exec ck-launch-session startplasma-x11

% cat ~/.xinitrc.openbox
dzen2 &
tint2 &
xbindkeys &
exec openbox

% cat ~/.xinitrc.gnome
exec gnome-session

Each of them were started like that:

% xinit ~/.xinitrc.xfce

% xinit ~/.xinitrc.mate

% xinit ~/.xinitrc.kde

% xinit ~/.xinitrc.openbox

% xinit ~/.xinitrc.gnome

RAM Usage Results

To be honest I was surprised by the results.

Clean Text Console FreeBSD

The text console of FreeBSD 13.1-RELEASE system used about 97 MB of RAM. That result is the sum of the RES column from the top(1) command.

Below you will find the top(1) output for FreeBSD text console only system.

% top -b -o res 1000
last pid:   871;  load averages:  1.92,  0.90,  0.36; battery: 99%  up 0+00:01:09    00:34:01
28 processes:  2 running, 26 sleeping
CPU:  2.0% user,  0.0% nice,  3.7% system,  0.2% interrupt, 94.0% idle
Mem: 18M Active, 21M Inact, 138M Wired, 40K Buf, 7746M Free
ARC: 43M Total, 18M MFU, 23M MRU, 335K Header, 1556K Other
     20M Compressed, 61M Uncompressed, 3.09:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  852 vermaden      1  20    0    21M  9492K RUN      0:00   0.00% sshd
  849 root          1  33    0    21M  9300K select   0:00   0.00% sshd
  799 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  820 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  749 messagebus    1  52    0    14M  3648K select   0:00   0.00% dbus-daemon
  853 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
  871 vermaden      1  20    0    14M  3220K RUN      0:00   0.00% top
  846 vermaden      1  52    0    13M  3208K ttyin    0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  830 root          1  52    0    13M  2736K wait     0:00   0.00% sh
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  831 root          1  52    0    13M  2440K piperd   0:00   0.00% logger
  754 root          1  52    0    13M  2380K select   0:00   0.00% moused
  837 root          1  52    0    13M  2316K select   0:00   0.00% logger
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  833 root          1  52    0    12M  2080K nanslp   0:00   0.00% sleep
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

XFCE

Next one is XFCE and it used about 1548 MB of RAM.

Below you will find the top(1) output for XFCE.

% top -b -o res 1000
last pid:  1076;  load averages:  0.58,  0.84,  0.51; battery: 99%  up 0+00:07:06    00:31:07
71 processes:  2 running, 69 sleeping
CPU:  7.6% user,  0.1% nice,  6.5% system,  1.1% interrupt, 84.8% idle
Mem: 292M Active, 337M Inact, 389M Wired, 56K Buf, 6897M Free
ARC: 240M Total, 98M MFU, 133M MRU, 1762K Header, 7212K Other
     194M Compressed, 461M Uncompressed, 2.37:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  945 vermaden      3  20    0   344M   251M select   0:11   0.00% Xorg
 1010 vermaden      4  20    0   311M   121M select   0:01   0.00% kgpg
 1004 vermaden      5  20    0   196M   100M select   0:04   0.00% xfwm4
 1008 vermaden      4  20    0   130M    92M select   0:01   0.00% xfdesktop
  948 vermaden      4  20    0   172M    76M select   0:04   0.00% xfce4-session
 1012 vermaden      6  40   19   160M    63M select   0:00   0.00% tumblerd
 1064 vermaden      5  21    0    89M    59M select   0:05   0.00% mousepad
 1013 vermaden      3  20    0   130M    52M select   0:00   0.00% kalendarac
 1007 vermaden      4  24    0    75M    51M select   0:04   0.00% thunar
 1006 vermaden      4  20    0    75M    48M select   0:04   0.00% xfce4-panel
 1056 vermaden      4  20    0    69M    42M select   0:01   0.00% xfce4-terminal
 1020 vermaden      4  20    0    65M    41M select   0:00   0.00% wrapper-2.0
 1021 vermaden      4  20    0    65M    41M select   0:00   0.00% wrapper-2.0
 1022 vermaden      4  20    0    52M    32M select   0:00   0.00% wrapper-2.0
 1005 vermaden      4  20    0    49M    30M select   0:02   0.00% xfsettingsd
 1019 vermaden      4  20    0    46M    30M select   0:00   0.00% wrapper-2.0
 1027 vermaden      3  40   19   256G    29M select   0:00   0.00% baloo_file
 1009 vermaden      4  20    0    46M    28M select   0:00   0.00% xfce4-power-manager
  975 polkitd       7  20    0  2125M    27M select   0:01   0.00% polkitd
 1029 vermaden      4  20    0    45M    27M select   0:00   0.00% xfce4-notifyd
  977 vermaden      5  20    0    49M    26M select   0:01   0.00% mate-screensaver
  983 root          7  20    0    64M    16M select   0:01   0.00% bsdisks
  981 vermaden      5  20    0    27M    11M select   0:00   0.00% gvfs-udisks2-volume
 1067 vermaden      5  20    0    24M    10M select   0:00   0.00% gvfsd-network
 1038 vermaden      4  20    0    27M    10M select   0:00   0.00% gvfsd-trash
 1070 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-dnssd
 1063 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-computer
  865 vermaden      1  20    0    21M  9492K RUN      0:00   0.00% sshd
 1042 vermaden      2  22    0    86M  9440K select   0:00   0.00% pulseaudio
  862 root          1  28    0    21M  9264K select   0:00   0.00% sshd
  979 vermaden      4  32    0    24M  8836K select   0:00   0.00% gvfsd
  973 vermaden      4  20    0    21M  8712K select   0:00   0.00% at-spi2-registryd
  966 vermaden      5  20    0    21M  8296K select   0:00   0.00% at-spi-bus-launcher
  972 root         16  20    0    24M  8256K select   0:00   0.00% console-kit-daemon
  815 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  991 vermaden      5  20    0    21M  7948K select   0:00   0.00% gvfs-gphoto2-volume
 1044 root          4  22    0    20M  7916K select   0:00   0.00% accounts-daemon
 1040 vermaden      4  20    0    19M  7460K select   0:00   0.00% gvfsd-metadata
 1017 root          4  20    0    19M  7452K select   0:00   0.00% upowerd
  988 vermaden      5  20    0    19M  7208K select   0:00   0.00% gvfs-mtp-volume-mon
  833 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
 1066 vermaden      4  20    0    19M  7004K select   0:00   0.00% dconf-service
  969 vermaden      4  20    0    19M  6936K select   0:00   0.00% xfconfd
  998 vermaden      1  21    0    18M  6900K select   0:00   0.00% ssh-agent
  836 smmsp         1  52    0    18M  6576K pause    0:00   0.00% sendmail
  960 vermaden      1  20    0    14M  4580K select   0:01   0.00% dbus-daemon
 1003 vermaden      1  20    0    16M  4116K select   0:00   0.00% gpg-agent
  765 messagebus    1  20    0    14M  4100K select   0:00   0.00% dbus-daemon
  955 vermaden      1  23    0    15M  3912K select   0:00   0.00% dbus-launch
  967 vermaden      1  20    0    14M  3812K select   0:01   0.00% dbus-daemon
 1058 vermaden      1  20    0    14M  3772K nanslp   0:00   0.00% gstat
 1076 vermaden      1  20    0    14M  3464K RUN      0:00   0.00% top
 1057 vermaden      1  28    0    13M  3276K wait     0:00   0.00% sh
  866 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
  941 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  854 root          1  20    0    13M  3136K wait     0:00   0.00% login
  944 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  479 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  684 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  418 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  415 root          1  49    0    13M  2632K select   0:00   0.00% dhclient
  818 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  770 root          1  20    0    13M  2404K select   0:00   0.00% moused
  855 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  858 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  861 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  859 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  860 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  856 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  857 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  480 root          1  20    0    11M  1540K select   0:00   0.00% devd

MATE

Next one is MATE and it used about 1361 MB of RAM.

This is first strange thing for me. Keep in mind that MATE is a fork of GNOME 2 which was expected to be heavy compared to light XFCE … at least more then a decade ago. Seems that now MATE developers are doing better job then XFCE devs πŸ™‚

Below you will find the top(1) output for MATE.

% top -b -o res 1000
last pid:   966;  load averages:  1.75,  1.02,  0.43; battery: 99%  up 0+00:01:53    00:40:42
66 processes:  2 running, 64 sleeping
CPU: 25.7% user,  0.0% nice,  8.9% system,  0.4% interrupt, 65.0% idle
Mem: 279M Active, 269M Inact, 381M Wired, 56K Buf, 6986M Free
ARC: 230M Total, 88M MFU, 131M MRU, 1753K Header, 8250K Other
     183M Compressed, 435M Uncompressed, 2.37:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  857 vermaden      3  23    0   344M   246M select   0:08   7.96% Xorg
  922 vermaden      4  20    0   311M   122M select   0:01   0.00% kgpg
  869 vermaden      5  20    0   172M    77M select   0:01   0.00% mate-session
  913 vermaden      6  20    0    92M    68M select   0:03   0.00% caja
  961 vermaden      5  29    0    91M    59M select   0:07  15.97% pluma
  951 vermaden      5  20    0    86M    55M select   0:01   0.00% mate-terminal
  919 vermaden      3  20    0   130M    52M select   0:00   0.00% kalendarac
  911 vermaden      5  20    0    74M    49M select   0:01   0.00% mate-panel
  941 vermaden      5  20    0    70M    45M select   0:00   0.00% notification-area-a
  902 vermaden      5  20    0    70M    44M select   0:01   0.00% marco
  917 vermaden      4  20    0    66M    43M select   0:00   0.00% mate-volume-control
  899 vermaden      6  20    0    60M    38M select   0:02   0.00% mate-settings-daemo
  939 vermaden      5  20    0    60M    38M select   0:00   0.00% clock-applet
  927 vermaden      5  20    0    57M    37M select   0:00   0.00% wnck-applet
  921 vermaden      5  20    0    55M    35M select   0:00   0.00% mate-power-manager
  915 vermaden      5  20    0    50M    32M select   0:00   0.00% mate-screensaver
  864 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  914 vermaden      4  20    0    44M    26M select   0:00   0.00% polkit-mate-authent
  883 root          7  52    0    64M    16M select   0:00   0.00% bsdisks
  881 vermaden      5  20    0    27M    12M select   0:00   0.00% gvfs-udisks2-volume
  962 vermaden      5  20    0    24M    11M select   0:00   0.00% gvfsd-network
  965 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-dnssd
  954 vermaden      4  20    0    24M    10M select   0:00   0.00% gvfsd-computer
  929 vermaden      4  20    0    26M    10M select   0:00   0.00% gvfsd-trash
  852 vermaden      1  20    0    21M  9480K RUN      0:00   0.00% sshd
  931 vermaden      2  21    0    86M  9396K select   0:00   0.00% pulseaudio
  849 root          1  30    0    21M  9300K select   0:00   0.00% sshd
  879 vermaden      4  28    0    24M  9180K select   0:00   0.00% gvfsd
  901 vermaden      4  20    0    21M  8860K select   0:00   0.00% at-spi2-registryd
  895 vermaden      5  20    0    21M  8272K select   0:00   0.00% gvfs-gphoto2-volume
  862 root         16  20    0    24M  8244K select   0:00   0.00% console-kit-daemon
  799 root          1  23    0    21M  8208K select   0:00   0.00% sshd
  875 vermaden      5  20    0    21M  8128K select   0:00   0.00% at-spi-bus-launcher
  956 vermaden      4  20    0    19M  7704K select   0:00   0.00% gvfsd-metadata
  893 vermaden      5  20    0    19M  7544K select   0:00   0.00% gvfs-mtp-volume-mon
  924 root          4  20    0    19M  7524K select   0:00   0.00% upowerd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  897 vermaden      4  20    0    19M  6936K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6700K pause    0:00   0.00% sendmail
  912 vermaden      1  20    0    17M  4892K piperd   0:00   0.00% libgtop_server2
  873 vermaden      1  20    0    14M  4164K select   0:00   0.00% dbus-daemon
  860 vermaden      1  22    0    17M  4124K wait     0:00   0.00% ck-launch-session
  876 vermaden      1  20    0    14M  4004K select   0:01   0.00% dbus-daemon
  749 messagebus    1  20    0    14M  3984K select   0:00   0.00% dbus-daemon
  872 vermaden      1  20    0    15M  3912K select   0:00   0.00% dbus-launch
  953 vermaden      1  20    0    14M  3708K nanslp   0:00   0.00% gstat
  966 vermaden      1  20    0    14M  3392K RUN      0:00   0.00% top
  853 vermaden      1  20    0    13M  3248K wait     0:00   0.00% sh
  846 vermaden      1  21    0    13M  3212K wait     0:00   0.00% sh
  952 vermaden      1  38    0    13M  3208K wait     0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  856 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:00   0.00% moused
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

KDE/Plasma

Next one is KDE/Plasma and without surprise (at least for me) it uses more RAM then other desktop environments – about 2843 MB of RAM – that is more then twice as much as MATE and almost twice as much as XFCE.

Below you will find the top(1) output for KDE/Plasma.

% top -b -o res 1000
last pid:  1075;  load averages:  2.10,  1.56,  0.79; battery: 99%  up 0+00:05:22    00:38:14
67 processes:  2 running, 65 sleeping
CPU: 30.8% user,  0.1% nice,  8.8% system,  0.2% interrupt, 60.0% idle
Mem: 530M Active, 316M Inact, 441M Wired, 56K Buf, 6633M Free
ARC: 272M Total, 119M MFU, 139M MRU, 2012K Header, 12M Other
     211M Compressed, 514M Uncompressed, 2.44:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  935 vermaden     12  21    0   588M   298M select   0:22   0.00% plasmashell
  874 vermaden      3  23    0   344M   241M select   0:15   9.96% Xorg
 1065 vermaden      7  30    0   365M   190M select   0:12  15.97% kate
  918 vermaden      5  31    0   376M   179M select   0:22  15.97% kwin_x11
 1035 vermaden      8  20    0   320M   156M select   0:03   0.00% dolphin
 1029 vermaden      3  20    0   312M   150M select   0:02   0.00% konsole
  959 vermaden      4  20    0   314M   143M select   0:01   0.00% kgpg
 1063 vermaden      5  52    0   304M   140M select   0:02   0.00% kioslave5
 1073 vermaden      4  20    0   303M   139M select   0:01   0.00% kioslave5
  916 vermaden     11  20    0   179M    84M select   0:02   0.00% kded5
  958 vermaden      3  20    0   147M    67M select   0:01   0.00% kalendarac
  944 vermaden      4  20    0   174M    63M select   0:01   0.00% DiscoverNotifier
  941 vermaden      6  20    0   130M    58M select   0:01   0.00% polkit-kde-authenti
  920 vermaden      4  20    0   131M    58M select   0:01   0.00% ksmserver
  940 vermaden      7  20    0   118M    56M select   0:01   0.00% org_kde_powerdevil
  942 vermaden      3  20    0   128M    56M select   0:01   0.00% kaccess
  922 vermaden      3  20    0   127M    55M select   0:01   0.00% kglobalaccel5
  968 vermaden      7  20    0   104M    47M select   0:01   0.00% kactivitymanagerd
  905 vermaden      3  20    0   127M    45M select   0:00   0.00% klauncher
  901 vermaden      3  26    0   113M    43M select   0:00   0.00% plasma_session
  904 vermaden      1  20    0   112M    41M select   0:00   0.00% kdeinit5
  885 vermaden      3  38    0   113M    41M select   0:00   0.00% startplasma-x11
 1041 vermaden      2  42    0    88M    37M select   0:00   0.00% kioslave5
 1069 vermaden      1  23    0   256G    37M select   0:00   0.00% kioslave5
 1039 vermaden      1  36    0   256G    37M select   0:00   0.00% kioslave5
 1027 vermaden      1  36    0   256G    36M select   0:00   0.00% kioslave5
  997 vermaden      3  28    0    86M    35M select   0:00   0.00% kioslave5
  943 vermaden      3  40   19   256G    32M select   0:00   0.00% baloo_file
  945 vermaden      4  20    0    87M    32M select   0:00   0.00% gmenudbusmenuproxy
  939 vermaden      3  20    0    83M    30M select   0:00   0.00% xembedsniproxy
  976 vermaden      3  20    0    76M    28M select   0:00   0.00% kscreen_backend_lau
  881 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  926 root          7  20    0    67M    19M select   0:00   0.00% bsdisks
  966 vermaden      2  20    0    86M  9520K select   0:00   0.00% pulseaudio
  852 vermaden      1  20    0    21M  9512K RUN      0:00   0.00% sshd
  849 root          1  33    0    21M  9300K select   0:00   0.00% sshd
  879 root         16  20    0    24M  8320K select   0:00   0.00% console-kit-daemon
  799 root          1  22    0    21M  8208K select   0:00   0.00% sshd
  937 root          4  20    0    19M  7404K select   0:00   0.00% upowerd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  982 vermaden      4  20    0    19M  6732K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  749 messagebus    1  20    0    14M  4452K select   0:00   0.00% dbus-daemon
  896 vermaden      1  28    0    15M  4252K select   0:00   0.00% dbus-launch
  897 vermaden      1  20    0    14M  4164K select   0:01   0.00% dbus-daemon
  877 vermaden      1  21    0    17M  4124K wait     0:00   0.00% ck-launch-session
 1034 vermaden      1  20    0    14M  3836K nanslp   0:00   0.00% gstat
 1075 vermaden      1  20    0    14M  3392K RUN      0:00   0.00% top
  853 vermaden      1  20    0    13M  3256K wait     0:00   0.00% sh
 1032 vermaden      1  26    0    13M  3232K wait     0:00   0.00% sh
  846 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  838 root          1  25    0    13M  3100K wait     0:00   0.00% login
  873 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1  52    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:01   0.00% moused
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd

Openbox

Not really a desktop environment but just for the sake of comparison I wanted to check it. With the default ‘ugly’ settings it consumed about 614 MB or RAM.

Below you will find the top(1) output for Openbox.

% top -b -o res 1000
last pid:   991;  load averages:  0.66,  0.77,  0.43; battery: 99%  up 0+00:04:35    00:52:31
43 processes:  1 running, 41 sleeping, 1 stopped
CPU:  8.8% user,  0.0% nice,  3.8% system,  0.5% interrupt, 86.9% idle
Mem: 126M Active, 196M Inact, 391M Wired, 40K Buf, 7210M Free
ARC: 210M Total, 78M MFU, 120M MRU, 1783K Header, 10M Other
     164M Compressed, 374M Uncompressed, 2.28:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  894 vermaden      3  20    0   307M   217M select   0:02   0.00% Xorg
  942 vermaden      6  20    0   208M   112M select   0:02   0.00% caja
  981 vermaden      3  20    0   100M    60M select   0:02   0.00% geany
  897 vermaden      1  20    0    54M    25M select   0:00   0.00% openbox
  898 vermaden      1  20    0    53M    25M select   0:01   0.00% tint2
  939 vermaden      1  20    0    25M    13M select   0:00   0.00% xterm
  916 vermaden      1  20    0    25M    13M select   0:00   0.00% xterm
  986 vermaden      1  20    0    21M  9500K select   0:00   0.00% sshd
  983 root          1  28    0    21M  9360K select   0:00   0.00% sshd
  953 vermaden      4  20    0    21M  9228K select   0:00   0.00% at-spi2-registryd
  949 vermaden      5  49    0    21M  8736K select   0:00   0.00% at-spi-bus-launcher
  934 vermaden      1  20    0    20M  8608K STOP     0:00   0.00% dzen2
  799 root          1  20    0    21M  8208K select   0:00   0.00% sshd
  817 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  955 vermaden      4  30    0    19M  6916K select   0:00   0.00% dconf-service
  820 smmsp         1  52    0    18M  6636K pause    0:00   0.00% sendmail
  946 vermaden      1  30    0    15M  4380K select   0:00   0.00% dbus-launch
  947 vermaden      1  43    0    14M  3908K select   0:00   0.00% dbus-daemon
  937 vermaden      1  20    0    14M  3760K nanslp   0:00   0.00% gstat
  950 vermaden      1  20    0    14M  3732K select   0:00   0.00% dbus-daemon
  749 messagebus    1  52    0    14M  3648K select   0:00   0.00% dbus-daemon
  991 vermaden      1  22    0    14M  3428K RUN      0:00   0.00% top
  987 vermaden      1  21    0    13M  3316K wait     0:00   0.00% sh
  918 vermaden      1  20    0    13M  3292K wait     0:00   0.00% sh
  941 vermaden      1  22    0    13M  3280K wait     0:00   0.00% sh
  982 vermaden      1  52    0    13M  3272K ttyin    0:00   0.00% sh
  846 vermaden      1  20    0    13M  3212K wait     0:00   0.00% sh
  838 root          1  26    0    13M  3100K wait     0:00   0.00% login
  893 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  463 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  668 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  402 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  399 root          1  52    0    13M  2632K select   0:00   0.00% dhclient
  802 root          1  20    0    13M  2516K nanslp   0:00   0.00% cron
  754 root          1  20    0    13M  2404K select   0:00   0.00% moused
  843 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  842 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  840 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  839 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  841 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  464 root          1  20    0    11M  1540K select   0:00   0.00% devd


GNOME

GNOME with the same test procedure used 2622 MB of RAM.

Below you will find the top(1) output for GNOME.

% top -b -o res 1000
last pid:  1114;  load averages:  2.62,  1.76,  0.81; battery: 99%  up 0+00:03:38    12:44:58
91 processes:  2 running, 89 sleeping
CPU: 45.9% user,  0.0% nice,  9.1% system,  0.3% interrupt, 44.7% idle
Mem: 531M Active, 560M Inact, 2152K Laundry, 522M Wired, 56K Buf, 6295M Free
ARC: 319M Total, 151M MFU, 156M MRU, 2354K Header, 9740K Other
     266M Compressed, 640M Uncompressed, 2.41:1 Ratio
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    WCPU COMMAND
  904 vermaden      9  23    0  2656M   379M select   0:29   9.96% gnome-shell
  855 vermaden      3  22    0   333M   238M select   0:10   6.98% Xorg
 1040 vermaden     12  20    0   349M   192M select   0:10   0.00% epiphany-search-pro
  962 vermaden      4  20    0   312M   136M select   0:01   0.00% kgpg
 1026 vermaden      8  20    0   215M   125M select   0:01   0.00% gnome-calendar
 1107 vermaden      5  20    0   187M   108M select   0:01   0.00% gnome-control-cente
  958 vermaden      7  20    0   211M    81M select   0:01   0.00% evolution-alarm-not
 1058 vermaden     15  20    0   194M    78M select   0:01   0.00% WebKitNetworkProces
 1071 vermaden      6  20    0   144M    77M select   0:03   0.00% nautilus
 1112 vermaden      5  52    0    85M    59M select   0:13  19.97% gedit
 1065 vermaden      5  20    0   114M    56M select   0:01   0.00% gnome-terminal-serv
  961 vermaden      3  20    0   132M    53M select   0:00   0.00% kalendarac
  917 vermaden      5  20    0   146M    51M select   0:00   0.00% goa-daemon
 1034 vermaden      5  20    0    70M    50M select   0:00   0.00% seahorse
  921 vermaden      7  20    0   109M    48M select   0:00   0.00% evolution-addressbo
  919 vermaden     10  20    0    81M    44M select   0:00   0.00% evolution-calendar-
  912 vermaden      5  20    0    78M    42M select   0:00   0.00% evolution-source-re
  950 vermaden      6  20    0  2134M    39M select   0:00   0.00% gjs-console
  931 vermaden      6  20    0  2134M    39M select   0:00   0.00% gjs-console
  935 vermaden      5  20    0   119M    32M select   0:00   0.00% gsd-media-keys
  939 vermaden      5  20    0    51M    30M select   0:00   0.00% gsd-xsettings
  937 vermaden      5  20    0    49M    30M select   0:00   0.00% gsd-power
  957 vermaden      3  40   19   256G    28M select   0:00   0.00% baloo_file
  907 vermaden      7  20    0    83M    28M select   0:00   0.00% gnome-shell-calenda
  947 vermaden      5  20    0    46M    28M select   0:00   0.00% gsd-keyboard
  994 vermaden      4  20    0    46M    28M select   0:00   0.00% ibus-extension-gtk3
  993 vermaden      4  20    0    46M    27M select   0:00   0.00% ibus-ui-gtk3
  893 polkitd       7  20    0  2125M    27M select   0:00   0.00% polkitd
  965 vermaden      5  20    0    48M    27M select   0:00   0.00% zeitgeist-datahub
  952 vermaden      4  24    0    49M    26M select   0:00   0.00% gsd-printer
  859 vermaden      5  20    0    49M    20M select   0:00   0.00% gnome-session-binar
  874 root          7  20    0    67M    16M select   0:00   0.00% bsdisks
  956 vermaden      4  20    0    27M    14M select   0:00   0.00% ibus-daemon
  942 vermaden      5  20    0    27M    13M select   0:00   0.00% gsd-datetime
  945 vermaden      5  20    0    26M    13M select   0:00   0.00% gsd-sound
  943 vermaden      6  20    0    25M    12M select   0:00   0.00% gsd-smartcard
  940 vermaden      4  20    0    27M    11M select   0:00   0.00% gsd-print-notificat
 1092 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-dnssd
 1082 vermaden      5  20    0    24M    11M select   0:00   0.00% gvfsd-network
  872 vermaden      5  20    0    27M    11M select   0:00   0.00% gvfs-udisks2-volume
 1041 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-trash
 1062 vermaden      4  20    0    24M    11M select   0:00   0.00% gvfsd-burn
  976 vermaden      4  20    0    25M    10M select   0:00   0.00% zeitgeist-daemon
  902 vermaden      5  20    0    23M    10M select   0:00   0.00% gnome-keyring-daemo
  894 vermaden      1  20    0    21M  9488K RUN      0:00   0.00% sshd
  944 vermaden      5  20    0    21M  9356K select   0:00   0.00% gsd-housekeeping
  887 root          1  24    0    21M  9332K select   0:00   0.00% sshd
  933 vermaden      4  20    0    21M  9252K select   0:00   0.00% at-spi2-registryd
  925 vermaden      2  21    0    86M  9216K select   0:00   0.00% pulseaudio
  870 vermaden      4  20    0    24M  8860K select   0:00   0.00% gvfsd
  934 vermaden      5  20    0    20M  8616K select   0:00   0.00% gsd-usb-protection
  891 root         16  20    0    24M  8488K select   0:00   0.00% console-kit-daemon
  811 root          1  20    0    21M  8208K select   0:00   0.00% sshd
  867 vermaden      5  20    0    21M  8128K select   0:00   0.00% at-spi-bus-launcher
  927 root          4  20    0    20M  8040K select   0:00   0.00% accounts-daemon
  941 vermaden      5  20    0    20M  7976K select   0:00   0.00% gsd-sharing
  886 vermaden      5  20    0    21M  7936K select   0:00   0.00% gvfs-gphoto2-volume
  936 vermaden      5  20    0    20M  7936K select   0:00   0.00% gsd-a11y-settings
  923 vermaden      4  20    0    19M  7716K select   0:00   0.00% gvfsd-metadata
  910 root          4  20    0    19M  7620K select   0:00   0.00% upowerd
  881 vermaden      5  20    0    19M  7220K select   0:00   0.00% gvfs-mtp-volume-mon
  938 vermaden      4  20    0    19M  7180K select   0:00   0.00% gsd-screensaver-pro
  825 root          1  20    0    18M  7140K select   0:00   0.00% sendmail
  914 vermaden      4  20    0    19M  7128K select   0:00   0.00% dconf-service
  828 smmsp         1  52    0    18M  6704K pause    0:00   0.00% sendmail
  864 vermaden      1  20    0    14M  5268K select   0:01   0.00% dbus-daemon
  753 messagebus    1  20    0    14M  4280K select   0:00   0.00% dbus-daemon
  863 vermaden      1  21    0    15M  3912K select   0:00   0.00% dbus-launch
  868 vermaden      1  20    0    14M  3812K select   0:00   0.00% dbus-daemon
 1067 vermaden      1  20    0    14M  3704K nanslp   0:00   0.00% gstat
 1114 vermaden      1  20    0    14M  3420K RUN      0:00   0.00% top
  895 vermaden      1  20    0    13M  3252K wait     0:00   0.00% sh
  851 vermaden      1  22    0    13M  3212K wait     0:00   0.00% sh
 1066 vermaden      1  26    0    13M  3208K wait     0:00   0.00% sh
  843 root          1  23    0    13M  3100K wait     0:00   0.00% login
  854 vermaden      1  20    0    14M  3096K wait     0:00   0.00% xinit
  858 vermaden      1  21    0    13M  3016K wait     0:00   0.00% sh
  467 _dhcp         1  52    0    13M  2828K select   0:00   0.00% dhclient
  672 root          1  20    0    13M  2748K select   0:00   0.00% syslogd
  406 root          1   4    0    13M  2708K select   0:00   0.00% dhclient
  403 root          1  44    0    13M  2632K select   0:00   0.00% dhclient
  814 root          1  26    0    13M  2516K nanslp   0:00   0.00% cron
  757 root          1  20    0    13M  2404K select   0:00   0.00% moused
  850 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  847 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  848 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  844 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  849 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  845 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  846 root          1  52    0    13M  2248K ttyin    0:00   0.00% getty
  468 root          1  20    0    11M  1540K select   0:00   0.00% devd

Summary of the RAM usage results are below.

  MB  ENVIRONMENT
----  --------------------
  97  FreeBSD Text Console
 614  Openbox
1361  MATE
1548  XFCE
2622  GNOME
2843  KDE/Plasma

Seems that now MATE developers are doing better job then XFCE devs πŸ™‚

CPU Time Usage Results

As I already had the top(1) outputs I also compared the CPU time used for that limited test. I will not post the top(1) results again as they are posted above. The Seconds column below is the sum of the TIME field from the top(1) command output.
Here are the results of used CPU time.

SECONDS  ENVIRONMENT
-------  --------------------
      0  FreeBSD Text Console
      7  Openbox
     26  MATE
     42  XFCE
     72  GNOME
     92  KDE/Plasma

Seems that MATE is twice as light on resources then XFCE. World has changed a lot since GNOME 2 was considered heavy fully fledged desktop environment while XFCE was light and fast … but even that ‘hungry’ XFCE takes only half of the time that KDE/Plasma uses for the same tasks.

Subjective Experience

The Openbox ‘environment’ started fastest and was most responsive to operate.

Both MATE and XFCE started little slower but after they loaded the desktop and taskbars they were snappy and fast to use.

On the other hand the KDE/Plasma took longest to load and each application I started – I needed to wait ‘a little’ with ‘bouncing mouse cursor’ for them to load. Also scrolling the /etc/ssh/moduli file to its end in Kate took REALLY long … even with Logitech M720 mouse which scroll wheel was spinning freely (without clicks). I want to mention that I am not disappointed by KDE/Plasma. Its just slower when used in a limiter 1 CPU and 8 GB RAM environment. Probably the load times and usability is a lot better on a 4 CORE system with 16 GB of RAM on fast NVMe SSD disk while we used rather slow virtual machine.

After adding GNOME to comparison it felt even slower then KDE/Plasma. Probably because GNOME requires hardware 3D acceleration for smooth operation. With its software rendering it felt really sluggish … while consuming less RAM and CPU time then KDE/Plasma.

Summary

Not sure how useful that is but I just was curious and wanted to check it out – and as I did I share what I found.

UPDATE 1 – Added freecolor(1) and htop(1) RAM Measurements

After suggestions from other places I added freecolor(1) and htop(1) measurements when it comes to RAM usage. Here are the results.

  SYS/WM/DE | top(1)  | htop(1) | conky(1) | freecolor(1)
------------+---------+---------+----------+-------------
    FreeBSD |   97 MB |  112 MB |    - -   |  157 MB 
    Openbox |  614 MB |  237 MB |  460 MB  |  382 MB 
       MATE | 1361 MB |  508 MB |  778 MB  |  788 MB 
       XFCE | 1548 MB |  533 MB |  794 MB  |  829 MB 
helloSystem | 1613 MB |  585 MB |  804 MB  |  830 MB 
      GNOME | 2622 MB |  625 MB |  990 MB  | 1000 MB 
 KDE/Plasma | 2843 MB |  730 MB | 1659 MB  | 1167 MB

I also added helloSystem out of curiosity.

Hope that helps.

EOF

FreeBSD 13.1 on ThinkPad W520

I created whole FreeBSD Desktop series … but I never created an article describing how I run FreeBSD on my own daily driver – the Lenovo ThinkPad W520 from 2011 – the last one with the so much appreciated 7-row keyboard. In this article I will share how I configured FreeBSD to make the most of it. If you are curious why I use such old laptop then my older Epitaph to Laptops article explains that in detail.

This is the Table of Contents for this article.

  • FreeBSD 13.1 on ThinkPad W520
  • ThinkPad W520
  • Specifications
  • FreeBSD System Configuration
  • Desktop Environment
    • Openbox
    • XFCE
    • GNOME
  • Accessories
    • Smaller Power Supply
    • Mouse Companion
    • Two Additional USB 3.0 Ports
    • Larger Custom Battery
  • Experience
  • Summary

ThinkPad W520

This machine was out-fucking-standing when it was released in 2011 … and expensive as hell also πŸ™‚ With 4 physical cores and up to 32 GB RAM only a few laptops could compete with it – Dell Precision M4600 – also could do that back then … but not exactly the same. You see – the last Dell Precision to carry similar 7-row keyboard was Dell Precision M4500 – but that one was from 2010 and was able to pack only … 8 GB RAM (official) and 16 GB RAM (unofficial) – so its not a fair comparison. Today 11 years (!) later ThinkPad W520 is still very capable and powerful machine. The only thing that you may need to do is to replace the thermal paste. I also did that – Classic ThinkPad Thermal Paste Change – as described here.

0THIS-w520-freebsd

To make you imagine how big that 11 years time span in IT is I will try to show you example with a car. Its like driving 30 years old Mercedes-Benz W124 from 1992 today because IT world and hardware changes and improves a lot faster then automobile industry. The Mercedes-Benz W124 with its indestructible automatic transmission and engine along with comfortable suspension and automatic air conditioning – offers daily experience not that far away from today’s cars – the meritum is definitely fulfilled. I know that from first hand since I owned one not that long ago. Not to mention its legendary reliability. Its also a car that is very liked by mechanics as its very ‘serviceable’ and has lots of space for everything. You do not need to disassemble entire front bumper and the headlight just to replace a broken light beam.

w520.mercedes.w124

This is the same that I would say about ThinkPad W520 today. You can put three (!) storage devices at the same time. Two 2.5 SATA drives and one mSATA disk. Assuming you would use 8 TB 2.5 Samsung QVO drives and 2 TB mSATA drive you would have 18 TB of storage … in a 11 years old laptop. You can grow that to 19TB with 1TB SD card in the slot … and we even did not touched any USB ports yet. Today you are able to get ThinkPad W520 in nice condition for about $300 if you are not heisty and getting 32 GB of DDR3 RAM costs another $100 so its pretty affordable hardware.

Specifications

For the record below You will find specs of mine machine. I also added driver and/or package that is used to support these devices.

CPU: Intel Core i7-2820QM 2.30GHz (4C/8T) Sandy Bridge 32nm
RAM: 32 GB (4 * 8GB DDR3)
HDD0: 128GB mSATA Samsung PM830 (system)
HDD1: 4 TB 2.5 SATA Samsung 860 QVO (data)
GFX0: Intel HD Graphics 3000 (integrated) [graphics/drm-kmod]
GFX1: Nvidia Quadro 2000M (discrete) [x11/nvidia-driver-390] {nvidia}
SCR: 15.6 1920x1080
USB: 2 x USB 2.0 + 2 x USB 3.0 [ehci(4) + xhci(4)]
AUDIO: Conexant CX20590 [snd_hda(4)]
PORTS0: 1 x VGA
PORTS1: 1 x DisplayPort
PORTS2: 1 x eSata
SD: Card Reader 5in1 [sdhci(4)]
LAN: 10/100/1000 Intel 82579LM Gigabit [em(4)]
WIFI: Intel Centrino Ultimate-N 6300 AGN 802.11n [iwn(4)]
BT: Bluetooth 3.0 [ng_ubt(4)]
CAM: Webcam 720p [multimedia/webcamd]

Articles such as this one often focuses on what works and is supported by FreeBSD and what is problematic or does not work at all. The very nice thing about ThinkPad W520 under FreeBSD command is that EVERYTHING works. From Bluetooth through Card Reader and also multiple suspend/resume cycles. I am doing months of uptime on that laptop and I reboot only when I need to update the system or I want to test something … but that often also does not need reboot now as you can just reroot into other BE as described in my other ZFS Boot Environments Revolutions article.

I do not need the compute power of discrete Nvidia Quadro 2000M card so I disabled it in the BIOS – but when I tried it with drivers from the FreeBSD Ports – everything worked as desired. I use integrated Intel HD Graphics 3000 which is more then enough for my needs. To be honest I would get ThinkPad T520 which can be bought with integrated graphics only but it has two downsides. The T520 does not have any USB 3.0 ports – that one I could probably live with but … it comes only with Dual Core CPUs. You can of course place a Quad Core CPU in it by yourself – but as W520 exist I do not see a reason not to get one πŸ™‚

FreeBSD System Configuration

From many things that I really like about FreeBSD (more here – Quare FreeBSD? – in separate article) is that it can be mostly configured using just 3 files. This configuration already features all power management settings that I described in the The Power to Serve – FreeBSD Power Management article.

I installed FreeBSD in a pretty standard way with GELI full disk encryption enabled and with ZFS as the filesystem as I can not live without ZFS Boot Environments. The FreeBSD installer automatically detects and applies the so called ‘Lenovo Fix‘. When in doubt the installation procedure is described in the FreeBSD Desktop – Part 2.1 – Install FreeBSD 12 article.

Main FreeBSD configuration files.

  • /etc/rc.conf – system and services configuration
  • /etc/sysctl.conf – runtime parameters configuration
  • /boot/loader.conf – parameters configurable at boot

I will also include these below as they are also important:

  • /etc/devfs.rules – devices configuration
  • /etc/fstab – filesystems configuration
  • /etc/ttys – terminal initialization configuration
  • /etc/wpa_supplicant.conf – WiFi configuration
  • /usr/local/etc/automount.confautomount(8) configuration
  • /usr/local/etc/doas.confdoas(1) configuration
  • id(1) groups membership
  • /usr/local/etc/X11/xorg.conf.d/* – X11 configuration

First the main /etc/rc.conf configuration file.

% cat /etc/rc.conf
# SILENCE # ------------------------------------------------------------------
  rc_startmsgs=NO

# NETWORK # ------------------------------------------------------------------
  hostname=w520.local
  background_dhclient=YES
  extra_netfs_types=NFS
  defaultroute_delay=3
  defaultroute_carrier_delay=3
  gateway_enable=YES
  harvest_mask=351
  rtsol_flags="-i"
  rtsold_flags="-a -i"

# MODULES/COMMON/BASE # ------------------------------------------------------
  kld_list="${kld_list} /boot/modules/i915kms.ko"
  kld_list="${kld_list} fusefs coretemp sem cpuctl ichsmb cuse"
  kld_list="${kld_list} libiconv cd9660_iconv msdosfs_iconv udf_iconv"

# MODULES/VIRTUALBOX # -------------------------------------------------------
  vboxnet_enable=YES
  kld_list="${kld_list} vboxdrv vboxnetadp vboxnetflt"

# POWER
  performance_cx_lowest=C1
  economy_cx_lowest=Cmax
  powerd_enable=YES
  powerd_flags="-n adaptive -a hiadaptive -b adaptive -m 800 -M 2000"

# DAEMONS | yes # ------------------------------------------------------------
  zfs_enable=YES
  xdm_enable=YES
  xdm_tty=ttyv4
  nfs_client_enable=YES
  ubuntu_enable=YES
  moused_enable=YES
  syslogd_flags='-s -s'
  sshd_enable=YES
  local_unbound_enable=YES
  webcamd_enable=YES
  rctl_enable=YES

# DAEMONS | no # -------------------------------------------------------------
  linux_enable=NO
  sendmail_enable=NONE
  sendmail_submit_enable=NO
  sendmail_outbound_enable=NO
  sendmail_msp_queue_enable=NO

# FS # -----------------------------------------------------------------------
  fsck_y_enable=YES
  clear_tmp_enable=YES
  clear_tmp_X=YES
  growfs_enable=YES

# OTHER # --------------------------------------------------------------------
  keyrate=fast
  keymap=pl.kbd
  virecover_enable=NO
  update_motd=NO
  devfs_system_ruleset=desktop
  hostid_enable=NO
  savecore_enable=NO

Now the runtime parameters /etc/sysctl.conf file.

% cat /etc/sysctl.conf
# SECURITY
  security.bsd.see_jail_proc=0
  security.bsd.unprivileged_proc_debug=0

# SECURITY/RANDOM PID
  kern.randompid=1

# ANNOYING THINGS
  vfs.usermount=1
  kern.coredump=0
  hw.syscons.bell=0
  kern.vt.enable_bell=0

# ZFS DELETE FUCKUP TRIM (DEFAULT: 64)
  vfs.zfs.vdev.trim_max_active=1

# ZFS ARC TUNING
  vfs.zfs.arc.min=134217728
  vfs.zfs.arc.max=536870912

# ZFS ARC FREE ENFORCE @ 1024 \* 1024 \* 3
  vfs.zfs.arc_free_target=3145728

# JAILS/ALLOW UPGRADES IN JAILS
  security.jail.chflags_allowed=1

# JAILS/ALLOW RAW SOCKETS
  security.jail.allow_raw_sockets=1

# DESKTOP/INTERACTIVITY
  kern.sched.preempt_thresh=224

# DESKTOP QUANTUM FOR TIMESHARE THREADS IN stathz TICKS (12) NomadBSD
  kern.sched.slice=3

# DESKTOP/IRIDIUM/CHROMIUM
  kern.ipc.shm_allow_removed=1

# SAMPLE RATE CONVERTER QUALITY (0=low .. 4=high) (1) NomadBSD
  hw.snd.feeder_rate_quality=3

# PERFORMANCE/ALL SHARED MEMORY SEGMENTS WILL BE MAPPED TO UNPAGEABLE RAM
  kern.ipc.shm_use_phys=1

# VIRTUALBOX aio(4) SETTINGS
  vfs.aio.max_buf_aio=8192
  vfs.aio.max_aio_queue_per_proc=65536
  vfs.aio.max_aio_per_proc=8192
  vfs.aio.max_aio_queue=65536

# NETWORK/DO NOT SEND RST ON SEGMENTS TO CLOSED PORTS
  net.inet.tcp.blackhole=2

# NETWORK/DO NOT SEND PORT UNREACHABLES FOR REFUSED CONNECTS
  net.inet.udp.blackhole=1

# NETWORK/LIMIT ON SYN/ACK RETRANSMISSIONS (3)
  net.inet.tcp.syncache.rexmtlimit=0

# NETWORK/USE TCP SYN COOKIES IF THE SYNCACHE OVERFLOWS (1)
  net.inet.tcp.syncookies=0

# NETWORK/ASSIGN RANDOM ip_id VALUES (0)
  net.inet.ip.random_id=1

# NETWORK/ENABLE SENDING IP REDIRECTS (1)
  net.inet.ip.redirect=0

# NETWORK/IGNORE ICMP REDIRECTS (0)
  net.inet.icmp.drop_redirect=1

# NETWORK/DROP TCP PACKETS WITH SYN+FIN SET (0)
  net.inet.tcp.drop_synfin=1

# NETWORK/RECYCLE CLOSED FIN_WAIT_2 CONNECTIONS FASTER (0)
  net.inet.tcp.fast_finwait2_recycle=1

# NETWORK/CERTAIN ICMP UNREACHABLE MESSAGES MAY ABORT CONNECTIONS IN SYN_SENT (1)
  net.inet.tcp.icmp_may_rst=0

Now the boot parameters in /boot/loader.conf file.

% cat /boot/loader.conf
# CONSOLE COMMON
  autoboot_delay=1       # OPTION '-1' MEANS NO WAIT AND 'NO' MEANS INFINITE WAIT
  hw.usb.no_boot_wait=0  # DO NOT WAIT FOR USB DEVICES FOR ROOT (/) FILESYSTEM
  boot_mute=YES          # SAME AS '-m' IN LOADER - MUTE CONSOLE WITH FreeBSD LOGO
  loader_logo=none       # DESIRED LOGO: fbsdbw beastiebw beastie none
  loader_menu_frame="none"
  screen.font="6x12"

# CONSOLE RESOLUTION
  efi_max_resolution="1920x1080"

# WINE FIX
  machdep.max_ldt_segment=2048

# MODULES - BOOT
  geom_eli_load=YES
  zfs_load=YES

# drm-kmod PACKAGE - USE SEMAPHORES FOR INTER-RING SYNC
  compat.linuxkpi.semaphores=1

# drm-kmod PACKAGE - ENABLE POWER-SAVING RENDER C-STATE 6
  compat.linuxkpi.enable_rc6=7

# drm-kmod PACKAGE - ENABLE POWER-SAVING DISPLAY C-STATES
  compat.linuxkpi.enable_dc=2

# drm-kmod PACKAGE - ENABLE FRAME BUFFER COMPRESSION FOR POWER SAVINGS
  compat.linuxkpi.enable_fbc=1

# ENABLE SYNAPTICS
  hw.psm.synaptics_support=1

# DISABLE /dev/diskid/* ENTRIES FOR DISKS
  kern.geom.label.disk_ident.enable=0

# DISABLE /dev/gptid/* ENTRIES FOR DISKS
  kern.geom.label.gptid.enable=0

# TERMINAL vt(4) COLORS
  kern.vt.color.0.rgb="#000000"
  kern.vt.color.1.rgb="#dc322f"
  kern.vt.color.2.rgb="#859900"
  kern.vt.color.3.rgb="#b58900"
  kern.vt.color.4.rgb="#268bd2"
  kern.vt.color.5.rgb="#ec0048"
  kern.vt.color.6.rgb="#2aa198"
  kern.vt.color.7.rgb="#94a3a5"
  kern.vt.color.8.rgb="#586e75"
  kern.vt.color.9.rgb="#cb4b16"
  kern.vt.color.10.rgb="#859900"
  kern.vt.color.11.rgb="#b58900"
  kern.vt.color.12.rgb="#268bd2"
  kern.vt.color.13.rgb="#d33682"
  kern.vt.color.14.rgb="#2aa198"
  kern.vt.color.15.rgb="#6c71c4"

# RACCT/RCTL RESOURCE LIMITS
  kern.racct.enable=1

# DISABLE ZFS PREFETCH
  vfs.zfs.prefetch_disable=1

# POWER MGMT / POWER OFF DEVICES WITHOUT ATTACHED DRIVER
  hw.pci.do_power_nodriver=3

# POWER MANAGEMENT FOR EVERY USED AHCI CHANNEL (ahcich 0-7)
  hint.ahcich.0.pm_level=5
  hint.ahcich.1.pm_level=5
  hint.ahcich.2.pm_level=5
  hint.ahcich.3.pm_level=5
  hint.ahcich.4.pm_level=5
  hint.ahcich.5.pm_level=5
  hint.ahcich.6.pm_level=5
  hint.ahcich.7.pm_level=5

# GELI THREADS
  kern.geom.eli.threads=4

Now the mentioned /etc/devfs.rules file.

% cat /etc/devfs.rules
[desktop=10]
add path 'acd*'      mode 0660 group operator
add path 'cd*'       mode 0660 group operator
add path 'da*'       mode 0660 group operator
add path 'pass*'     mode 0660 group operator
add path 'xpt*'      mode 0660 group operator
add path 'fd*'       mode 0660 group operator
add path 'md*'       mode 0660 group operator
add path 'uscanner*' mode 0660 group operator
add path 'ugen*'     mode 0660 group operator
add path 'usb/*'     mode 0660 group operator
add path 'video*'    mode 0660 group operator
add path 'cuse*'     mode 0660 group operator
add path 'lpt*'      mode 0660 group cups
add path 'ulpt*'     mode 0660 group cups
add path 'unlpt*'    mode 0660 group cups

Filesystems and SWAP configuration.

% cat /etc/fstab
# SWAP
  /dev/gpt/swap0  none  swap  sw  0 0

# FreeBSD PSEUDO - NEEDED BY wine(1)
  procfs  /proc  procfs  rw  0 0

# Ubuntu Linux PSEUDO
  linprocfs  /compat/ubuntu/proc     linprocfs  rw,late                    0 0
  linsysfs   /compat/ubuntu/sys      linsysfs   rw,late                    0 0
  devfs      /compat/ubuntu/dev      devfs      rw,late                    0 0
  fdescfs    /compat/ubuntu/dev/fd   fdescfs    rw,late,linrdlnk           0 0
  tmpfs      /compat/ubuntu/dev/shm  tmpfs      rw,late,size=1g,mode=1777  0 0
  /home      /compat/ubuntu/home     nullfs     rw,late                    0 0
  /tmp       /compat/ubuntu/tmp      nullfs     rw,late                    0 0

Terminals configuration under /etc/ttys file. Important part is the ttyv4 entry to match the xdm_tty=ttyv4 value from /etc/rc.conf file.

% grep '^[^#]' /etc/ttys | cat
console none                            unknown off insecure
ttyv0   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv1   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv2   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv3   "/usr/libexec/getty Pc"         xterm   onifexists secure
ttyv4   "/usr/libexec/getty Pc"         xterm   off secure
ttyv5   "/usr/libexec/getty Pc"         xterm   off secure
ttyv6   "/usr/libexec/getty Pc"         xterm   off secure
ttyv7   "/usr/libexec/getty Pc"         xterm   off secure
ttyv4   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu1   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu2   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
ttyu3   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
xc0     "/usr/libexec/getty Pc"         xterm   onifconsole secure
rcons   "/usr/libexec/getty std.9600"   vt100   onifconsole secure

Wireless config – as an example for different network types. As you have seen I did not included any network information in the /etc/rc.conf file – this is because I use my own network.sh solution to connect to various both wire and wireless networks – FreeBSD Network Management with network.sh Script – described in detail here.

# cat /etc/wpa_supplicant.conf
# GENERAL
eapol_version=2
ap_scan=1
fast_reauth=1

# OPEN NETWORKS
network={
  key_mgmt=NONE
  priority=0
}

# NETWORK WITH HIDDEN SSID
network={
  scan_ssid=1
  ssid="hidden-network"
  psk="12341234"
  priority=0
}

# NAMED OPEN NETWORK
network={
  ssid="Free_Internet"
  key_mgmt=NONE
  priority=0
}

# NORMAL WPA/WPA2 SECURED NETWORK
network={
  ssid="SECURED"
  psk="12345678"
}

The automount(8) config.

% cat /usr/local/etc/automount.conf
  USERUMOUNT=YES
  USER=vermaden
  FM='caja --no-desktop'
  NICENAMES=YES

The doas(1) configuration.

# cat /usr/local/etc/doas.conf
# CORE
  permit nopass keepenv root     as root
  permit nopass keepenv vermaden as root

# THE network.sh SCRIPT
  # pw groupmod network -m YOURUSERNAME
  # cat /usr/local/etc/doas.conf
  permit nopass :network as root cmd /etc/rc.d/netif args onerestart
  permit nopass :network as root cmd /usr/sbin/service args squid onerestart
  permit nopass :network as root cmd dhclient
  permit nopass :network as root cmd ifconfig
  permit nopass :network as root cmd killall args -9 dhclient
  permit nopass :network as root cmd killall args -9 ppp
  permit nopass :network as root cmd killall args -9 wpa_supplicant
  permit nopass :network as root cmd ppp
  permit nopass :network as root cmd route
  permit nopass :network as root cmd tee args -a /etc/resolv.conf
  permit nopass :network as root cmd tee args /etc/resolv.conf
  permit nopass :network as root cmd umount
  permit nopass :network as root cmd wpa_supplicant

Groups I am member of with id(1) output.

% id vermaden | tr ' ' '\n' | tr ',' '\n'
uid=1000(vermaden)
gid=1000(vermaden)
groups=1000(vermaden)
0(wheel)
5(operator)
44(video)
69(network)
145(webcamd)
920(vboxusers)

Current X11 configuration.

% cat /usr/local/etc/X11/xorg.conf.d/card.conf
Section "Device"
  Identifier "Card0"
  Option "DPMS"
  Driver "intel"
  Option "DRI" "3"
  Option "AccelMethod" "sna"
  Option "TearFree" "true"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/flags.conf
Section "ServerFlags"
  Option "DontZap" "off"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  Option "XkbLayout" "pl"
  Option "XkbOptions" "terminate:ctrl_alt_bksp,ctrl:nocaps"
EndSection

% cat /usr/local/etc/X11/xorg.conf.d/touchpad.conf
Section "InputClass"
  Identifier "touchpad"
  MatchIsTouchpad "on"
  Driver "libinput"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
EndSection

I also do not rely on ‘stock’ fan speeds and set my own speeds according to CPU temperature with acpi-thinkpad-fan.sh script.

Desktop Environment

Openbox

As for the ‘desktop environment’ that I use – its my custom setup with Openbox along with tools like Tint2 and Dzen2 – for the most basic setup. The screenshot is from FreeBSD 11.1 but it looks exactly the same today.

freebsd-desktop-2019-04

I described this setup in details in the entire FreeBSD Desktop series.

XFCE

I have also tried XFCE – I liked it especially with the Global Menu app-menu plugin. You go this way with this XFCE Cupertino Way handy guide.

xfce-ghostbsd

GNOME

I also tried GNOME for a test – it did not suit me well so I went back to my Openbox setup – but You may find it more comfortable to use. Here is the FreeBSD GNOME 3 Fast Track article that will help you with that.

gnome-4-apps

Accessories

There are some accessories that are very handy with the ThinkPad W520 laptop. I will describe them below.

Smaller Power Supply

The ThinkPad W520 comes with quite large brick of ThinkPad 170W Power Supply. It works. Its OK … but you can use smaller one and more universal at the same time. I use the ThinkPad 135W Power Supply that originally was sold with ThinkPad W510 – the earlier model. Besides being smaller in size it also has one additional advantage. Its plug is round and also fits into other ThinkPads from this line like ThinkPad X220 or ThinkPad T420s. The original ThinkPad 170W Power Supply unfortunately only fits into the ThinkPad W520 laptop. Below you can compare their sizes.

w520.ps

Mouse Companion

After checking many mouse models – as described in the UNIX Mouse Shootout article – I finally settled with Logitech Triathlon M720 mouse. I have plugged the Lenovo USB Receiver into the back ‘powered’ USB port. While I use that mouse over the USB receiver you can also connect it using Bluetooth – also to other computers. This mouse has a special dedicated button to switch between 3 different computers. Unfortunately the copy-paste between them does not work πŸ™‚

mouse-M720

If you would like to ‘save’ that port for something else then you may use special USB board adapter that you will place in the Bluetooth module under the palm rest. You would loose Bluetooth support then of course – but not everyone uses that. Its available for example on Aliexpress site and looks like that.

w520.usb-bluetooth-pink

I do not use it as I do not need the ‘back’ USB port so below you will find its mounted picture on the ThinkPad X220 laptop instead – along with the Lenovo USB Receiver attached.

w520.usb-bluetooth

Two Additional USB 3.0 Ports

The ThinkPad W520 comes with not well known today ExpressCard port. With this cheap adapter from Aliexpress you can add two additional USB 3.0 ports. You may of course do not need that many ports – but if you are left handed then you probably use mouse on the left of your laptop – then USB ports on the right will be handy.

w520.express

These USB 3.0 ports may be also useful with some bhyve(8) setups. Currently its not supported to pass-thru just a single USB port to a virtual machine. You need to pass thru entire controller. This way you can pass-thru that controller to bhyve(8) VM and have another USB 3.0 ports on the host.

Larger Custom Battery

The original largest extended battery for ThinkPad W520 had 9400mAh capacity. Its possible to get even larger custom extended battery but in the same physical size and shape – with 9600mAh capacity – and for only about $50. To remind you the original one costs closer to $200 unfortunately. I got mine from this Aliexpress page. With my power settings and with this battery along with enabled WiFi and screen brightness just one step less then maximum brightness it show more then 7 hours of time left in acpiconf(8) command.

% acpiconf -i 0
Design capacity:        10368 mAh
Last full capacity:     10368 mAh
Technology:             secondary (rechargeable)
Design voltage:         10800 mV
Capacity (warn):        518 mAh
Capacity (low):         18 mAh
Low/warn granularity:   1 mAh
Warn/full granularity:  1 mAh
Model number:           42T4763
Serial number:              1
Type:                   LION
OEM info:               SANYO
State:                  discharging
Remaining capacity:     97%
Remaining time:         7:17
Present rate:           1393 mA (17086 mW)
Present voltage:        12266 mV

As you can see from the command above this custom battery size is even reported as closer to 10400mAh instead of advertised 9600maH. I do not know how to check which one is closer to truth – but the fact is that it allows longer work then the official one – and for smaller price.

Experience

This laptop along with its smaller and lighter brothers such as ThinkPad X220 or ThinkPad T420s are the best machines I know to work on FreeBSD … but maybe its because I do not use newer laptops πŸ™‚ The general experience of FreeBSD on ThinkPad W520 is stable and uninterrupted work count in days and weeks of uptime. The suspend/resume works like a charm with many cycles possible – not just one. I one even recorded such suspend/resume cycle with many applications and games running on a busy FreeBSD system. Its available here FreeBSD 12.2 Suspend/Resume on a Vimeo page.

Here is now its being used daily.

w520.real

Summary

I have been using this laptop since many years and I even laugh that as its a decade old – I would use it for the next decade πŸ™‚ Most/all of this configuration applies to other ThinkPad models from this lineup like X220/T420s/T420/T520 … probably even L520 (but I did not tested that one).

EOF

FreeBSD Desktop – Part 22 – Configuration – Aero Snap Extended

I like to post new articles and solutions when I think they are ready. Production tested and stable. Well thought and tested … or at least trying to make things as good as possible in the available time window. Perfectionism definitely does not help making often articles on the blog.

Today’s solution is not perfect but I will ‘ship it’ anyway because good and done is better then perfect. I wanted to rework it so many times that I stopped counting … and I really would like to continue the series – thus I have made a conscious decision to finally release it and hope that maybe someone else will have better ideas to make it better. I really wanted to provide pixel perfect solution with as much screen space used as possible but to deliver it as it is I tested it only on the resolution I use the most – the FullHD one with 1920×1080 pixels.

You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.

Aero Snap

Today I would like to share with You what I call Aero Snap Extended. The original Aero Snap was introduced in Windows 7 and this is how it is described in the Wikipedia page – “Dragging a window to the right or left side of the desktop causes the window to fill the respective half of the screen. Snapping a window to the top of the screen maximizes it. Windows can be resized by stretching them to touch the top or bottom of the screen, which fully increases their vertical screen estate, while retaining their width, these windows can then slide horizontally if moved by the title bar, or pulled off, which returns the window to its original height. In spite of the “Aero” moniker, this feature is available if one uses the Classic theme. This feature is also available on Windows 10.”

This is like the original Aero Snap looks like.

aero

The idea behind original Aero Snap was pretty simple. Its basically these four shortcuts.

[WIN] + [LEFT] – will place window on the left half of the screen.
[WIN] + [RIGHT] – will place window on the right half of the screen.
[WIN] + [UP] – will maximize the window.
[WIN] + [DOWN] – will minimize the window.

Aero Snap Extended

Mine Aero Snap Extended is … well more extended πŸ™‚

As usual its just a small POSIX /bin/sh compatible shell script. There are only two dependencies for it – the /usr/local/bin/xdpyinfo from xdpyinfo package and /usr/local/bin/wmctrl from wmctrl package. At the beginning of the script you will find several ‘settings’ that you may find needed to be tuned to your needs. Most important ones are MARGIN_TOP/MARGIN_LEFT/MARGIN_RIGHT options. Unfortunately MARGIN_BOTTOM is not implemented. Sorry.

geany-aero

Here are the shortcuts that I use for mine version but You may of course use other key then [WIN] for it.

(L) [WIN] + [LEFT] – will place window on the left half of the screen.
(R) [WIN] + [RIGHT] – will place window on the right half of the screen.
(U) [WIN] + [UP] – will place window on the upper half of the screen.
(D) [WIN] + [DOWN] – will place window on the lower half of the screen.

Here is ASCII diagram for its graphical visualization.

+------+------+  +-------------+
|      |      |  |     (U)     |
|      |      |  |             |
| (L)  |  (R) |  +-------------+
|      |      |  |             |
|      |      |  |     (D)     |
+------+------+  +-------------+

… and also a live screenshots.

aero.800.2a

aero.800.2b

(SL) [WIN] + [SHIFT] + [LEFT] – will place window on the left half of the screen taking 2/3 space of the screen.
(SR) [WIN] + [SHIFT] + [RIGHT] – will place window on the right half of the screen taking 1/3 space of the screen.
(SU) [WIN] + [SHIFT] + [UP] – will place window on the upper half of the screen taking 2/3 space of the screen.
(SD) [WIN] + [SHIFT] + [DOWN] – will place window on the lower half of the screen taking 1/3 space of the screen.

Here is ASCII diagram for its graphical visualization.

+--------+----+  +-------------+
|        |    |  |    (SU)     |
|        |    |  |             |
|  (SL)  |(SR)|  |             |
|        |    |  +-------------+
|        |    |  |    (SD)     |
+--------+----+  +-------------+

… and also a live screenshots.

aero.800.3a

aero.800.3b

The above shortcuts are quite simple and easy to remember.

Now here comes when this is more interesting.

Most keyboards – at least those with the best possible keyboard layout in the world – the ANSI standard keyboard (includes 7-row ThinkPad keyboards – have these three keys one next to another – [CTRL] [WIN] [ALT] – some call the [WIN] key as [SUPER] instead. I use [WIN] as it takes shorter to write and it shows where this key came from.

The 87 keys ANSI stand alone keyboard.

keyboard-ansi

The ThinkPad T420s keyboard.

keyboard-ansi-thinkpad

Now back to topic.

How to use these three keys to send windows to various places of the screen to make it easy to memorize and also not to break existing shortcuts … I think I found a way.

{ [CTRL] [WIN] } [ALT] – these two will send windows to the left side of the screen.

[CTRL] { [WIN] [ALT] } – these two will send windows to the right side of the screen.

Now to the point …

(Q1) [CTRL] + [WIN] + [UP] – will take window to the left and upper part of the screen – taking 1/4 of its space.
(Q2) [CTRL] + [WIN] + [DOWN] – will take window to the left and lower part of the screen – taking 1/4 of its space.
(Q3) [WIN] + [ALT] + [UP] – will take window to the right and upper part of the screen – taking 1/4 of its space.
(Q4) [WIN] + [ALT] + [DOWN] – will take window to the right and lower part of the screen – taking 1/4 of its space.

Now for some the exact 1/4 screen for each of these windows may be not suitable.

Thus I also added a modified versions with [SHIFT] key.

(S1) [SHIFT] + [CTRL] + [WIN] + [UP] – will take window to the left and upper part of the screen – taking 2/3 of horizontal and 2/3 vertical space of the screen.
(S2) [SHIFT] + [CTRL] + [WIN] + [DOWN] – will take window to the left and lower part of the screen – taking 2/3 of horizontal and 1/3 vertical space of the screen.
(S3) [SHIFT] + [WIN] + [ALT] + [UP] – will take window to the right and upper part of the screen – taking 1/3 of horizontal and 2/3 vertical space of the screen.
(S4) [SHIFT] + [WIN] + [ALT] + [DOWN] – will take window to the right and lower part of the screen – taking 1/3 of horizontal and 1/3 vertical space of the screen.

Here is ASCII diagram for its graphical visualization.

+------+------+  +--------+----+
| (Q1) | (Q3) |  |  (S1)  |(S3)|
|      |      |  |        |    |
+------+------+  |        |    |
|      |      |  +--------+----+
| (Q2) | (Q4) |  |  (S2)  |(S4)|
+------+------+  +--------+----+

… and also a live screenshots.

aero.800.1a

aero.800.1b

Now you have about 95% variations of needed windows places in the keyboard shortcuts.

There are also several complementary addons like making the window centered on the screen but without making it cover the whole screen. As I already use other originated from Windows [ALT] + [ESC] shortcut to send the current windows to the ‘back’ I also added [WIN] + [ESC] for this feature.

(C) [WIN] + [ESC] – place current window centered on screen covering about 2/3 of its space.

As it was relatively easy and fast I also added fullscreen option.

(F) [CTRL] + [ALT] + [F] – make current window go fullscreen

+-------------+  +-------------+
|             |  | +---------+ |
|             |  | |         | |
|     (F)     |  | |   (C)   | |
|             |  | |         | |
|             |  | +---------+ |
+-------------+  +-------------+

… and also a live screenshot.

aero.800.4

Usage

The Aero Snap Extended has the following options.

% aero-snap.sh
usage:

  aero-snap.sh OPTION

OPTION(s):

  L - place window on left  half of screen
  R - place window on right half of screen
  T - place window on upper half of screen
  B - place window on lower half of screen

  SHIFT-L - place window on left  half of screen taking 2/3 space
  SHIFT-R - place window on right half of screen taking 1/3 space
  SHIFT-T - place window on upper half of screen taking 2/3 space
  SHIFT-B - place window on lower half of screen taking 1/3 space

  TL - place window to left/upper  part of screen
  TR - place window to left/lower  part of screen
  BL - place window to right/upper part of screen
  BR - place window to right/lower part of screen

  SHIFT-TL - use left/upper  part with 2/3 of H. and 2/3 V. space
  SHIFT-TR - use left/lower  part with 2/3 of H. and 1/3 V. space
  SHIFT-BL - use right/upper part with 1/3 of H. and 2/3 V. space
  SHIFT-BR - use right/lower part with 1/3 of H. and 1/3 V. space

  C - center window covering about 2/3 of screen
  F - make current window go fullscreen
  Q - remove fullscreen property from window

The Aero Snap Extended can be downloaded from here – aero-snap.sh – the usual place for my scripts.

Openbox Integration

Because of WordPress limitation I will not post Openbox configuration here but You will also find a link to that content in the text form below.

openbox-config

Here is this configuration in text form – rc.xml.openbox.aero.config – from the same location.

More then a year after I implemented this way of tiling on Openbox I found out that its also possible to use that ‘natively’ on Openbox using ‘direct’ Openbox configuration rules.

openbox-native

It definitely should be faster and easier to implement – not to mention that external dependencies will not be available – but a script allows more tuning and flexibility.

Other Window Managers

If you are not into Openbox then you may create these shortcuts using xbindkeys for example.

Future Work

Mine Aero Snap Extended could use some polish and especially testing in the other resolutions the the well tested 1920×1080.

Regards.

EOF

My FreeBSD Story

As Roman Zolotarev asked if I would write an entry for his Tell Your BSD Story page I could not refuse. That page was available at the https://www.bsdjobs.com/people/hi.html URL but seems that Roman abandoned the bsdjobs.com domain unfortunately. I really tried to make it short and small but I guess its not that straight πŸ™‚

My first devices/computers/consoles (not at the same time) that I remember were Atari 2600 and Pegasus console which was hardware clone of the Nintendo NES.

atari-2600.png

Back then I did not even knew that it was Atari 2600 as I referred to it as Video Computer System … and I did not even knew any english by then. It took me about two decades to get to know (by accident) that this Video Computer System was Atari 2600 πŸ™‚

This equipment was used for playing computer games only.

Then I got AMIGA 600 computer (or should I say my parents bought it for me) which served both for playing computer games and also other activities for the first time. AMIGA is the computer that had the greatest influence on me, as it was the first time I studied the books about Amiga Workbench operating system and learned commands from Amiga Shell terminal. I loved the idea of Ram Disk icon/directory on the desktop that allowed me to transparently put any things in system memory. I still miss that concept on today’s desktop systems … and I still remember how dismal I was when I watched Amiga Deathbed Vigil movie.

amiga-600.png

At the end of 1998 I got my first PC that of course came with Windows and that computer served both as gaming machine and as well as typical tool. One time I dig into the internals with Windows Registry (which left me disgusted by its concepts and implementation) and its limited command line interface provided by CMD.EXE executable. I remember that the heart of this box was not the CPU or the motherboard but the graphics accelerator – the legendary 3Dfx Voodoo card. This company (3Dfx) – their attitude and philosophy – also left solid fingerprint on my way. Like AMIGA did.

Hence how the top of my laptop looks like now πŸ™‚

laptop.jpg

Some games was even released as special edition with the only feature being support for the 3Dfx Glide driver like Need for Speed II: Special Edition.

nfs.jpg

After ‘migration’ from AMIGA to PC it never again ‘felt right’. The games were cool but the Windows system was horrible. Time has passed and different Windows versions and hardware modifications took place. Windows XP felt really heavy at that time, not to mention Windows 2000 for example with even bigger hardware requirements. I also do not understand all the hate about Windows ME. It crashed with the same frequency as Windows 98 or later Windows 98 Second Edition but maybe my hardware was different πŸ™‚

windowsme.png

I do not have any ‘mine’ screenshots from that period as I lost all my 40 GB (huge then) drive of data when I moved/resized the partition with Partition Magic to get some more space from the less filled C: drive. That day I learned hard that “there are people who do backups and people who will do backups”. I never lost data again as I had multiple copies of my data, but the same as Netheril fall the lost data was was gone forever.

I always followed various alternatives which led me to try Linux in 2003, after reading about various distributions philosophies I decided to run Slackware Linux with KDE 3. My buddy used Aurox Linux by then (one of the few Linux distributions from Poland) and encouraged me to do the same – especially in the context of fixing possible problems as he already knew it and also as he recently dumped Windows system. But Slackware sounded like a better idea so I took that path instead. At first I dual booted between Windows XP and Slackware Linux cause I had everything worked out on the Windows world while I often felt helpless in the Linux world, so I would reboot into Windows to play some games or find a solution for Linux problem if that was required. I remember how strange the concept of dual clipboards (PRIMARY and SECONDARY) was for me by then. I was amazed why ‘so much better’ system as Linux (at least marketed that way) needs a system tray program to literally manage the clipboard. On Windows it was obvious, you do [CTRL]+[C] to copy and [CTRL]+[V] to paste things, but on Linux there (no I know its X11 feature) there were two clipboards that were synchronized by this little system tray program from KDE 3. It was also unthinkable for me that I will ‘lost’ contents of last/recent [CTRL]+[C] operation if I close the application from which the copy was made. I settled down a little on Slackware but not for long. I really did not liked manual dependency management for packages for example. Also KDE 3 was really ugly and despite trying all possible options I was not able to tweak it into something nice looking.

After half a year on Slackware I checked the Linux distributions again and decided to try Gentoo Linux. I definitely agree with the image below which visualizes Gentoo Linux experience, especially when You install it for he first time πŸ™‚

gentoo-fly

Of course I went with the most hardcore version with self building Stage 1 (compiler and toolchain) which was horrible idea at that time because compilation on slow single core machine took forever … but after many hours I got Gentoo installed. I now have to decide which desktop environment to use. I have read a lot of good news about Fluxbox at that time so this is what I tried. It was very weird experience (to create everything in GUI from scratch) but very pleasant one. That recalled me the times of AMIGA … but Linux came in the way too much often. The more I dig into Gentoo Linux the more I read that lots of Gentoo features are based on FreeBSD solutions. Gentoo Portage is a clone of FreeBSD Ports. That ‘central’ /etc/rc.conf system configuration file concept was taken from FreeBSD as well. So I started to gather information about FreeBSD. The (then) FreeBSD website or FreeBSD Ports site (still) felt little outdated to say the least but that did not discouraged me.

Somewhere in 2005 I installed FreeBSD 5.4 on my computer. The beginnings were hard, like the earlier step with Gentoo but similarly like Gentoo the FreeBSD project came with a lot of great documentation. While Gentoo documentation is concentrated within various Gentoo Wiki sites the FreeBSD project comes with ‘official’ documentation in the form of Handbook and FAQ. I remember my first questions at the now nonexistent BSDForums.org site – for example one of the first ones – how to scroll the terminal output in the plain console. I now know that I had to push Scroll Lock button but it was something totally new for me.

How BSDForums.org looked like.

bsdforums.png

This is the earliest screenshot I got from that period, and Gentoo setup looked very similar.

vermaden-2005.11.08.jpg

Why FreeBSD and not OpenBSD or NetBSD? Probably because Gentoo based most their concepts on the FreeBSD solutions, so that led me to FreeBSD instead of the other BSD operating systems. Currently I still use FreeBSD but I keep an steady eye on the OpenBSD, HardenedBSD and DragonFly BSD solutions and improvements.

As the migration path from Linux to FreeBSD is a lot easier – all configuration files from /home can be just copied – the migration was quite fast easy. I again had the Fluxbox configuration which I used on the Gentoo. Now – on FreeBSD – it started to fell even more like AMIGA times. Everything is/has been well thought and had its place and reason. The documentation was good and the FreeBSD Community was second to none.

I even decided to upgrade the hardware to something more exotic. I got Gigabyte-GA-7DPXDW server motherboard with dual CPU sockets – and as Athlon XP (desktop) processors were very easily modified to ‘be’ Athlon MP (server) ones I got also the second one along with 1 GB of ECC RAM.

gigabyte-GA-7DPXDW.jpg

This dual CPU setup – quite unusual at these times – server me very well. I switched from nvidia binary blob driver to software but open nv because nvidia would break my uptime every several days πŸ™‚

I accumulated 30 days of uptime on that desktop box, not bad for a system without any emergency UPS πŸ™‚

uptime-vermaden.png

This was also the last time I used ECC RAM on FreeBSD (at least on my boxes) while ZFS did not even existed on FreeBSD πŸ™‚ But as time flied I started to feel the need for something faster. As I also got interested in Intel graphics card I got the new motherboard with fastest Intel graphics card available then – as silly as it sounds – the Asus P5B-V with Intel X3000 GMA … and that was a terrible idea because FreeBSD graphics stack supported all the Intel graphics cards instead of that one. At the beginning I used software vesa driver but the problem was not the performance of the driver (as I also had quad core Intel Q6600 CPU) but the resolution on the screen. As I got 1280 x 1024 screen by then using limited 1024 x 768 was real PITA. I decided that I will try something else then FreeBSD will Intel X3000 support finally arrives. I needed to do something fast as I also needed to write my Masters Thesis at that time.

That was in the middle of 2007. I wanted to try the other end of the Linux distributions spectrum. Ubuntu. I could not go more ‘desktop’ way πŸ™‚ It of course installed gently with GNOME 2 environment and pulseaudio already unfortunately existed. As I preferred to run my computer all the time back then (I did not payed the electricity bills) there were several things that annoyed my very much. For example the mentioned pulseaudio – the sound freezed after one-two days of using the computer (even if I did not played any music or videos) and it stayed that way. I could restart pulseaudio or reload the ALSA modules but it stayed in this SUSFU state (situation unchanged still fucked up) until reboot. As I needed to finish my Masters Thesis I did not had time to reinstall into something else as pulseaudio will be probably similarly broken on other Linux distributions and FreeBSD was still lacking the Intel X3000 GMA support. Generally GNOME 2 experience was not bad but I really missed all my custom settings, keyboard shortcuts and customized behavior. I remained in pain on the Ubuntu for two months – to the time I have finished my Masters Thesis about Operating Systems’ Virtualization which you can download and read but its in Polish so use translator if needed πŸ™‚

This is how Ubuntu looked back then.

ubuntu.jpg

I also had ‘side’ journey to the Mac wonderland as I got opportunity to use Macbook Pro with Mac OS X Leopard for a year. That allowed me to get real ‘feel’ of the Mac ecosystem and their hardware (and philosophy) so I will not repeat same stereotypes over and over again like a lot of anti-apple people. But after I switched back to FreeBSD system at work it just felt better. I used Terminal.app on Mac a lot but the xterm(1) at FreeBSD just felt more natural.

What makes me laugh now that I created Mac styled Fluxbox themes years till I got to run Mac and I still like Mac OS X look from the Leopard times.

vermaden-2007.10.14-mac.png

There was time on which I also played with Solaris (and later OpenSolaris). I must admit that there was time when Solaris so called Java Desktop based on GNOME 2 was really looking good. It was so good that only Mac OS X could only rival it for the best looking os by then.

solaris-10-GNOME-2-java-desktop.png

I really liked Solaris concepts and solutions like Zones and ZFS, also Crossbow, Comstar or IPS (FreeBSD did not had PNGng by then). But I always got problem with ‘desktop’ software. While I had everything in the FreeBSD Ports – almost the same amount of applications that is available on Linux – there was always some applications lacking in the Solaris world.

The Solaris ‘journey’ also left print on my soul so my Fluxbox themes went into Solaris style πŸ™‚

vermaden-2007.07.30-solaris-java-fluxbox-system.png

After the Ubuntu fiasco I got other motherboard as FreeBSD still did not supported Intel GMA X3000 card and settled in the FreeBSD land again. What a relief it was after this pulseaudio nonsense. In the meantime as I read a lot of good experiences about Openbox I decided to try it out instead of Fluxbox. It was strange feeling to mess with XML configuration files at the beginning but as I got used to it and ordered the rc.xml and menu.xml configuration files properly it was not a problem. Since then I used FreeBSD on different machines including physical servers, virtual machines and laptops. I learned that adequate supported hardware is the most important factor in FreeBSD ecosystem.

I still use Openbox and still use FreeBSD today and my desktop looks like that one below.

vermaden-NOW.jpg

After 15 years of using various Windows, UNIX (macOS/AIX/HP-UX/Solaris/OpenSolaris/Illumos/FreeBSD/OpenBSD/NetBSD) and UNIX-like (Linux) systems I always come to conclusion that FreeBSD is the system that sucks least. And sucks least with each release and one day I will write why FreeBSD is such great operating system … if I already haven’t πŸ™‚

UPDATE 1

As Roman Zolotarev got a moment he added my story to his Tell Your BSD Story page. That page was available at the https://www.bsdjobs.com/people/ URL but seems that Roman abandoned the bsdjobs.com domain unfortunately.

Thanks Roman!

You may check it for yourself at Slawomir Wojciech Wojtczak (vermaden) runs FreeBSD page.

EOF

FreeBSD Desktop – Part 12 – Configuration – Openbox

Time to cut the bullshit and actually make some real configuration. In today’s article of the FreeBSD Desktop series I will describe how to configure the Openbox window manager.

You may want to check other articles in the FreeBSD Desktop series on the FreeBSD Desktop – Global Page where you will find links to all episodes of the series along with table of contents for each episode’s contents.

Features

Comparing to earlier articles in the series it will be HUGE, sorry for that. I could cut it into smaller parts but that would require editing of the Openbox configuration, its shortcuts and menus over and over again, so for the sake of simplicity its better to put it all at once. As it is as that big there will be mistakes, but I will fix them ASAP.

Here is the list of all features that will be available in this Openbox configuration.

  • Nice looking Openbox theme.
  • Openbox Menu (static) with nice looking icons.
  • Openbox Menu for FreeBSD top(1)/ps(1) commands and config files/logs.
  • Openbox Menu for FreeBSD default sound output.
  • Openbox Menu and shortcuts for FreeBSD sound volume increase/decrease.
  • Openbox Menu for FreeBSD for CPU frequency scaling.
  • Openbox Menu for FreeBSD network management with network.sh script.
  • Openbox Menu for screenshots/wallpapers management.
  • Openbox Menu for Recent files.
  • Random wallpaper handling.
  • Random xterm(1) theme at every terminal start with lost of great themes.
  • Openbox shortcuts and script for Aero Snap like behavior.
  • Openbox Dmenu shortcuts and integration.
  • Openbox configured with nice fonts.
  • Openbox shortcuts for most important tasks.
  • Warning for low battery on laptop.
  • I probably forgot about dozen other features – let me know in comments πŸ™‚

Here is how the Openbox menus and window borders and window switching would look like.

openbox-alt-tab

openbox-menu

Here are all the files with needed configuration.

Doas

To make most scripts work Your user (vuk in the series) needs to be in the wheel, operator and network groups and doas(1) (sudo(8) equivalent) needs to be installed and configured in the following way.

# pkg install doas

# pw groupmod wheel    -m vuk
# pw groupmod operator -m vuk
# pw groupmod network  -m vuk

# cat /usr/local/etc/doas.conf
permit nopass :wheel as root

permit nopass :network as root cmd ifconfig
permit nopass :network as root cmd dhclient
permit nopass :network as root cmd umount
permit nopass :network as root cmd wpa_supplicant
permit nopass :network as root cmd ppp
permit nopass :network as root cmd killall args -9 dhclient
permit nopass :network as root cmd killall args -9 wpa_supplicant
permit nopass :network as root cmd killall args -9 ppp
permit nopass :network as root cmd cat args /etc/ppp/ppp.conf
permit nopass :network as root cmd /etc/rc.d/netif args onerestart
permit nopass :network as root cmd tee args /etc/resolv.conf
permit nopass :network as root cmd tee args -a /etc/resolv.conf

Scripts

In this post I attach scripts I have made and used for about 13 years since I started to use FreeBSD on the desktop. Download them all in the scripts.tar.gz file and unpack them into the ~/scripts to make it look like that.

% find scripts | sort
scripts/__openbox_cpufreq.sh
scripts/__openbox_current_wallpaper.sh
scripts/__openbox_delete_wallpaper.sh
scripts/__openbox_dmenu.sh
scripts/__openbox_edit_screenshot.sh
scripts/__openbox_edit_wallpaper_gimp.sh
scripts/__openbox_freebsd_sound.sh
scripts/__openbox_lock_zzz.sh
scripts/__openbox_lock.sh
scripts/__openbox_recent.sh
scripts/__openbox_reload_wallpaper.sh
scripts/__openbox_restart_conky.sh
scripts/__openbox_restart_dzen2.sh
scripts/__openbox_restart_plank.sh
scripts/__openbox_restart_tint2.sh
scripts/__openbox_show_screenshot.sh
scripts/__openbox_stats_ps_KILLALL.sh
scripts/__openbox_stats_top_cpu_KILL.sh
scripts/__openbox_stats_top_cpu_RENICE.sh
scripts/__openbox_stats_top_mem_KILL.sh
scripts/__openbox_stats_top_mem_RENICE.sh
scripts/aero-snap.sh
scripts/fc-cache.sh
scripts/firefox-clean.sh
scripts/network.sh
scripts/random_wallpaper.sh
scripts/shot.sh
scripts/xterm.sh
scripts/desktop-kill-shit.sh
scripts/desktop-battery-warning.sh

Make sure they remain executable.

% chmod +x ~/scripts/*

To make them work properly add ~/scripts into the ${PATH} variable at the beginning of the ~/.xinitrc file.

# PATH TO SCRIPTS
  export PATH=${PATH}:~/scripts


All of my scripts have this ‘mysterious’ line at the end. Its for statistics to check which scripts are run when (or it at all to which ones to delete).

echo '1' >> ~/scripts/stats/$( basename ${0} )

Thus it is needed to create the ‘stats’ directory.

% mkdir -p ~/scripts/stats

I have implemented that about two months ago and here are the results.

% wc -l ~/scripts/stats/* | sort -n
       1 /home/vermaden/scripts/stats/__openbox_show_screenshot.sh
       2 /home/vermaden/scripts/stats/__openbox_cpufreq.sh
       2 /home/vermaden/scripts/stats/__openbox_current_wallpaper.sh
       2 /home/vermaden/scripts/stats/__openbox_fullscreen.sh
       4 /home/vermaden/scripts/stats/__openbox_restart_dzen2.sh
       4 /home/vermaden/scripts/stats/dzen2-fifo.sh
       5 /home/vermaden/scripts/stats/__openbox_dmenu.sh
       5 /home/vermaden/scripts/stats/__openbox_restart_conky.sh
       5 /home/vermaden/scripts/stats/__openbox_restart_tint2.sh
       6 /home/vermaden/scripts/stats/__openbox_delete_wallpaper.sh
       7 /home/vermaden/scripts/stats/__openbox_freebsd_sound.sh
       8 /home/vermaden/scripts/stats/aero-snap.sh
      12 /home/vermaden/scripts/stats/__openbox_edit_screenshot.sh
      16 /home/vermaden/scripts/stats/__openbox_lock_zzz.sh
      16 /home/vermaden/scripts/stats/__openbox_lock.sh
      22 /home/vermaden/scripts/stats/shot.sh
      24 /home/vermaden/scripts/stats/network.sh
     214 /home/vermaden/scripts/stats/xterm.sh
     960 /home/vermaden/scripts/stats/random_wallpaper.sh
    2767 /home/vermaden/scripts/stats/desktop-battery-warning.sh
   13834 /home/vermaden/scripts/stats/desktop-kill-shit.sh
   17916 total

Of course I limited the output only to scripts that are available in this article, but be patient, more to come later πŸ™‚

Dependencies

To make these scripts work and generally to make all this setup work we will need these dependencies.

  • arandr
  • qt5ct
  • qtconfig-qt4
  • sakura
  • leafpad
  • geany
  • caja
  • thunar
  • libreoffice
  • galculator
  • pidgin
  • firefox
  • chrome
  • deadbeef
  • transmission-gtk
  • gnumeric
  • abiword
  • audacity
  • filezilla
  • midori
  • gimp
  • lupe
  • xvidcap
  • zenity
  • xterm
  • xrdb
  • scrot
  • feh
  • wmctrl
  • xdotool
  • viewnior
  • tint2
  • plank
  • dzen2
  • conky
  • mate-screensaver
  • xlockmore
  • gimp
  • dmenu
  • powerdxx
  • htop
  • galculator

To install them all with pkg(8) just type this line below.

# pkg install \
    geany caja thunar libreoffice galculator pidgin firefox chrome midori \
    abiword deadbeef transmission-gtk gnumeric  audacity filezilla zenity \
    gimp lupe recorder xvidcap  xterm xrdb scrot feh wmctrl xdotool tint2 \
    viewnior plank dzen2 conky mate-screensaver xlockmore powerdxx arandr \
    qt5ct gfontview galculator qtconfig qtconfig-qt4 sakura leafpad dmenu \
    htop 
   

I also assume that wallpapers will be kept under ~/gfx/wallpapers dir and screenshots made under ~/gfx/screenshots directory, so lets create them now.

% mkdir -p ~/gfx/wallpapers
% mkdir -p ~/gfx/screenshots

Crontab

Some of these scripts needs to be put into crontab(1) to work, here are their entries.

% crontab -l
# DESKTOP
  *     *     * * * ~/scripts/desktop-kill-shit.sh                                       1> /dev/null 2> /dev/null
  */5   *     * * * ~/scripts/desktop-battery-warning.sh
  */20  *     * * * ~/scripts/random_wallpaper.sh ~/gfx/wallpapers                       1> /dev/null 2> /dev/null
  12,0  *     * * * /usr/bin/find ~/.cache -mtime +10 -delete                            1> /dev/null 2> /dev/null
  0     */3   * * * /usr/bin/find ~/.local/share/Trash/files -mtime +1 -delete  1> /dev/null 2> /dev/null

Fonts

I use Ubuntu Mono font for the Openbox menus and Fira Sans font for the Openbox window bar titles, thus you will download them in the fonts.tar.gz file and extract them like that into the ~/.fonts directory, if if does not exists, create it.

% find .fonts
.fonts/fira-sans-bold-italic.otf
.fonts/fira-sans-bold.otf
.fonts/fira-sans-italic.otf
.fonts/fira-sans-regular.otf
.fonts/ubuntu-mono-bold-italic.ttf
.fonts/ubuntu-mono-bold.ttf
.fonts/ubuntu-mono-italic.ttf
.fonts/ubuntu-mono-regular.ttf

To make sure that Openbox will ‘see’ them you can verify it using the fc-match(1) command like below.

% fc-match 'Fira Sans'
fira-sans-regular.otf: "Fira Sans" "Regular"

% fc-match 'Ubuntu Mono'
ubuntu-mono-regular.ttf: "Ubuntu Mono" "Regular"

Openbox

Openbox consists mostly of two files.

  • ~/.config/openbox/menu.xml
  • ~/.config/openbox/rc.xml

There are also these two, but its pointless to use them as we set our environment and start our apps/daemons in the ~/.xinitrc file (with ~/.xsession symlink to it), but anyway.

  • ~/.config/openbox/autostart
  • ~/.config/openbox/environment

The icons for the Openbox menu are kept under ~/.config/openbox/icons directory.

Download whole Openbox configuration in the openbox.tar.gz file and unpack it into the ~/.config/openbox to make it look like that.

% find .config/openbox -maxdepth 1
.config/openbox
.config/openbox/rc.xml
.config/openbox/menu.xml
.config/openbox/icons
.config/openbox/environment
.config/openbox/autostart

Openbox Theme

The theme we will use at start is the Openbox Flat made by myself, I do not remember if I put it online on the https://www.box-look.org/ site but that does not matter. Grab it in the openbox-flat-theme.tar.gz file and unpack it like that into the ~/.themes directory, create it if it does not exists.

% find .themes/openbox_flat
.themes/openbox_flat
.themes/openbox_flat/openbox-3
.themes/openbox_flat/openbox-3/iconify.xbm
.themes/openbox_flat/openbox-3/XPM
.themes/openbox_flat/openbox-3/XPM/over.xpm
.themes/openbox_flat/openbox-3/XPM/close.xpm
.themes/openbox_flat/openbox-3/XPM/max.xpm
.themes/openbox_flat/openbox-3/XPM/stick.0.xpm
.themes/openbox_flat/openbox-3/XPM/min.xpm
.themes/openbox_flat/openbox-3/XPM/shade.xpm
.themes/openbox_flat/openbox-3/XPM/stick.1.xpm
.themes/openbox_flat/openbox-3/max.xbm
.themes/openbox_flat/openbox-3/close.xbm
.themes/openbox_flat/openbox-3/bullet.xbm
.themes/openbox_flat/openbox-3/shade.xbm
.themes/openbox_flat/openbox-3/themerc
.themes/openbox_flat/openbox-3/desk.xbm
.themes/openbox_flat/openbox-3/desk_toggled.xbm

Openbox FreeBSD Submenus

The ‘systemOpenbox submenu is for FreeBSD top(1)/ps(1) commands and config files/logs.

openbox-system.jpg

The ‘soundOpenbox submenu is for FreeBSD default sound output selection.

openbox-sound.jpg

The ‘recentOpenbox submenu is for Recent files.

openbox-recent.jpg

Check ‘screenshot:‘ and ‘wallpaper:‘ in the ‘x11Openbox submenu for screenshots/wallpapers management.

Check ‘cpu:‘ in the ‘utilitiesOpenbox submenu for FreeBSD for CPU frequency scaling.

Check ‘NETWORK:‘ in the ‘daemonsOpenbox submenu for FreeBSD network management with network.sh script.

Shortcuts

Lets start with the most basic ones. [SUPER] is the so called Windows key.

Shortcuts – Virtual Desktops

  • [ALT] + [F1] – switch to 1st virtual desktop.
  • [ALT] + [F2] – switch to 2nd virtual desktop.
  • [ALT] + [F3] – switch to 3rd virtual desktop.
  • [ALT] + [F4] – switch to 4th virtual desktop.
  • [SHIFT] + [ALT] + [F1] – move current window to 1st virtual desktop.
  • [SHIFT] + [ALT] + [F2] – move current window to 2nd virtual desktop.
  • [SHIFT] + [ALT] + [F3] – move current window to 3rd virtual desktop.
  • [SHIFT] + [ALT] + [F4] – move current window to 4th virtual desktop.

Shortcuts – Menus

  • [SUPER] + [SPACE] – show Openbox root menu.
  • [SUPER] + [ALT] + [SPACE] – show Openbox window list menu.
  • [ALT] + [SPACE] – show current window options menu (client menu).

Shortcuts – Window Management

  • [ALT] + [TAB] – cycle windows focus forward.
  • [SHIFT] + [ALT] + [TAB] – cycle windows focus backward.
  • [CTRL] + [ALT] + [Q] – close current window.
  • [CTRL] + [ALT] + [F] – put current window info fullscreen.
  • [ALT] + [Up] – shade current window.
  • [ALT] + [Down] – minimize current window.
  • [ALT] + [ESC] – send current window below all other windows.

Shortcuts – Advanced Aero Snap

  • [SUPER] + [Up] – move window to half of the screen from top.
  • [SUPER] + [Down] – move window to half of the screen from bottom.
  • [SUPER] + [Left] – move window to half of the screen from left.
  • [SUPER] + [Right] – move window to half of the screen from right.
  • [SUPER] + [CTRL] + [Up] – move window to top-left part of the screen.
  • [SUPER] + [CTRL] + [Down] – move window to bottom-left part of the screen.
  • [SUPER] + [ALT] + [Up] – move window to top-right part of the screen.
  • [SUPER] + [ALT] + [Down] – move window to bottom-right part of the screen.
  • [SUPER] + [ESC] – move window to center – but without fullscreen.

Shortcuts – Mouse

  • [Scroll Up] on Desktop – previous virtual desktop.
  • [Scroll Down] on Desktop – next virtual desktop.
  • [Scroll Up] on (unshaded) Window Titlebar – shade current window.
  • [Scroll Up] on (shaded) Window Titlebar – unshade current window.
  • [Middle Click] on Window Titlebar – send window to background.
  • [Right Click] on Window Titlebar – show window options menu (client menu).
  • [Left Click] on Window Titlebar Icon – show window options menu (client menu).
  • [Middle Click] on Window Titlebar Icon – close window.

Shortcuts – Various

  • [CTRL] + [SHIFT] + [ESC] – launch xterm(1) with htop(1) started with doas(1) for root provilages.
  • [SUPER] + [E] – start Explorer Caja primary file manager.
  • [SUPER] + [E] – start Thunar secondary file manager.
  • [SUPER] + [D] – show desktop – minimize all windows.
  • [SUPER] + [R] – launch dmenu(1) starter.
  • [SUPER] + [L] – lock the screen.
  • [ALT] + [SHIFT] + [SUPER] + [L] – lock the screen and go to sleep.
  • [CTRL] + [PrintScreen] – make screenshot of the whole screen.
  • [SHIFT] + [CTRL] + [PrintScreen] – make screenshot of current window (click without moving the mouse) or selection (select part of the screen).

Shortcuts – Volume

These two work from keyboard.

  • [SUPER] + [ALT] + [PageUp] – increase volume.
  • [SUPER] + [ALT] + [PageDown] – decrease volume.

These below with mouse.

For those who do not have mouse with buttons on the wheel like the Lenovo ThinkPad Precision Wireless Mouse (0B47163) for example, use [ALT] key with mouse scroll up/scroll down on the desktop to increase/decrease volume.

If you do have such mouse, then left on the wheel to decrease and right on the wheel to increase volume.

Random Wallpaper

The random wallpaper handling is done with the ~/scripts/random_wallpaper.sh script. Be sure to put some images into the ~/gfx/wallpapers directory to make it work and to configure crontab(1) properly as shown earlier.

Random xterm(1) Theme

To have random xterm(1) theme on every startup you need three things, the ~/.Xdefaults default config file which is used by xterm(1), the ~/scripts/xterm.sh script and the ~/.config/Xdefaults directory with xterm(1) themes. I gathered all these themes all over the Internet, only the VERMADEN and VERMADEN-OLD themes are created by me.

I have expanded this topic a lot more here –Β FreeBSD Desktop – Part 25 – Configuration – Random Terminal Theme – in dedicated article.

Little preview of some of the included xterm(1) themes.

openbox-xterm.jpg

To make xterm(1) icon look better you will also need icons.tar.gz file download and extract with the end result looking as follows.

% find .icons
.icons/vermaden/xterm.xpm

Download and extract the xterm.tar.gz file to make its contents look like that.

% find ~/.config/Xdefaults 
.config/Xdefaults
.config/Xdefaults/themes
.config/Xdefaults/themes/Xdefaults.theme.DARK.N0TCH2K
.config/Xdefaults/themes/Xdefaults.theme.DARK.MOLOKAI
.config/Xdefaults/themes/Xdefaults.theme.DARK.FRONTEND-DELIGHT
.config/Xdefaults/themes/Xdefaults.theme.DARK.GRUVBOX-DARK
.config/Xdefaults/themes/Xdefaults.theme.DARK.TWILIGHT
.config/Xdefaults/themes/Xdefaults.theme.DARK.MONOKAI-SODA
.config/Xdefaults/themes/Xdefaults.theme.DARK.IC-GREEN-PPL
.config/Xdefaults/themes/Xdefaults.theme.DARK.GRUVBOX-TILIX
.config/Xdefaults/themes/Xdefaults.theme.DARK.NEOPOLITAN
.config/Xdefaults/themes/Xdefaults.theme.DARK.LOVELACE
.config/Xdefaults/themes/Xdefaults.theme.DARK.ARTHUR
.config/Xdefaults/themes/Xdefaults.theme.DARK.VERMADEN
.config/Xdefaults/themes/Xdefaults.theme.DARK.3024NIGHT
.config/Xdefaults/themes/Xdefaults.theme.DARK.SOLARIZED
.config/Xdefaults/themes/Xdefaults.theme.DARK.NORD
.config/Xdefaults/themes/Xdefaults.theme.DARK.VERMADEN-OLD
.config/Xdefaults/themes/Xdefaults.theme.DARK.HIGHWAY
.config/Xdefaults/themes/Xdefaults.theme.DARK.HARPER
.config/Xdefaults/themes/Xdefaults.theme.DARK.FLATUI
.config/Xdefaults/themes/Xdefaults.theme.DARK.SPACEDUST
.config/Xdefaults/themes/Xdefaults.theme.DARK.EARTHSONG
.config/Xdefaults/themes/Xdefaults.theme.DARK.PALI
.config/Xdefaults/themes/Xdefaults.theme.DARK.ALIENBLOOD
.config/Xdefaults/themes/Xdefaults.theme.DARK.ELIC
.config/Xdefaults/themes/Xdefaults.theme.LIGHT.SOLARIZED-LIGHT
.config/Xdefaults/themes/Xdefaults.theme.DARK.ELEMENTARY
.config/Xdefaults/themes/Xdefaults.theme.DARK.ELEMENTAL
.config/Xdefaults/themes/Xdefaults.theme.DARK.FREYA

Thats a lot of information for one article, feel free to ask me for anything related or about things that I might forgot to put here.

UPDATE 1 – network.sh Integration

In other article I described how to manage various network sources with the network.sh script – FreeBSD Network Management with network.sh Script – available here.

Below is an example of integration of that network.sh script with Openbox window manager.

network.sh.openbox.menu.jpg

… and here is the code used in the ~/.config/openbox/menu.xml file.

network.sh.openbox.menu.code

Of course you can integrate network.sh script with almost anything – its just a command πŸ™‚

EOF