• Dell XPS 15 9550 Fedora Guide

    I wanted to put together a little walk through to get the new Dell XPS 15 9550 laptop working well in Linux. I’ve been very happy with it so far, but I had to put in a few nights of research to really get it working as I want.

    All instructions are for Fedora 23


    You can get this to work with UEFI, but I ended up going Legacy boot since I was having problems getting standby and hibernate to work when booting through EFI. Also, make sure you set up a swap partion at least the size of your memory so hibernation will work.

    ##Bumblebee/Nvidia Optimus

    The XPS 15 comes with both an Intel and Nvidia graphics controllers. The Intel GPU does the desktop stuff fine, but if you want to do any gaming you’ll want to switch over to the Nvidia. This isn’t hard to do, but it seems to render everything to a virtual frame buffer and probably isn’t as perforamnt as just using the nvidia card. It’s easy to setup though:

    *Bumblebee Indicator Gnome Extension *Bumblebee Installation Guide for Fedora

    Basically, install as follows..

    After running all updates and restarting to ensure you’re running the latest kernel available to your system: $ dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora23/noarch/bumblebee-release-1.2-1.noarch.rpm $ dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora23/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm $ dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel reboot When you want to use the Nvidia GPU, you need to pass the command through optirun, like follows:

    $ optirun glxspheres64

    If you’re trying to run a game through Steam, be sure to update the launch command as follows:

    optirun $COMMAND (or whatever)

    ##Bluetooth Bluetooth did not work out the box for me, but it would scan and discover devices. Ultimately, I had to go through a whole deal to get it working, mostly following this guide

    My struggle is your gain, if you have a Broadcom BCM2045 A0 you should be able to use something like the following to get this working:

    $ curl https://www.dropbox.com/s/3ajj26zj3n79pcc/BCM-0a5c-6410.hcd?dl=1 /lib/firmware/brcm/BCM-0a5c-6410.hcd

    You should test this by turning off your PC and turning it back on, as opposed to just restarting. You can determine where exactly to copy the firmware by using dmesg | grep btusb.

    ##Touch/Gestures This is a biggie for me, and a pain to setup. Luckily, the synaptics touchpad provided with the laptop supports all sorts of gestures in Linux but you’ll have to make some tweaks to get them to work. I used touchegg and touchegg-gce to configure three and four button gestures, and synclient to enable two-finger right click.

    Removing xorg-x11-drv-libinput is needed to favor the synaptics module. $ sudo dnf remove xorg-x11-drv-libinput $ dnf install xorg-x11-drv-synaptics

    Let’s configure the synaptics driver so we can take advantage of touchegg. Find the section with MatchDriver “synaptics” and add the options in mine:

    /usr/share/X11/xorg.conf.d/50-synaptics.conf Section "InputClass" Identifier "Default clickpad buttons" MatchDriver "synaptics" Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%" Option "TapButton3" "0" Option "ClickFinger3" "0" EndSection Let’s configure touchegg with some sane options…

    ~/.config/touchegg/touchegg.conf ```

    0 Alt+Left Alt+Right Control+Alt+Up Super+w Control+w Control+Alt+Down
    And finally, let's configure touchegg to start automatically at login:

    #!/bin/sh -x touchegg& ``` This will give you three finger left and right as browser back and forth, three finger up and down to switch spaces, four finger up to enter the activities menu, and four finger down to close a browser tab. This isn’t quite the Magic Trackpad, but it’s close.

    ##Standby and Power Management

    As mentioned before, make sure you have a swap partition big enough to store the contents of your RAM. You’ll also need to tell the login manager, GDM, what to do when you close the lid:

    Edit /etc/systemd/logind.conf and uncomment the line…


    You can also set this to hibernate and hybrid-sleep, but hibernation doesn’t really seem to work well.

    Optionally, you can install the tlp package that supposedly provides better power management and automatic backlight control. To install…

    $ dnf install tlp tlp-rdw

    I’ll update this guide as I add more. Good luck, let me know how it goes!

  • Linux on Dell XPS 15

    I’m blassed with a job that’s actively looking to step up their hardware game. So after a few nights of googling, I went to our IT guy and I was able to pursuade him to order the new Dell XPS 15 Non-touch 9550 P56F. My model has a Intel Core i7-6700HQ with 16GB of DDR4 RAM and a 512gb SSD on a PCI-e bus. Sickeningly awesome system. It hangs with my MBP but I still miss the trackpad. The MBP feels better and is less plastically, but the internals are better on the Dell side, and while it’s a little thicker than the MBP, it’s hardly noticable and Dell hides it pretty well.

    It’s a good Linux laptop. Running Fedora 23 (I’ll cover Ubuntu in a new post when work forces my hand to install it), it pretty much works entirely out of the box. Battery life seems roughly comparable to my MBP, but we’ll see how that pans out as I use it.

    My thoughts so far:

    • Wireless: The Broadcom Wireless AC works well out of the gate. it connects to my 5GHz network, reconnects after standby, and seems speedy and reliable.
    • Bluetooth: Scans, seemingly works
    • Battery: Gnome reports 4-6 hours at 100% depending… so far so good
    • UEFI: Was able to perform the UEFI install and everything worked, did not try Secure Boot. Was having issues with hibernation in UEFI, might be user error. Regardless currently running in Legacy Mode.
    • Suspend: Standby works reliably, wifi reconnects. Hibernation is a little flakier, tried configuring for hybrid-sleep, but couldn’t’t get it to suspend but it would save RAM to disk and resume from hibernation
    • Touchpad: Multitouch works! It’s very poorly configured, and I haven’t had much luck taming it, but with touchegg I’m able to do two finger right click, four finger swipe to show the activities menu… but I haven’t had a lot of luck improving on that, must be a software thing because the touchpad seems well supported by the OS.

    i still need to test a few things, and would like to get a better measure on the battery life. I’m interested to get the Dell Thunderbolt 3 Dock and see how that goes. Like the Surface Dock, it gives you one cable that charges the laptop and provides dual-head monitors, USB, Ethernet and everything.

  • HDMI CEC > Xbox One

    I recently bought a TV with HDMI-CEC support, which could be one of the coolest features introduced to displays in a long long time. It’s kinda like IR over HDMI. It allows the TV to auto-switch sources, turn on and off, all depending on what you’re doing with the devices connected to it. The Chromecast turns on the display and switches input when you try and stream to it. My Steam Link will switch TV inputs and take control when I press the Steam button on the controller. This will replace the TV remote control by factoring it out entirely.

    It turns out the PS4 also supports CEC, as does it’s predecessor the PS3. So imagine my surprise when I discover the Xbox One, Microsoft’s pinnacle of Home Entertainment, doesn’t have this support baked in. Oh, the port in the back is compatible and the bundled cabling also supports it. The system reportedly even has some low-level awareness, probably even have the software update sitting on a server somewhere that enables it. Inexplicably, however, this feature is nowhere to be found. Instead, we have the Kinnect, a device that was once a next-generation human interface device that allowed you to use your xbox minority report style for when your controller is just out of reach. That is, until Microsoft released their NXE refresh a few months back and completely disabled the feature.

    So, now the Kinnect’s primary usefulness is to log you in through the camera, voice commands like ‘Xbox Stop Listening’, and as an IR blaster to control your TV. Some people think that Microsoft is sitting on the CEC updates so they don’t undercut Kinnect more so, but as a Kinnect owner I’d really prefer they just implement all the functionality they can. The PS3 supports this stuff, after all.

    That’s not the only Xbox One feature that goes unused in my living room, the HDMI in port, something I thought was a huge differentiator when I decided to buy a next-gen console, was a lot cooler last year when I still had cable. For a moment, I wanted to hook my Chromecast into it, but alas with CEC it’s better to have it plugged into the TV.

    All that to say that one little HDMI protocol tweak kinda devastates the Xbox One’s whole value proposition. Also considering the TV I bought supports Miracast, a feature Microsoft has kept in Preview for over a year, I’ve really started to question my decision to buy one of their stupid consoles. At least the PS4 doesn’t support 4K either, or else I would have already rage sold my One.

  • Looking For A Good Linux Laptop

    For years, I’ve ran some flavor of Linux on all my hardware. Lately, however, I awoke to discover that I’ve inadvertently factored out all my Linux boxes. It was innocuous enough. I’ve lent out my Linux desktop to a friend in need, and have mostly replaced it with a Microsoft Surface running Windows 10 and my newly acquired work laptop. My desktop at work was a bit of an anchor to a desk I no longer wanted, and so I traded in my two monitor Fedora box for a shiny new Macbook Pro. I might have gotten a Linux laptop, if the only thing on offer wasn’t an offensive MSI gaming laptop with rainbow backlit keys. Ick. I’m a web developer, so the Pro has mostly been a good experience for me. I experimented with Magento and PHP7 after about six minutes worth of work, I have most of the toolset I’m used to on Linux, and the battery life is truly outstanding compared to comparable Linux-running laptops I’ve seen.

    There’s some drawbacks, however. While the much lauded industrial design and finish of the hardware has yet to be matched, and the battery life genuinely lasts for a full day of meetings and straining my MySQL instance, it’s just not Linux. OS X (or should I call it macOS), is Linux’s lame sister with the bright clothes.

    If you tend to run other people’s bash scripts on your system, be prepared to rewrite some. If you’d prefer to run Gnome Shell or run a GTK application with odd dependancies, prepare to be let down. There’s nothing quite like KDEConnect, just the i devices I’d prefer not to use. Just google ‘Fedora 23 2015 Macbook Pro’ and watch your heart sink.

    I’ll probably start scrap-booking some of my favorite picks on this blog, but I’ve been pretty disappointed in my search so far. Everyone always says System76 is the pinnacle, but their laptop is thick and cheap looking in person with a weak battery. Dell has a nice Developer Edition, but it’s 13 inches and the hardware is in need of a refresh. If you go through the Canonical and RHEL hardware compatibility lists, you’re left with a bad taste in your mouth.

  • Meld on OS X

    Finding a good (free) diff tool is hard for OS X. Here, we’ll setup Meld (a popular diff tool on linux) to run with OS X and git.

    First, install a decent Mac build of Meld, there’s a few options but here’s one I really like:


    Once this is installed, you need to make bash script so Meld is command-line executable and can be invoke through git. Name this file ‘meld’ and place it in a sourced directory that you can run commands from globally. I like to set up a ~/bin directory where I can put scripts like this and magerun so I can run them from anywhere, but you may have a better place for it on your system. You can source a directory by adding the following to the bottom of your ~/.zshrc or ~/.bash_profile:

    export PATH="/Users/User/bin:$PATH"

    Create a ‘meld’ file in this directory and use the following contents:

    $ cat ~/bin/meld

      import sys
      import os
      import subprocess
      if len(sys.argv) > 1:
        left = os.path.abspath(sys.argv[1]);
        left = ""
      if len(sys.argv) > 2:
        right = os.path.abspath(sys.argv[2]);
        right = ""
      if len(sys.argv) > 3:
        merged = os.path.abspath(sys.argv[3]);
        merged = ""
      MELDPATH = "/Applications/Meld.app"
      arguments = " -n " + MELDPATH + " --args " + left + " " + merged + " " + right
      p = subprocess.call(['open', '-W', '-a',  MELDPATH, '--args', left, merged, right])

    And finally, add the following to your ~/.gitconfig ~~~ [mergetool “meld”] cmd = meld "$LOCAL" "$REMOTE" "$MERGED" trustexitcode = true ~~~

    And give it a shot!

  • Chromcast Audio to PC Line-in as Multi-room Solution

    Ever since I’ve moved into a bigger apartment I’ve lusted over a multi-room speaker setup so we can play audio everywhere in the house. Google’s new Chromecast Audio gives me the makings of this, with the recent update it lets you place Chromecasts in a ‘group’ where they all play simutaniously. In my house, I made such a group and named it ‘Everwhere’. You can play Youtube or Spotify to ‘everywhere’ and in every room it starts playing (pretty much) in sync.

    I’m cheap though, and the only equipment I was willing to invest in is a couple of Chromecasts. Luckilly, I have computers in each room with decent speakers. So what I ended up doing was plugging the Chromecast Audio into my PC’s line-in and perform some software wizardtry to play the line-in feed through the speakers. This also gives you the ability to tune the system sound and chromecast sound. It’s all very trivial in Windows, as Microsoft’s supported this kind of thing since the dawn of time.

    To get this working, select ‘Listen to this Device’ in the Line Out properties:

    Thing to click in Windows 10 to enable Line Out passthrough

    Getting this to work in Linux (Fedora 23 w/ Gnome 3.18) was a little tricker, but not by much. In my config, there’s not a menu option like ‘Listen to this Device’, but running the following in the terminal enables a ‘loopback’ device that will play the line-out through your default speaker:

      $ pactl load-module module-loopback

    And boom, it starts working! You may need to tweak the sound settings so this sounds good, but you can control the volue through software and play the chromcast stream mixed with your system audio. It works pretty well, and really completes the solution as far as multi-room sound goes.

    But wait, you restarted your box and the settings didn’t persist, huh? Well, I have an autostart entry that solves this problem:

    In ~/.config/autostart/lineout.desktop

    [Desktop Entry]
      Name=lineout mods
      Exec=pactl load-module module-loopback
      Comment=pushes line-in to the default out for Chromecast Audio support

    The constraint here is that it only starts when logged in. There’s probably a better way to invoke this. If I figure it out, i’ll be sure to update!

    I was also running into some crackling and distortions. To rememdy, I plugged the Chromecast Audio directly into the wall with the supplied USB wall outlet. Apperantly powering from my PC’s USB port is no good and was adding a ton of distortions.

  • Logitech MX Master and Linux

    Logitech’s MX Master is perhaps one of the best mice available at the moment. Supporting both Bluetooth and the Unifying Receiver, loads of buttons, a vertical scroll wheel and micro-usb rechargable battery, it’s hard to go wrong with this thing. Unfortunately, the default key mappings on my linux desktop (Gnome 3) are terrible. The thumb button doesn’t do anything, and the vertical scroll does god knows what.

    Keyboard Setting to Change to get Expose Thumb

    The vertical scroll button is a little harder to configure. Personally, I want the vertical scroll to do page zooming.

    In Fedora 23, I had to install the following packages:

      $ sudo dnf install xautomation xbindkeys

    xbindkeys is a daemon that lets you remap keybindings. xautomation contains xte, which is a little app that let’s you emulate keystrokes. Using the two, we can remap the mouse buttons to simulate

    and give xbindkeys the following config:

    somewhere inside ~/.xbindkeysrc

       "xte 'keydown Control_L' 'keydown Shift_L' 'key plus' 'keyup Shift_L' 'keyup Control_L'"
      "xte 'keydown Control_L' 'key minus' 'keyup Control_L'"

    I’m emulating ctrl+shift+plus for Zoom out in order to respect the default Zoom Out bindings for nautilus. All the browsers I use also support the binding so it so it’s works out well. Zoom-in doesn’t need it for some reason.

    You can try this configuration by running xbindkeys in a terminal. It should daemonize, but will not run on restart. Fedora doesn’t have this working with systemd out of the box, so I had to improvise to get this working on login. I made a desktop file in ~/.config/autostart


      [Desktop Entry]
        Comment=Autostart xbindkeys for custom mouse/keybindings

    I really like this setup. I’ve also gotten into the habit of pairing the mouse via bluetooth to my desktop computer for a slightly smoother mousing experience compared to the sometimes laggy Unifiying Receiver. Now if only they’d bake in bluetooth with their K800!

subscribe via RSS