Kubuntu 17.04 - Razer Blade 14 2017 - Little guide

Discussion in 'The Linux Corner' started by GreatAttractor, Aug 18, 2017.

Thread Status:
Not open for further replies.
  1. GreatAttractor

    GreatAttractor New Member

    Hi installed Kubuntu 17.04 64bit on a Linux Blade 14 2017 FullHD, I believe that this guide will work also on the 2016 model.

    I got some annoying problems like :

    screen tearing with nvidia drivers
    error message
    bose qc35 headsed not working
    etc

    I report here how to fix these, I assumed that you already installed Linux from USB drive.


    1) After installation from usb drive update the distribution:

    sudo apt-get update
    sudo apt-get dist-upgrade

    this command probably update the kernel: so please reboot

    2) This is totally optional: update the Intel drivers. You can skip this if you plan to use mainly the nvidia driver.

    wget -nd https://download.01.org/gfx/ubuntu/...ol/intel-graphics-update-tool_2.0.5_amd64.deb
    wget https://download.01.org/gfx/RPM-GPG-GROUP-KEY-ilg
    sudo apt-key add RPM-GPG-GROUP-KEY-ilg
    sudo dpkg -i intel-graphics-update-tool_2.0.5_amd64.deb
    sudo apt-get -f install
    intel-linux-graphics-update-tool

    3) Install nvidia drivers:

    sudo add-apt-repository ppa:graphics-drivers/ppa && sudo apt update

    At this point you can use the 'Driver Manager' app and install the latest driver: 384.59 at the time of writing

    or install the drivers from the terminal as follow:

    sudo apt-get -y install nvidia-384 nvidia-prime nvidia-settings libcuda1-384

    reboot

    4) Now the nvidia driver are loaded but you will probably notice screen tearing when windows are moved, very annoying.

    Check the PRIME Synchronization for all the displays with the command:

    xrandr --verbose | grep PRIME
    PRIME Synchronization: 0
    PRIME Synchronization: 1
    PRIME Synchronization: 1
    PRIME Synchronization: 1

    THIS IS THE PROBLEM: in this case you will notice that the PRIME Synchronization is not enabled on the primary display (the zero), to fix it:

    sudo sed -i 's%options nvidia_384_drm modeset=.*%options nvidia_384_drm modeset=1%' /etc/modprobe.d/nvidia-graphics-drivers.conf
    sudo update-initramfs -u

    and reboot

    note: this command simply change the line:

    options nvidia_384_drm modeset=0
    in
    options nvidia_384_drm modeset=1

    in the file:

    file: /etc/modprobe.d/nvidia-graphics-drivers.conf,

    After reboot check the PRIME Synchronization again:

    xrandr --verbose | grep PRIME
    PRIME Synchronization: 1
    PRIME Synchronization: 1
    PRIME Synchronization: 1
    PRIME Synchronization: 1

    it must be 1 instead of zero.

    Also verify that X11 config file is correct:

    cat /etc/X11/xorg.conf

    Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
    EndSection

    Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
    EndSection

    Section "Screen"
    Identifier "intel"
    Device "intel"
    EndSection

    Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1@0:0:0"
    Option "ConstrainCursor" "off"
    EndSection

    Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
    EndSection


    5) I noticed some errors in the kernel message log (use the dmesg command):

    [ 593.690829] pcieport 0000:00:1c.0: AER: Corrected error received: id=00e0
    [ 593.690842] pcieport 0000:00:1c.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, id=00e0(Transmitter ID)
    [ 593.690849] pcieport 0000:00:1c.0: device [8086:a115] error status/mask=00001000/00002000
    [ 593.690852] pcieport 0000:00:1c.0: [12] Replay Timer Timeout

    to fix it:

    sudo sed -i 's%GRUB_CMDLINE_LINUX_DEFAULT=.*%GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=off"%' /etc/default/grub
    sudo update-grub2

    note: this command just add 'pcie_aspm=off' to the kernel parameters.

    reboot again to see them disappear.

    6) I suggest to configure the compositor as reported int he attached picture

    7) If you have a BOSE Bluetooth headphone you may need this fix (I have BOSE QC35 and BOSE Soundlink II)


    sudo sed -i 's%#ControllerMode.*%ControllerMode = bredr%' /etc/bluetooth/main.conf
    sudo service bluetooth restart

    also select the audio profile:

    A2DP Sink

    in your audio configuration (in KDE is in Audio Volume -> Configuration).

    7) This configuration does not use bumblebee so the nvidia is always active.

    If you plan to use the notebook on battery I suggest to switch to intel driver instead :

    NVIDIA Settings -> PRIME Profiles -> Intel


    see the attached picture

    Note: alternatively you can use bumblebee but I could not make it work, maybe someone did it?
     

    Attached Files:

    Sycobob likes this.
  2. GreatAttractor

    GreatAttractor New Member

    note: I switched to Intel drivers using the 'NVIDIA X Server Settings' then rebooted, but I noticed an annoying tearing effect alsow with the Intel drivers.

    Creating this file solve the problem:

    cat /usr/share/X11/xorg.conf.d/20-intel.conf

    Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "TearFree" "true"
    EndSection


    reboot or logout/login

    verify that the nvidia driver is not loaded:

    lsmod | grep nvidia
     
    Uhl0x likes this.
  3. Thanks for the guide, Ramiel, it's been quite helpful.

    I'm running into an issue with PRIME Synchronization. I've modified /etc/modprobe.d/nvidia-graphics-drivers.conf, yet when I reboot I'm still ending up with modeset disabled on the nvidia_drm module.

    I verified modeset was requested:
    > sudo modprobe -v nvidia_drm
    > insmod /lib/modules/4.12.8-041208-generic/updates/dkms/nvidia_384_drm.ko modeset=1


    Yet it looks like modeset still ends up being unset somehow:
    > sudo cat /etc/module/nvidia_drm/parameters/modeset
    > N


    Any idea how to narrow down the cause?

    EDIT: After finding a few posts in an Nvidia thread with the same issue, reinstalling the drivers did the trick. Not sure if there's something to that or it just forced me to be more careful, but it worked.
    https://devtalk.nvidia.com/default/...d-prime-synchronization/post/5128716/#5128716
     
    Last edited: Sep 4, 2017
Thread Status:
Not open for further replies.
Sign In with Razer ID >


Don't have a Razer ID yet?
Get Razer ID >