Skip to content

Instantly share code, notes, and snippets.

Embed
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: https://www.reddit.com/r/Ubuntu/comments/b74vvb/ubuntu_1604_on_dell_g3/

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).

Basics

Firefox

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

Utilities

  • 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

More:

  • 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

Dev

Shell (Fish Shell)

https://fishshell.com/

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 https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish

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: http://mayccoll.github.io/Gogh/

Docker

Install Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/ Install Docker Compose: https://docs.docker.com/compose/install/

Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

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

Fish Shell completions for Docker Compose: https://github.com/brgmnn/fish-docker-compose

fisher add brgmnn/fish-docker-compose

CTOP

Install ctop. Like htop, but for containers:

sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.2/ctop-0.7.2-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop

For latest go to: https://github.com/bcicen/ctop

Python

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

Prerequisites

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 https://pyenv.run | bash

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

My ~/.config/fish/config.fish:

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

Editors

Keybase

Related:

Git

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:

[user]
    name = Douglas Miranda
    email = douglasmirandasilva@gmail.com
    signingkey = 45B8D7807808D37C

[commit]
    gpgsign = true

Infrastructure Provisioning and Configuration Management

CI/CD

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 https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | 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.

Example:

<monitors version="1">
  <configuration>
    <output name="HDMI-0">
      <vendor>DEL</vendor>
      ...
      <width>1920</width>
      <height>1080</height>
      ...
      <!-- THAT'S WHAT YOU'RE LOOKING FOR -->
      <!-- SO CHANGE THIS FROM 30 TO 60 -->
      <rate>30</rate>
      ...
    </output>

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
Icon=code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;

X-Desktop-File-Install-Version=0.22

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

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

Alternative

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}"
    ...
EndSection

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)

Now:

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.

Related:

Play/Pause/Next/Previous buttons and Spotify

Basically add these as custom shortcuts:

Play/Pause

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

Next

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

Previous

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.)

Related:

Tips

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.