Linux on Series 7 2013 / Ativ Book 8

Discussion in 'Samsung' started by Lekkerkerker, Jun 30, 2013.

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

    Lekkerkerker Newbie

    Reputations:
    14
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    Hi guys,

    long time lurker, first time poster. I recently bought a 770z5e. I use Windows only for games and Linux for productivity. There are some quirks of installing Linux and some things that need to be fixed afterwards. This will be a regularly updated post to monitor the progress and to share my findings with others. Currently I use Ubuntu 13.04. If you tried other distributions on this laptop, please share your findings here as well!

    Installing

    Please keep in mind that:
    1. Things might work out differently for your machine.
    2. I might have made mistakes while documenting.

    Thus, always apply common sense when following recipes. Following these steps might damage your laptop or kill your kitten.

    I installed an SSD and tried to clone/resize the factory image. The cloning failed several times with no specific error message, so I decided to start from scratch. Most difficult thing here? Getting a Windows 8 ISO.

    • Get a Windows ISO
    Follow this manual: Superuser: Where can I download a legitimate Windows 8 ISO?

    • Switch of Secure Boot
    Go into the BIOS (F2) and go to the Boot tab. Set the boot device priority to the external drive and set:

    Secure Boot [Disabled]
    OS Mode Selection [CSM and UEFI OS]

    • Install Windows normally
    I used a DVD and an external drive to install Windows. You should not run into trouble here. I already assigned a partition D: for the future use of Linux, so you don't need to shrink any partitions in the future. Write down the exact size of the D: partition.

    • Install Linux
    When asked how to install it, choose Something else for manual install. Search for the former D: partition, you recognize it by the size you wrote down. Delete it and make a couple of new partitions:
    - Swap: If you want to use Hibernate at some point, assign a swap partition bigger than your RAM. I have 8gigs of RAM and assigned 10gigs of Swap
    - Reserved boot area: 200Mb. I cannot remember the exact name of this, but when trying to install without, Ubuntu will complain.
    - Maybe EFI. Useful read: UEFI - Community Ubuntu Documentation I read just now that it recommends to use Windows EFI partition to boot. I made a "mistake" there and created a seperate one. Works fine though.
    - Root: All the rest for the root filesystem, I chose to format it in ext4.

    Fixing stuff

    Now it will boot into Ubuntu, but not into Windows.

    • Fix grub
    Taken from askubuntu: Grub does not show a Windows 8 option after dual boot.
    Make a file /etc/grub.d/30_windows and fill it with:

    Code:
    #! /bin/bash
    cat << EOF
    menuentry "Windows 8" {
        insmod part_gpt
        insmod chain
        set root='(hd0,gpt2)'
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    }
    EOF
    Make it executable:
    Code:
    sudo chmod a+x /etc/grub.d/30_windows
    To show the boot selection, edit some lines in /etc/default/grub from

    Code:
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_TIMEOUT=10
    to
    Code:
    #GRUB_HIDDEN_TIMEOUT=0
    GRUB_TIMEOUT=1
    Run sudo update-grub2 and reboot.

    &#8226; Fix Touchpad
    Out of the box the touchpad will be recognized as some kind of PS/2 mouse. Guestures and multi-finger stuff will not work. Help came from here: HOWTO: Series 9 Elantech Touchpad Ubuntu 12.10, Mint 14. You need to install dkms and download and compile a custom driver:

    Code:
    sudo apt-get install dkms
    cd /usr/src/
    sudo wget http://www.ouam.fr/~madko/ubuntu/elantech/psmouse-elantech-v7.tar.bz2
    sudo tar jxvf psmouse-elantech-v7.tar.bz2
    sudo dkms add -m psmouse -v elantech-v7
    sudo dkms build -m psmouse -v elantech-v7
    sudo dkms install -m psmouse -v elantech-v7
    reboot
    &#8226; Add mouse middle click
    The awesome touchpad of the 770z5e has a leftclick and a rightclick, but no middle mouse button. The usual workaround to click left and right simultaneously will not work. A nice solution can be found here: askubuntu: How to configure the touchpad middle click? We can then emulate a middle mouse click by a three-finger tab. A working middle mouse key is essential for Linux copy&pasting!

    You can place the script in another directory, e.g. /usr/bin or /etc, if you wanted it to be in a more "generic" place, in case you have multiple accounts in your ubuntu installation. I used ~/.bin, I used it also for all kinds of other scripts.

    Replace <your_user_name> by your actual user name.
    Code:
    mkdir ~/.bin
    echo synclient TapButton3=2 > ~/.bin/touchpad_settings.sh
    chmod +x ~/.bin/touchpad_settings.sh
    gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/<your_user_name>/.bin/touchpad_settings.sh"
    reboot
    &#8226; Two-finger scrolling
    Now we can also activate two-finger scrolling if wanted: Go to System Settings -> Mouse & Touchpad -> Two-finger scrolling

    &#8226; Fan control
    Install samsung-tools:
    Code:
    sudo add-apt-repository ppa:voria/ppa
    sudo apt-get install samsung-tools
    The program easy-slow-down-manager is not in the repository for 13.04 anymore, because of the UEFI-bricking problem Samsung laptops bricked by using UEFI. In the latest Kernels this should be resolved (YMMV!), so we can still install them by hand.

    Code:
    wget http://ppa.launchpad.net/voria/ppa/ubuntu/pool/main/e/easy-slow-down-manager/easy-slow-down-manager_0.15~ppa1~loms~quantal_all.deb
    sudo dpkg -i easy-slow-down-manager_0.15~ppa1~loms~quantal_all.deb
    reboot
    With Fn-F11 you can show the fan state and switch between normal, silent and speed.

    &#8226; Keyboard layout
    I am using a different keyboard layout. The laptop has a German keyboard and I switch back and forth between the NEO-layout and the standard German one for "guests". You can add additional layouts under System Settings -> Keyboard layout. Under "Options", you can change the key to switch layouts to the Menu-key (Fn-0 on the NumPad) and use the CapsLock light to indicate which layout is in use. Very handy!


    Unsolved issues
    &#8226; Hibernate
    Hibernate is not working. In this article PowerManagement/Hibernate it states:

    Hmm, "[...]on systems with broken BIOSes". No further comment on that. :p
    The funny thing is, the shutdown variant actually works, if done by hand. I could not find out how to use that as default for the built-in Hibernate. Suggestions welcome! Further reads:
    archlinux: pm-utils
    ubuntuusers pm-utils (in German)

    &#8226; Buttons
    Certain Fn-Buttons are not working. F1 does weird stuff, F9 F10 F12 are not working at all.
    At the Numpad, NumLock cannot be switched on. The default actions are the cursor keys, etc.
    The WiFi light is constantly on, but does not do anything.

    &#8226; Brightness controls
    Screen brightness is not stored after (re)boot. Keyboard backlight is working out-of-the-box on auto, manual does not work.

    Did you know...?
    &#8226; That under Linux you can have about the same battery life as under Windows?
    &#8226; That, once the touchpad is fixed, a four-finger tab by default opens the dash?

    Summary
    There are still a lot of things that I did not test yet. But so far Linux is running very well on the Chronos Series 7. With some tweaks it is one awesome machine. Some minor quirks remain, but I'll update this thread when I found out more about them. Feel free to share your experiences, ask questions or give suggestions!
     
  2. Lekkerkerker

    Lekkerkerker Newbie

    Reputations:
    14
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    [Reserved for future updates]
     
  3. Dannemand

    Dannemand Decidedly Moderate Super Moderator

    Reputations:
    6,615
    Messages:
    4,322
    Likes Received:
    989
    Trophy Points:
    181
    Welcome to the forum, Lekkerkerker. You are making a great first impression :)
     
  4. Metroid_III

    Metroid_III Notebook Consultant

    Reputations:
    64
    Messages:
    131
    Likes Received:
    1
    Trophy Points:
    31
    Hey you beat me to the guide, I was considering making one :p

    Just want to throw some tidbits out there, for 3 and 4 finger touchpad support, use a program called touchegg.
    touchegg - Touchégg - Multitouch gesture recognizer - Google Project Hosting

    And to turn off the Radeon GPU and achieve amazing battery life and cool temps, consult this thread:
    https://bbs.archlinux.org/viewtopic.php?id=164182

    Right now my only problem is the speakers aren't as great on Linux due to the lack of software enhancement...
     
  5. Lekkerkerker

    Lekkerkerker Newbie

    Reputations:
    14
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    5
    Hi Metroid_III,

    thank you for posting these useful links. I found this Radeon GPU thread as well. It's awesome and it works! I wrote a little script that I want to share.

    Make a file /usr/local/bin/graphics_switch and fill it with:

    Code:
    #!/bin/bash
    # Script to switch the dedicated 8870m graphics card on and off.
    
    case $1 in
            "ON"|"on")
                    echo '\_SB.PCI0.PEG0.PEGP._ON' > /proc/acpi/call
                    if grep -q "0x1" /proc/acpi/call
                    then
                            echo "8870m is ON"
                            notify-send -i /usr/share/icons/gnome/scalable/status/network-transmit-receive-symbolic.svg "graphics switcher" "\n 8870m is ON"
                    else
                            echo "error"
                            exit 1
                    fi;;
    
            "OFF"|"off")
                    echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call
                    if grep -q "0x0" /proc/acpi/call
                    then
                            echo "8870m is OFF"
                            notify-send -i /usr/share/icons/gnome/scalable/status/network-error-symbolic.svg "graphics switcher" "\n 8870m is OFF"
                    else
                            echo "error"
                            exit 1
                    fi;;
            *)
                    echo "Usage: graphics_switch [ON|OFF]"
                    echo "Script to switch the dedicated 8870m graphics card on and off.";;
    esac
    
    exit 0
    Leave the notify-send lines out if you don't want a popup. Make it executable: sudo chmod +x /usr/local/bin/graphics_switch. Usage: sudo graphics_switch [ON|OFF]
    A word of warning: Never, never use the proprietary fglrx drivers! It will not work and on top of that totally mess up your compiz settings. Since I don't use the 8870m under Linux (at least not with the appropriate drivers), I want to switch it off permanently. For some reason I could not get the script to run at boot time. So let's fire it up when logging in. First of all we need to allow users to use the script with out a sudo password:

    Make a file graphics_switch_permission and fill it with:
    Code:
    ALL ALL=NOPASSWD: /usr/local/bin/graphics_switch
    Change permissions and move it to the right place:
    Code:
    sudo chmod 0440 graphics_switch_permission
    sudo mv graphics_switch_permission /etc/sudoers.d/
    Now we can enter it to the startup applications. Type startup in the dash, click on Startup Applications and make a new entry for the script:
    Code:
    Name: switch 8870m off
    Command: sleep 2 && sudo graphics_switch OFF
    Log out and log in and you're done. With dimmed screen and only WIFI on, it shows an estimated runtime of 10:00 to 11:00 hours! What a difference it makes.

    There are some corrections to the first post, the most important one being: Make the grub script executable!
    Code:
    sudo chmod a+x /etc/grub.d/30_windows
    This error took me some five hours to figure out when I reinstalled Ubuntu. :eek: Stupid me. Other not so important corrections I will edit in later.
     
  6. sbeanie

    sbeanie Newbie

    Reputations:
    0
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    I just read this guide but I have heard there are several problems with Samsung laptops and them bricking after attempting to boot linux (UEFI memory overflowing). I was just wondering if you guys know anything about this and if there is already a fix which you have implemented into your guide or you just didn't run into the problem. I have wanted to install linux on this laptop for quite a while but I haven't taken the risk as it risks bricking your device permanently.

    Thanks in advance,

    Tom
     
  7. Dannemand

    Dannemand Decidedly Moderate Super Moderator

    Reputations:
    6,615
    Messages:
    4,322
    Likes Received:
    989
    Trophy Points:
    181
    So far we have not seen any reports of UEFI related bricking on 2013 models, only 2012 models. You can read more about the issue in the sticky thread linked below:

    http://forum.notebookreview.com/samsung/706510-samsung-laptops-bricked-using-uefi.html
     
  8. vayu64

    vayu64 Notebook Consultant

    Reputations:
    0
    Messages:
    146
    Likes Received:
    7
    Trophy Points:
    31
    I have samsung NP870Z5E with the amd 8850M, is it possible to turn off the discrete gpu?

    Thanks
     
  9. pranktank

    pranktank Notebook Deity

    Reputations:
    704
    Messages:
    1,089
    Likes Received:
    62
    Trophy Points:
    66
    Wow, very nice thread! Might give linux a shot :).
     
  10. M1cha

    M1cha Notebook Enthusiast

    Reputations:
    0
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    15
    I've created this thread because I had much problems and I want to share and archive the solutions.
    First I can't recommend you to install Ubuntu 13.04 if you want to turn off dedicated GPU because that's very buggy.
    I can suggest you to use Ubuntu 12.04 and this guide will mainly be about this version of ubuntu.

    I'll add more if I have more fixes but that's all I'm currently using.

    Touchpad Scrolling
    During installation and on first boot you won't be able to scroll with the touchpad. That's the easiest problem to fix. Just run update manager and install latest kernel

    turn off dedicated GPU(AMD 8870M)
    Since I couldn't get any of the amd drivers recognize the dedicated gpu and I don't want to waste battery life I thought it would be the best to disable it.
    1) install the acpi_call module as described on this page: http://hybrid-graphics-linux.tuxfamily.org/index.php?title=Acpi_call
    2) set the module for autoload by putting it's name into /etc/modules. you can use this command to do that:
    Code:
    sudo echo acpi_call >> /etc/modules
    3) open /etc/rc.local as root with your favourite editor(nano or gedit) and add this line just before "exit 0":
    Code:
    echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call
    this will turn off the dedicated gpu on boot. However I saw, that this breaks standby sometimes and even if not after resume the gpu will be active again. To fix it we turn on the gpu before going to sleep and turn it off again after resume.
    To do this just create the file /etc/pm/sleep.d/99_amd-switch with the following content:
    Code:
    #!/bin/bash
    case "$1" in
        hibernate|suspend)
            echo '\_SB.PCI0.PEG0.PEGP._ON' > /proc/acpi/call
    	rfkill block bluetooth
            ;;
    
        thaw|resume)
            echo '\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call
    	echo 1 > /proc/easy_backlight
            ;;
    
        *)
            ;;
    esac
    exit $?
    Screen Resolution
    for my use the screen resolution of 1920x1080 is way too much for 15.6 inch but the next 16:9 resolution is 1360x768 so I've added support for a new resolution. I use 1440x810.
    1) generate Modeline
    Code:
    gtf 1440 810 60
    2) create the file /usr/share/X11/xorg.conf.d/20-monitor.conf with the following contents:
    Code:
    Section "Device"
    	Identifier "v"
        	Driver     "vesa"
    EndSection
    
    Section "Monitor"
    	Identifier "Monitor[0]"
    	Modeline "1440x810_60.00"  95.04  1440 1512 1664 1888  810 811 814 839  -HSync +Vsync
    	Option "PreferredMode" "1440x810_60.00"
    EndSection
    
    
    Section "Screen"
    	Identifier "Screen0"
    	Device "vesa"
    	Monitor "Monitor[0]"
    EndSection
    Please make sure to replace the resolution and the Modeline if you prefer another resolution. You also can add multiple Modeline's.
    Now logout and then login or restart your computer and you should be able to select the new resolution now.

    Function Keys
    1) follow the section "Function keys" on this page: https://help.ubuntu.com/community/SamsungSeries9
    2) install samsung tools:
    Code:
    sudo add-apt-repository ppa:voria/ppa
    sudo apt-get install samsung-tools samsung-laptop
    3) open "Samsung Tools Preferences" and set backlight,bluetooth,webcam to none, CPUfan to Fn+F8 and Wireless to Fn+F9
    4) download kbbcontrol and kbbnotify from my attachments and extract the files to /opt
    5) set the permissions:
    Code:
    sudo chmod +xs /opt/kbbcontrol
    sudo chmod +x /opt/kbbnotify
    6) install and open compiz config manager and add the following commands and assign them to the fn keys:
    Code:
    /opt/kbbcontrol down
    /opt/kbbcontrol up
     

    Attached Files:

Loading...
Thread Status:
Not open for further replies.

Share This Page