1 ## Dell XPS 9360 (and similar) Configuration
3 DragonFlyBSD will run on the newer Dell XPS's such as the 9360, with a little work. There are two major issues with this laptop. The first is that the BIOS ACPI appears to implode when the USB driver is loaded via the normal boot sequence. The second is that we do not yet support the Atheros 10k Wifi built into the laptop. There are two solutions to these problems. A third problem appears to be that the I2C chipset fails to probe, but it doesn't look like anything needs it.
5 ### General bootstrapping and initial configuration files
9 Set the SSD controlled to AHCI.
11 You may have to mess with the function key mode to make the F1...F12 keys all work as expected.
13 Disable secure boot. Recommend EFI boot. No need to enable legacy booting. Make sure you can boot from USB for the initial bootstrap.
15 Bootstrap DragonFlyBSD via a usb boot. Just install normally. Note that on the Dell XPS series, Dell apparently only supports M.2 SSDs (AHCI), and does not support NVMe SSDs. We support NVMe, but Dell apparently does not.
17 (1) Your /boot/loader.conf should disable xhci loading and should NOT load the ig4 driver. You can preload the sound drivers, and you will also need to set a kenv variable to enable the urtwn driver's firmware loading. You can also turn on panel self refresh mode for i915, which will slightly reduce dram and cpu power consumption:
19 #ig4_load="YES" (commented out)
23 legal.realtek.license_ack=1
26 (2) You will have to buy a USB wifi module. I use a Realtek RTL8188CUS based USB dongle. For example, the Plugable USB 2.0 Wireless Nano. Make sure it uses the correct chipset.
28 I suggest the RTL8188CUS based wifi usb dongle (appears to work well on the 2.4 GHz band, but doesn't seem to see 5.0 GHz).
30 Plug the dongle into the left port for maximum bandwidth
32 (3) You will want to run a few things in /etc/rc.local:
38 echo "starting network"
41 (4) Your /etc/rc.conf should nominally contain your network setup:
44 ifconfig_wlan0="DHCP WPA"
52 (5) Create an /etc/wpa_supplicant.conf file for your wifi connection.
61 X should just run and see the touchpad and mouse. No touchscreen support at the moment. You will need to set up appropriate accounts and files. The following packages are useful:
65 pkg install xorg-fonts
66 pkg install xorg-libraries
67 pkg install xorg-macros
68 pkg install xorg-drivers
69 pkg install xorg-server
74 (also install your favorite apps, GUIs, window managers, whatever)
76 We suggest [starting X via xdm](http://www.dragonflybsd.org/docs/newhandbook/X/#index4h3) which needs a package in addition to xorg:
80 ### Further Mouse Setup
82 We recommend using moused and /dev/sysmouse to handle external USB mouse attachments. By using moused, mice can be plugged and unplugged without imploding X11. I usually throw in two additional moused commands in /etc/rc.local:
88 ### Volume and backlight adjustment keys
89 In order to use these keys make two scripts:
95 set curvol = "`mixer -f /dev/mixer1 -s vol`"
97 if ( -f ~/.savemute ) then
98 set lastvol = "`cat ~/.savemute`"
103 if ( "$curvol" == "vol 0:0" ) then
104 if ( "$lastvol" != "" ) then
105 eval mixer -f /dev/mixer1 $lastvol
108 if ( "$lastvol" != "$curvol" ) then
109 echo "$curvol" > ~/.savemute
111 mixer -f /dev/mixer1 vol 0
116 # backlight script "backlight"
118 set level = `sysctl -n hw.backlight_level`
119 @ level = $level + $argv
120 sysctl hw.backlight_level=${level}
122 add next lines to `~/.xbindkeysrc`:
126 "/path/to/scripts/mute"
129 "mixer -f /dev/mixer1 vol -5"
132 "mixer -f /dev/mixer1 vol +5"
137 "/path/to/scripts/backlight -100"
140 "/path/to/scripts/backlight 100"
143 You must call xbindkeys somewhere in your `.xinitrc`.
145 *Hint:* You can set default blacklight level by placing next line in `.xinitrc`:
147 sysctl hw.backlight_level=7500
149 ### Home, End, Delete, ...
151 With Alt as modifier you can get:
155 Delete = Alt + BackSpace
163 PageDown = Alt + Down
165 Create dirs for keyboard configuration
167 mkdir -p ${HOME}/.config/xkb/types ${HOME}/.config/xkb/symbols
169 Create modifiers' config file `${HOME}/.config/xkb/types/dell` which contains
172 virtual_modifiers Alt;
174 modifiers = Shift+Alt;
177 map[Alt+Shift] = Level3;
178 level_name[Level1] = "Base";
179 level_name[Level2] = "Caps";
180 level_name[Level3] = "Alt";
184 Create symbols' config file `${HOME}/.config/xkb/symbols/dell` which contains
190 symbol[Group1] = [backslash, bar, Insert],
191 symbol[Group2] = [backslash, slash, Insert],
195 RedirectKey(key=<INS>, clearmods=Alt)
200 RedirectKey(key=<INS>, clearmods=Alt)
206 [BackSpace, BackSpace, Delete],
210 RedirectKey(key=<DELE>, clearmods=Alt)
219 RedirectKey(key=<HOME>, clearmods=Alt)
229 RedirectKey(key=<END>, clearmods=Alt)
239 RedirectKey(key=<PGUP>, clearmods=Alt)
248 RedirectKey(key=<PGDN>, clearmods=Alt)
253 Add next line to `.xinitrc` (or in some autoload/autostart)
255 setxkbmap -layout "us+dell" -types "complete+dell" -print|xkbcomp -I"$HOME/.config/xkb" - "${DISPLAY%%.*}"
259 This sysctl setting tells the Dell to automatically go to the best power state it can:
261 sysctl machdep.mwait.CX.idle=AUTODEEP
263 You can try these settings as well, put the one you want in your /etc/sysctl.conf so you don't have to run the sysctl on boot:
265 # in /etc/sysctl.conf
267 # enable one. If you have lockup problems with AUTODEEP or C4/3, use C3/1.
268 # This adds a little wakeup latency but significant reduces cpu power consumption.
269 # YMMV. Use C1/0 for max responsiveness and you don't care about power consumption.
271 machdep.mwait.CX.idle=AUTODEEP
272 #machdep.mwait.CX.idle=C4/3
273 #machdep.mwait.CX.idle=C3/1
276 WARNING! We have recently come to believe that this mode may cause lockups on disk I/O (AHCI), so if you get lockups please try without setting this mode.