Fedora 22 on Asus N550JK

I played with Oracle Linux on my laptop for a while. Now I understand that Oracle Linux is a good stable server OS but it is very difficult in every day usage, especially if you are developer. There are a too much old versions of tools and software for development that you may want to use, sometimes newer versions are not compatible with other packages. That's why I returned to Fedora 22. This post is about problems that I solved and things that I did until everything worked as I wish.

Problems and solutions

I have never used Xfce before. It was a little it challenging to configure everything as I wanted, that's why I decided to write this post. Here is the list of problems that I faced:

  1. Nvidia driver installationLink Text
  2. Suspend/Hibernate leads to black screen
  3. Brightness and keyboard light control buttons not worked (fn + F3, fn + F4, fn + F5, fn + F6)
  4. Skype was crashing, just not started
  5. Grid workspaces as I used to work with in Unity.
  6. Browser jumping to workspace when click to links
  7. Keyboard shortcuts was very uncomfortable
  8. Workspaces was jumping sometimes, new workspaces added spontaneously.
  9. Open application search by pressing Winkey (Windows key, Super key)
  10. Change keyboard layout by pressing both Shift keys (Left and Right Shift)
Nvidia

First 4 problems was solved all together by installing nvidia-driver, bumblebee and by configuring Xorg and grub. There are a lot different tutorials and wikis about nvidia driver installation. I tried all this links 1, 2, 3, 4, 5, 6 and succeeded only with this and this.

Before start installation I removed nouveau by blacklisting it:

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

And by adding this rd.driver.blacklist=nouveau to grub GRUB_CMDLINE_LINUX, that is in /etc/default/grub. Here how it looks like now:

$ cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.driver.blacklist=nouveau rhgb quiet rcutree.rcu_idle_gp_delay=1 acpi_osi= "
GRUB_DISABLE_RECOVERY="true"
GRUB_GFXPAYLOAD_LINUX=text

Finally update grub:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Now install nvidia-akmod using first link:

yum install akmod-nvidia-340xx "kernel-devel-uname-r == $(uname -r)"

Then install bumblebee using second link:

dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora22/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm
dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora22/noarch/bumblebee-release-1.2-1.noarch.rpm
dnf install bumblebee-nvidia bbswitch-dkms primus kernel-devel 

And after reboot everything should works.

01:09:25:(~)$ optirun glxinfo| grep "OpenGL version string"
OpenGL version string: 4.5.0 NVIDIA 352.55

I was trying to configure xorg.conf, but the easier left it blank. So finally my /etc/X11/xorg.conf is empty. And here is /etc/bumblebee/xorg.conf.nvidia:

[root@c0rp ~]# cat /etc/bumblebee/xorg.conf.nvidia
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
EndSection

Section "Device"
    Identifier  "DiscreteNvidia"
    Driver      "nvidia"
    VendorName  "NVIDIA Corporation"

#   If the X server does not automatically detect your VGA device,
#   you can manually set it here.
#   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
#   as you see in the commented example.
#   This Setting may be needed in some platforms with more than one
#   nvidia card, which may confuse the proprietary driver (e.g.,
#   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
   BusID "PCI:01:00:0"

#   Setting ProbeAllGpus to false prevents the new proprietary driver
#   instance spawned to try to control the integrated graphics card,
#   which is already being managed outside bumblebee.
#   This option doesn't hurt and it is required on platforms running
#   more than one nvidia graphics card with the proprietary driver.
#   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
#   If this option is not set, the new Xorg may blacken the screen and
#   render it unusable (unless you have some way to run killall Xorg).
    Option "ProbeAllGpus" "false"

    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "UseDisplayDevice" "none"
EndSection

The main point here is to use proper BusID, it could be figured out using suggested command lspci | egrep 'VGA|3D'.


Suspend/Hibernate leads to black screen

This problem was solved after proper nvidia driver installation. One more thing to point is to check that /etc/default/grub do not have nomodeset string.


fn Control buttons

This problem is also disappeared after nvidia driver installation, but I think main thing that solved the problem is to configure /etc/default/grub. It should look like I wrote above.


Skype was silently crashing

Again, this problem was solved after proper nvidia driver installation. Check that /etc/default/grub do not have nomodeset config.


Grid workspaces as it is in Unity

There is application called Workspace switcher that provides ability to add workspaces columns and rows. Also there is application Window Manager Tweak, in Workspaces tab turn off everything:



There is a strange behavior by default in Xfce, when you click some link browser appear in workspace where you are clicking, even if browser was on another workspace. To prevent such behavior run Window Manager Tweaks and go to Focus tab and decide what you want. I prefer Switch to browser's workspace:


Keyboard shortcuts was very uncomfortable

Find application called Window Manager and go to Keyboard tab. I clear all shortcuts that was connected to workspace create/deletion/moving. Also I set shortcuts to switch between workspaces as I used to in Unity grid (workspace up down left right).


Workspaces was jumping sometimes, new workspaces added spontaneously.

This problem was gone when I removed all annoying shortcuts from previous step. While working I was accidentally pressing those shortcuts that was moving/deleting/adding workspaces and windows.


Open whisker application search (App finder) by pressing winkey

Add Whisker Menu to the Panel, if it is not already there. Right Click to the Panel > Add New Items:

Go to > “Settings” > “Keyboard”:

Click to Application Shortcut tab

Click the + Add button, enter "xfce4-popup-applicationsmenu" into the Command field, and click OK:

Add Super L Shortcut to open whisker menu.


Change keyboard layout using both Shift pressed

Using this method you could also change it to Both Alt keys.

First of all you have to change Input Method from IBus to X Compose. Find application called Input Method Selector and change it to X compose table. Then do Log out / Log in.

After Log in find application Keyboard and go to the Layout tab:

Unmark Use system default option and choose Change layout option > Both Shift keys together.


Sources