Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ubuntu 16.04 Dell G3 series setup

Notes on the setup

Update 2020/05/19: I'm using PopOS 20.04. Works great!!

NOTE: At the moment Dell G3 series doesn't officially support Ubuntu 18.04.

This post on Reddit:

Update - 04/04/2019

I've installed Ubuntu 18.04 and it works like magic! I'm even using the latest(418) open-source Nvidia drivers (ppa:graphics-drivers/ppa).



It does ship with Chrome and Chromium, but not firefox, so:

sudo apt-get install firefox 

Tunning and Tweaks!

Themes, icons, visual and UI behavior customizing.

sudo apt-get install gnome-tweak-tool compizconfig-settings-manager unity-tweak-tool


  • gparted: manage your disks
  • gimp and inkscape: image and vector editing
  • httpie: like curl, but cooler
  • htop: improved top command
sudo apt-get install gparted gimp inkscape httpie htop


  • Etcher - Flash OS images to SD cards & USB drives, safely and easily.
  • Filezilla FTP client - sudo apt-get install filezilla
  • Available from "Ubuntu Software" (snaps):
    • Skype
    • Firefox
    • Slack
    • Spotify
    • Vscode
    • Libre Office
    • Gparted
    • Inkscape
    • Postman
    • ...and many others


Shell (Fish Shell)

sudo apt-add-repository ppa:fish-shell/release-3
sudo apt-get update
sudo apt-get install fish

Need to logout:

sudo usermod -s /usr/bin/fish $USER

Package manager for Fish Shell

curl --create-dirs -sLo ~/.config/fish/functions/

Notify when a long-running process finishes

fisher add franciscolourenco/done

Custom prompt

fisher add rafaelrinaldi/pure

Terminal Theme

Color Scheme for Gnome Terminal and Pantheon Terminal:


Install Docker: Install Docker Compose:

Docker Compose

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

Fish Shell completions for Docker Compose:

fisher add brgmnn/fish-docker-compose


Install ctop. Like htop, but for containers:

sudo wget -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop

For latest go to:


Even though I use Docker a lot, I like to have some control over Python installations in my host machine, so pyenv enters here.


sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
curl | bash

As a final step, you have to configure your .bashrc,, or any other related shell configuration files.

My ~/.config/fish/

set -x PYENV_ROOT $HOME/.pyenv
status --is-interactive; and . (pyenv init -|psub)
status --is-interactive; and . (pyenv virtualenv-init -|psub)





sudo apt-get install git

Signed commits

Like HTTPS should be default for the web, signed commits should be default too. You'll find material on signed commits on the web. At the end your .gitconfig should look something like this:

    name = Douglas Miranda
    email =
    signingkey = 45B8D7807808D37C

    gpgsign = true

Infrastructure Provisioning and Configuration Management


Install Gitlab Runner locally

By installing Gitlab Runner locally you will be able to use most of the features available in Gitlab CI/CD in your local machine.

curl -L | sudo bash

sudo apt-get install gitlab-runner

My notes on Gitlab CI/CD.

Fixing Stuff

Monitor using Nvidia is flickering all over the place

It may be flickering when you drag windows or typing in an input.

It looks like a lot of things can be the cause, as you can find online, but you may be lucky and it can be something easy to fix,

Scenario: you've tried some different resolutions for your display, and in some choices the frame rate goes from 30 to 60, and when you decided to go back to a resolution that runs on 60 your monitors.xml is still in 30, so you may want to check this out.

Open ~/.config/monitors.xml, and look for your monitor in this xml file, what you want is the <rate> tag.


<monitors version="1">
    <output name="HDMI-0">
      <!-- SO CHANGE THIS FROM 30 TO 60 -->

Color issues in Google Chrome

If you have some issues with color correction in Google Chrome, for example, the color blue shows as purple(ish):

Go to chrome://flags and try new values at "Force color profile", for me "sRGB" did the trick.

Color issues in Vscode

I'm no longer experiencing those issues. Current setup: Vscode 1.36 | Ubuntu 18.04.2 | GeForce GTX 1050 Ti (nvidia-driver-430 open source)

Just like in Chrome (previous topic) Vscode could face problems with color profiles.

You could simply start Vscode from terminal with --disable-gpu flag. (code --disable-gpu)

But, better than disable all gpu support, just tweak that setting, starting code with --force-color-profile=srgb. (code --force-color-profile=srgb)

OR, even better, edit your shortcut to start with that flag.

Find where Vscode laucher is:

locate code.desktop

(you may need to update your index: sudo updatedb)

I found mine at: /usr/share/applications/code.desktop

Let's say your code.desktop looks like:

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F


[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F

Edit the Exec value, in order to look something like:

[Desktop Entry]

Exec=/usr/share/code/code --force-color-profile=srgb --unity-launch %F


[Desktop Action new-empty-window]

Exec=/usr/share/code/code --force-color-profile=srgb --new-window %F

If you installed with snap, you'll probably find at: /var/lib/snapd/desktop/applications/vscode_vscode.desktop


You can try to open /var/lib/snapd/desktop/applications/ as root. (sudo nautilus /var/lib/snapd/desktop/applications/)

Then you'll findo something like code_code.desktop, and then you just go right click of the mouse > Properties and add the flag --force-color-profile=srgb to the Command field.

NOTE: this "fix" will work for spotify and probably every other Electron based apps.

Audio issues with HDMI to my display

If you connect to a display with HDMI for the first time, and in the audio output you don't see the option to redirect to the display, it could be a lot of things as you can see searching on the web, but for me it was just a matter of rebooting.

Fix without reboot

I was able to "fix" without rebooting because it happened again when unplugging the cable and plugging again.

  1. Remove cable.
  2. Kill pulseaudio:
 pulseaudio -k
  1. Plug again.

Nvidia doesn't appear to be working

  • Maybe you just need to apt-get update and apt-get upgrade. (you may want to reboot)
  • Go to the laucher and search for "Additional Drivers", you'll see if Ubuntu installed the Drivers. (you may want to reboot)
  • Go to the laucher and search for "NVIDIA X Server Settings", check if it is enabled.

Reduce screen tearing

It looks like the screen tearing issue when using NVIDIA could have many solutions.

First I tried to set the nvidia-drm.modeset=1. So search for "nvidia drm modeset linux" and you will find how to do it.

But the thing that actually worked for me it was open the "NVIDIA XServer Settings" > XServer Display Configuration > (select the display) > Advanced and check Force Composition Pipeline and Force Full Composition Pipeline.

Remember to make those settings permanent, and sometimes "Save to X Configuration File" won't be successfull.

So, under your monitor configuration in xorg.conf you must have something like:

Section "Screen"
    Option "metamodes" "1920x1080 +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

Some extra info about the setup at the time of those issues:

  • Bios version: 1.5.1 | Release Date: 11/01/2018
  • Display: Dell p2715q
  • Adaptor: HDMI cable

Update (2019/03/31)


Dell G3 > (adapter USB 3.1 Type-A to USB-C) > Dell Universal Dock D6000 > (display port to mini display port) > Dell p2715q

I'm running now on 2560x1440 - 60hz.

No new issue, only some blocks not being updated on mouse over, not sure about how to call that effect, but I fixed by doing the same thing I do to fix tearing.

I tried with HDMI too, it works fine.


Play/Pause/Next/Previous buttons and Spotify

Basically add these as custom shortcuts:


dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause


dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next


dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

Error when trying to commit, git wasn't able to find GPG

You may encounter errors like:

error: cannot run /usr/local/bin/gpg: No such file or directory
error: could not run gpg

Even though you do have gpg installed, so just tell git where gpg is:

bash -c "git config --global gpg.program $(which gpg)"

Plugged my Dell Universal Dock D6000 and nothing happens

Well, you must first install the appropriate drivers, so:

When switching from one resolution to another, you may find some issues with some blocks that doesn't fade or something weird like that, try this. (At least for me that fixed.)



Check if nvidia is being used

sudo prime-select query

Check BIOS version/info

sudo dmidecode | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.