Manjaro #2: Drivers & System
Polishing your Archlinux system with up-to-date drivers, softwares and themes
See also:
- Manjaro #1: dual boot Windows10
- Manjaro #3: how to customize XFCE desktop
Following the Linux/Windows dual-boot installation, let’s finish the system setup and customization. We need to make sure all our hardware is detected and has the right drivers, then modify the look and feel of the distro.
Pacman
This command will rank your mirrors by speed and will filter the out of date mirrors. Useful to get rid of unreachable servers when syncing the database.
sudo pacman-mirrors -f 0 && sudo pacman -Syy
Nvidia drivers
Now the real challenge: optimizing the video drivers. My computer is an Asus Intel with Nvidia graphic card using the Optimus technology to automatically switch between the CPU and GPU when using softwares. The following guideline matches this specific setup.
Manjaro has installed by default the Nouveau (open source) drivers for my graphic card, leaving the GPU unusable. We need to delete them to install the Nvidia proprietary drivers, using the Manjaro hardware utility tool.
First, install some requirements:
sudo pacman -S xorg-xdpyinfo xorg-xrandr dmidecode hddtemp
Then, using mhwd
delete (-r
) Nouveau and install (-i
) Nvidia:
sudo mhwd -r pci video-hybrid-intel-nouveau-bumblebee
sudo mhwd -i pci video-hybrid-intel-nvidia-bumblebe
You can test both the CPU and GPU to confirm the installation. The first command for CPU, the second for the GPU, activated through the optirun
argument:
[rphl ~]$ glxgears -info
GL_RENDERER = Mesa DRI Intel(R) Haswell Mobile
GL_VERSION = 3.0 Mesa 17.3.2
GL_VENDOR = Intel Open Source Technology Center[rphl ~]$ optirun glxgears -info
GL_RENDERER = GeForce GTX 850M/PCIe/SSE2
GL_VERSION = 4.5.0 NVIDIA 384.111
GL_VENDOR = NVIDIA Corporation
Reboot.
Gnome-shell extensions
Keep it simple but functional, with some additional extensions:
- Alternatetab: better alt-tab
- Clock Override: customize the date format
- Dash to Dock: best dock extension around
- Drop Down Terminal: just like in Quake
- Night Light Slider: adjust the night light temperature
Bashrc
Edit your prompt line the way you like:
[rphl ~]$ gedit .bashrcPS1='\[\033[01;32m\][\u@\[\033[01;37m\]\A \W\[\033[01;32m\]]\$\[\033[00m\] '
Conky
Display updated system information on your desktop wallpaper
[rphl ~]$ sudo pacman -S conky
Tweak your .conkyrc file:
[rphl ~]$ gedit .conkyrc# — Settings:
background yes
use_xft yes
xftfont Liberation Sans:size=12
xftalpha 1
update_interval 60.0# — Window Layout & Options:
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
use_spacer right
use_xft yes
alignment bottom_right
gap_x 20
gap_y 100# — Integrate with GNOME Shell:
own_window_argb_visual yes
own_window_argb_value 255# — Colours & Sizes:
maximum_width 250
default_color 4a4a4a #text
color1 666666 #item
color2 cccccc #no use
color3 666666 #bars
color4 404040 #titles# — Text:
draw_outline no
draw_borders no
font Monospace:size=10:weight=bold
uppercase no
draw_shades noTEXT
${color4}SYSTEM ${hr 2}
${color1}Manjaro${color} ${execi 86400 awk -F'=' '/DISTRIB_RELEASE=/ {printf $2" "}' /etc/lsb-release} ${alignr}${color1}Gnome${color} 3.26.2
${color1}Model${color} ASUS G551JK ${alignr}${color1}Dual Core ${color}i5
${color1}Graphics ${color}${alignr}Nvidia GeForce GTX 850M${color1}HDD $color${fs_used /} $color3${fs_bar 10 /}
${color1}CPU $color$cpu% $color3${cpubar 10}
${color1}RAM $color$mem / $memmax $color3${membar 10}# unquote to use
#${color4}CPU TOP PROCESSES ${hr 2}
#$color1${top name 1} $color$alignr${top cpu 1}%
#$color1${top name 2} $color$alignr${top cpu 2}%
#$color1${top name 3} $color$alignr${top cpu 3}%${color4}COMMANDS ${hr 2}
${color1}inxi -b ${alignr}${color} System details
${color1}pacman -S name ${alignr}${color} Install
${color1}pacman -Ss name ${alignr}${color} Search
${color1}pacman -Syu ${alignr}${color} Sync & Update
${color}alias ${color1}nmap ${alignr}${color}Scan Network
${color}alias ${color1}pi ${alignr}${color}Raspberry connect
${color}user ${color1}path ${alignr}${color}/home/rphl/Scripts
And a script to launch Conky at startup:
#!/bin/bash
#wait 10 seconds then start conky
(sleep 10 && conky) &
SSH to your Raspberry
See my previous post to learn how to headlessly connect to a RaspberryPi. You’ll need two additonal packages to connect to your Raspberry:
[rphl ~]$ sudo pacman -S openssh nmap
Check the IP address of your device by performing host discovery with nmap
:
[rphl ~]$ sudo nmap -sn 192.168.2.1/24
Once found, connect through terminal using ssh
:
[rphl ~]$ ssh pi@192.168.1.x
Your file manager also support SSH connection to transfer files to the Raspberry. Use ssh://
to specify your path:
Create scripts and put them in your PATH
- Create a new bash file
- Create your script
- Make it executable with:
chmod 755 filename
- Save it to a folder dedicated to your scripts
- Export this folder in your PATH, so your scripts can be executed in your terminal without specifying their directory or nature.
For the current session only:
export PATH=$PATH:/home/user/folder
Permanently, by adding the export line to your .bashrc:
echo 'export PATH=$PATH:/home/user/folder' >> /home/user/.bashrc
Just type the script filename in your terminal, from any location, to launch the script
Write on your NTSF partition
If you dual-booted Windows, you certainly have a NTFS partition with personnal data on it. Reading it is no problem, just mount it. But you’ll need a few tweaks to write on it.
First thing : proceed to a full Windows shutdown. To do so on Windows 10, deactivate hybernation and fast start by using the admin command:
powercfg -h off
And shutdown your system using the command:
shutdown /s /f /t 0
Then in Linux, proceed as follow:
- Install the package
ntfs-3g
- Create the partition mount point:
mkdir mnt/winodws
- Mount your NTFS partition with ntfs-3g command:
sudo ntfs-3g /dev/sda5 /mnt/windows
You can now write on the NTFS partition.