You are on page 1of 7

7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub

Instantly share code, notes, and snippets.

priyadarshan / PolicyKit.conf
Forked from netzverweigerer/freebsd_11_notebook_install.txt
Last active 3 months ago


Star


Code
Revisions
22
Stars
6
Forks
3

FreeBSD 11 notebook installation cheat-sheet

add-to-xorg.conf

1 # Add to /etc/X11/xorg.conf
2
3
4 # https://unix.stackexchange.com/questions/34158/rebinding-disabling-ctrlaltf
5 # disable VT switching with Ctrl+Alt+Fn
6 # This is particularly bad right now, since
7 # nVidia driver has a bug: whne one switch VT, it falls back to a black screen.
8
9 # In that case, one should log out, log back in, and manually restart startx
10
11 # Also, to kill X11 (in case one needs to relaod xorg.conf), just do
12 # sudo service kdm4 stop
13
14 # But you will fall back to black screen. Then blindly log back in and do startx.
15
16
17 Section "ServerFlags"
18 Option "DontVTSwitch" "on"
19 EndSection
20
21
22 Section "InputClass"
23 Identifier "keyboard defaults"
24 MatchIsKeyboard "on"
25 Option "XKbOptions" "srvrkeys:none"
26 EndSection

freebsd_11_notebook_install.txt

1 FreeBSD 11 notebook installation cheat-sheet


2 ============================================
3
4 1) Turn off the terrible, annoying console beep:
5

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 1/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub
6 # sysctl -w hw.syscons.bell=0
7 # sysctl -w kern.vt.enable_bell=0
8
9 2) Make this permanent by editing /etc/sysctl.conf and adding these 2 lines:
10 hw.syscons.bell=0
11 kern.vt.enable_bell=0
12
13 3) Update the system using "pkg update" (install pkgng if asked to)
14
15 4) Install necessary console utilities / system tools:
16 # pkg install bash screen irssi ncmpc vim mpg123 git tig
17
18 5) Install graphical environment and Xorg utilities:
19 # pkg install xorg xfce xscreensaver audacious audacious-plugins firefox chromium
20
21 6) Generate /etc/machine-id
22 # uuidgen | tr -d "-" > /etc/machine-id
23
24 7) Create a minimal ~/.xinitrc file:
25 setxkbmap de
26 exec startxfce4
27
28 8) Enable psm configuration interface for trackpad/trackpoint:
29 /boot/loader.conf:
30 hw.psm.synaptics_support=1
31 hw.psm.trackpoint_support=1
32
33 9) Speed up trackpoint motion:
34 /etc/sysctl.conf:
35 hw.psm.trackpoint.sensitivity=240
36
37 10) To enable i915 kernel mode setting:
38 /boot/loader.conf:
39 i915kms_load="YES"
40
41 11) Add your user to the "video" group
42
43 12) The following optional settings in sysctl.conf have been proposed:
44
45 # Enhance shared memory X11 interface
46 kern.ipc.shmmax=67108864
47 kern.ipc.shmall=32768
48
49 # Enhance desktop responsiveness under high CPU use (200/224)
50 kern.sched.preempt_thresh=224
51
52 # Bump up maximum number of open files
53 kern.maxfiles=200000
54
55 # Disable PC Speaker

56 hw.syscons.bell=0
57

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 2/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub
58 # Shared memory for Chromium
59 kern.ipc.shm_allow_removed=1
60
61
62 vfs.usermount=1
63
64 13) Consider the following in /etc/profile
65
66 LC_ALL=en_US.UTF-8; export LC_ALL
67 CHARSET=UTF-8; export CHARSET
68
69 14) Consider the following in /boot/loader.conf
70
71 hw.psm.synaptics_support=1
72 hw.psm.trackpoint_support=1
73
74 i915kms_load="YES"
75
76 # Devil worship in loader logo
77 loader_logo="beastie"
78
79 # Boot-time kernel tuning
80 kern.ipc.shmseg=1024
81 kern.ipc.shmmni=1024
82 kern.maxproc=100000
83
84 # Load MMC/SD card-reader support
85 mmc_load="YES"
86 mmcsd_load="YES"
87 sdhci_load="YES"
88
89 # Access ATAPI devices through the CAM subsystem
90 atapicam_load="YES"
91
92 # Filesystems in Userspace
93 fuse_load="YES"
94
95 # Intel Core thermal sensors
96 coretemp_load="YES"
97
98 # AMD K8, K10, K11 thermal sensors
99 #amdtemp_load="YES"
100
101 # In-memory filesystems
102 tmpfs_load="YES"
103
104 # Asynchronous I/O
105 aio_load="YES"
106
107 # Handle Unicode on removable media

108 libiconv_load="YES"
109 libmchain_load="YES"

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 3/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub
110 cd9660_iconv_load="YES"
111 msdosfs_iconv_load="YES"
112
113 snd_driver_load="YES"
114
115 15) If you want your laptop to suspend on lid close, use the following in /etc/sysctl.c
116
117 # suspend on lid close
118 hw.acpi.lid_switch_state=s3
119
120 If you want to be able to use the battery widget in KDE, be sure you have hald enabled
121 To enable hald, add the following line to /etc/rc.conf:
122 hald_enable="YES"
123
124 # A useful FreeBSD 11 desktop installation guide I found:
125 https://cooltrainer.org/a-freebsd-desktop-howto/
126
127 # Real-Time Audio (DAW) in FreeBSD
128 A friend of mine wrote a very informative blog post about that topic and allowed me to
129 http://meka.rs/blog/2017/01/25/sing-beastie-sing/
130

fstab.txt

1 /etc/fstab
2
3 Some programs need linprocfs mounted on /compat/linux/proc. Add the
4 following line to /etc/fstab:
5
6 linprocfs /compat/linux/proc linprocfs rw 0 0
7
8 Then run "mount /compat/linux/proc".
9
10 Some programs need tmpfs mounted on /compat/linux/dev/shm. Add the
11 following line to /etc/fstab:
12
13 tmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0
14
15 Then run "mount /compat/linux/dev/shm".

loader.conf

1 # cat /boot/loader.conf
2
3 # NOTE: the MMC/SSD bit cause kernel panic
4
5 kern.geom.label.disk_ident.enable="0"
6 kern.geom.label.gptid.enable="0"
7 zfs_load="YES"
8
9 kern.vt.fb.default_mode="1440x810"
10 i915kms_load="YES"

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 4/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub

11 kern.vty="vt"
12 hw.psm.synaptics_support="1"
13 hw.psm.trackpoint_support="1"
14
15 # Boot-time kernel tuning
16 kern.ipc.shmseg=1024
17 kern.ipc.shmmni=1024
18 kern.maxproc=100000
19
20 # Load MMC/SD card-reader support
21 #mmc_load="YES"
22 #mmcsd_load="YES"
23 #sdhci_load="YES"
24
25 # Access ATAPI devices through the CAM subsystem
26 atapicam_load="YES"
27
28 # Filesystems in Userspace
29 fuse_load="YES"
30
31 # Intel Core thermal sensors
32 coretemp_load="YES"
33
34 # AMD K8, K10, K11 thermal sensors
35 #amdtemp_load="YES"
36
37 # In-memory filesystems
38 tmpfs_load="YES"
39
40 # Asynchronous I/O
41 aio_load="YES"
42
43 # Handle Unicode on removable media
44 libiconv_load="YES"
45 libmchain_load="YES"
46 cd9660_iconv_load="YES"
47 msdosfs_iconv_load="YES"
48
49 snd_driver_load="YES"

PolicyKit.conf

1 # /usr/local/etc/PolicyKit/PolicyKit.conf
2 # Allow normal users to mount removable media automatically
3
4 <config version="0.1">
5 <match action="org.freedesktop.hal.storage.mount-removable">
6 <return result="yes"/>
7 </match>
8 <match action="org.freedesktop.hal.storage.mount-fixed">
9 <return result="yes"/>
10 </match>

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 5/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub

11 <match user="root">
12 <return result="yes"/>
13 </match>
14 <define_admin_auth group="wheel"/>
15 </config>

rc.conf

1 # cat /etc/rc.conf
2
3 # NOTE: No more KDE!
4
5 clear_tmp_enable="YES"
6 syslogd_flags="-ss"
7 sendmail_enable="NONE"
8 hostname="lisp"
9 ifconfig_em0="DHCP"
10 sshd_enable="YES"
11 moused_enable="YES"
12 ntpd_enable="YES"
13 powerd_enable="YES"
14 # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
15 dumpdev="AUTO"
16 zfs_enable="YES"
17 dbus_enable="YES"
18 hald_enable="YES"
19 virtuoso_enable="YES"
20 virtuoso_config="/usr/local/lib/virtuoso/db/virtuoso.ini"
21 linux_enable="YES"
22 bsdstats_enable="NO"
23
24 atop_enable="YES"
25 svnserve_enable="YES"
26 svnserve_data="/usr/home/svn/repos"
27 webcamd_enable="YES"

sysctl.conf

1 # cat /etc/sysctl.conf
2
3 # NOTE: To allow sleep
4
5
6 # $FreeBSD: releng/11.0/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $
7 #
8 # This file is read when going to multi-user and its contents piped thru
9 # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
10 #
11
12 # Uncomment this to prevent users from seeing information about processes that
13 # are being run under another UID.
14 #security.bsd.see_other_uids=0
15 #compat.linux.osrelease=2.6.32
https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 6/7
7/2/2021 FreeBSD 11 notebook installation cheat-sheet · GitHub

16 kern.ipc.shm_allow_removed=1
17 hw.acpi.lid_switch_state=s3

https://gist.github.com/priyadarshan/7e1a69f019150a0c9dbc3b881f584c18 7/7

You might also like