Skip to content

Instantly share code, notes, and snippets.

@GMMan
Last active July 22, 2020 15:30
Show Gist options
  • Star 52 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save GMMan/def55b688289f52b8635f1a83c25b1b5 to your computer and use it in GitHub Desktop.
Save GMMan/def55b688289f52b8635f1a83c25b1b5 to your computer and use it in GitHub Desktop.
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

Once you have NVIDIA's driver installed, you may notice some color banding. The driver does not seem to detect the bpc of the panel properly, so you will need to set this yourself.

  1. Generate xorg.conf.
sudo nvidia-xconfig
  1. Add this line under the Screen section of the config to turn on dithering:
    Option         "FlatPanelProperties" "Dithering = Enabled"

Bootsplash Resolution

Plymouth looks like it's running at 640x480. To increase the resolution, follow this guide, but ignore the step for installing v86d. You can set the resolution to 1920x1080. Note that the splash may cut to black after a bit, with the dots being redrawn. No idea why that happens, and there doesn't appear to be an easy fix.

Hotkeys

The keyboard on the laptop is a USB HID keyboard, and sends its own scancodes for hotkeys instead of going through ACPI, where the asus-wmi module would have handled it. This will require you to compile your own driver.

Download the source for the current version of your kernel (probably from here), and apply these patches:

Unmarked on the keyboard are the camera key (Fn+V), Splendid Utilities key (Fn+C, mapped to KEY_PROG2), and Power4Gear Hybrid key (Fn+Space, mapped to KEY_PROG3, but doesn't actually work on this particular model). The ROG key is mapped to KEY_PROG1.

After you patch things up, build the module (see https://askubuntu.com/a/515408). Copy the module to its proper directory in /lib, sudo depmod -a, and rebuild your initrd (sudo update-initramfs -u).

Display Off Hotkey

After you get the hotkey driver installed, you need to add a script for Fn+F7 to work. Follow the instructions here, but use video/displayoff DOFF 00000089 00000000 for the event line. (You may need to use acpi_listen to find the actual event, if the above does not work.)

Screen doesn't turn on after it turns off

Update: appears to be fixed as of driver 375.26.

This is a known issue in the NVIDIA driver. See here for the thread. For now, you'll have to switch between one of the ttys (Ctrl-Alt-F1) and X.Org (Ctrl-Alt-F6) to get the screen to turn back on.

There are huge black borders around windows after resume

Also a driver bug. Do the same thing as above to reset things.

Airplane Mode LED lights when everything is on

This is a bug in the ACPI DSDT. We're waiting for the Linux devs to sort out what they want to call the airplane mode button before efforts to get the light to behave properly goes anywhere.

@ozra
Copy link

ozra commented Aug 13, 2017

I just got the ASUS GL702VMK and I've mainly had problems getting a small Win10 partition to co-operate, otherwise the issues are mainly as stated earlier.

  • No mousepointer etc., as mentioned, in LiveUSB until I added nouveau.modeset=0, but then resolution was 800x600. Could install at least, without painstakingly guessing mouse-pos step by step via right-clicking to see where the context-menu opens XD.
  • After booting up fresh I installed NVIDIA-Linux-x86_64-384.59.run (latest available upon writing this comment), and then the graphics were all good (this machine has the 1060)
  • After finally getting W10 to run and not messing up EFI, and installing the AFK-driver/app from ASUS web-site in W10, the keyboard lighting seems to work both in W and Ubuntu (!?)
  • I flashed the "BIOS" to version 303 - after that I couldn't boot Linux or USB-stick (!) - Downgraded to 300 again, and then got it back on track. It might be circumventable, but I don't have time to try every permutation of fuck-ups, I should never have flashed! (reason for doing so was a blind hope that it would improve cpu performance-regulation and thereby heat-regulation)
  • I tried installing the mainline kernel 4.12.6 based on @sd-f comment above. That locks shit up completely when trying to login via lightdm or running startx, something about "gpu-discover-tools" in dmesg (I'm sorry, don't remember, doing all this in haste, as always with things you just want to be done with) - so I removed 4.12.6 via apt (ukuu doesn't work outside of X-env despite being command-line!!! Fucktardme).
  • After messing with above I was struck with the login-loop in lightdm. Took me a while to figure out that I had ran sudo startx during my testing, this left ~/.Xauthority owned by root.root causing lock-timeout. This was a mistake caused by my testing, not by the driver/OS/GPU combo - since the symptom is the same as for problems that can be "original", I thought I'd mention it here in case someone else also does a stupid thing like this while desperately throwing commands around to generate logs XD

As for the rest of things (not gfx related), I will simply wait until support "arrives" with later updates - I'll see them as "free upgrades" down the line XD

I've had a similar situation with an ASUS about seven years ago, took two years until all the HW was supported fully in linux (touchpad, bluetooth, etc.). I still opt for ASUS because I've never had one fail on me hardware and build-wise.

@YontiLevin - I also got this machine because of it's performance: that should be all good, while it still maintains a pretty slim form factor. Though for deep-learning you should probably consider a stationary machine park. For this machine, be warned: it looks insanely "sporty"! I had unfortunately not looked this up at all, I just bought it based on specs, it looks like some '90s neon Nike shoes or something XD

@tiagolramos
Copy link

good new guys

thanks to Kai-Heng Feng, a huge thank you, the fixes are on the way

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1482390

@jmoon1002
Copy link

jmoon1002 commented Sep 25, 2017

@sd-f
Thanks for mentioning ukuu! Though this topic is on Ubuntu 16.04 on GL502VS, I resolved the most of compatibility issues in Ubuntu 17.04 on ASUS FX502VM (which,in fact, shares the same internal hardwares as GL502VM).

Only issue I faced while upgrading the kernel to 4.13.3 from 4.10 was that my device could not recognize the WIFI device, Intel WIFI 8260. This could be solved with following terminal commands:

cd /lib/firmware
sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/iwlwifi-8000C-27.ucode

Simply, before upgrading, make sure your WIFI firmware is up to date.

@furui
Copy link

furui commented Dec 22, 2017

For my backlight problems in Linux Mint, I created a script that just monitors and copies the ACPI values into xbacklight. It can probably be used on Ubuntu too.

https://gist.github.com/furui/0573ab25ad0469c4c7f49c9308bc47e7

@gangeshwark
Copy link

gangeshwark commented Dec 24, 2017

I recently bought a ASUS ROG GL702VSK and didn't have the Fn keys working out-of-box in Ubuntu 16.04 except volume control keys. But I upgraded the kernel from 4.10 to 4.12.14, and all the Fn combinations work perfecting except the screen off key.
Hope this helps.
To check your kernel version, use $ uname -r
Then upgrade using the instructions in the link: http://linuxg.net/install-kernel-4-12-on-ubuntu/

If the wifi doesn't work after the upgrade, do the following:
$ service network-manager stop
$ sudo ifconfig wlp3s0 up
$ service network-manager start
wait for a while, and the wifi should be up and running.
Then install linux-generic
$ sudo apt-get install linux-generic

@DominikLorenz
Copy link

What GPU temperatures do you experience under load?
I have GL502VS with 1070 GTX and Ubuntu 17.10. When I use the GPU (for CUDA computations) the temperature goes up to 91 °.
I am thinking about switching to Ubuntu 16.04 if this solves the issue.
Thanks in advance

@ffoxin
Copy link

ffoxin commented Feb 2, 2018

@gangeshwark,
with kernels from 4,13 branch all hotkeys works for me (GL502).

@gangeshwark
Copy link

@DominikLorenz,
Even I experience the same heating issue with my laptop with Ubuntu 16. I think switching to 16.04 from 17.10 would make no difference in terms of heating.

@lordjea
Copy link

lordjea commented Feb 24, 2018

Hi guys, just an update
After install ubuntu 16.04 all the problem you said happend to my GL553VD
At the end, after install the kernel with headers v4.15.5, the hotkeys start working well

http://kernel.ubuntu.com/%7Ekernel-ppa/mainline/v4.15.5/

@maty974
Copy link

maty974 commented Mar 11, 2018

Hi !

Does anyone have the Asus GL703VM ?

I still can't get Fn keys working :( except for the media shortcut and sound control ...

I'm trying to record some tips and workaround for this model here in case it helps someone:
https://gist.github.com/maty974/a72eece781917e133514b3d322c08005

@mbartosi
Copy link

@maty974 same here with GL503VD.

@tamer-hassan
Copy link

tamer-hassan commented Mar 25, 2018

jasmin@GL702VM:~$ uname -r
4.15.0-12-generic

jasmin@GL702VM:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu Bionic Beaver (development branch)"

In MATE Desktop, function keys all work (except screen off).
In Unity, all the mentioned function keys do not work, as stated in original post.

@pelegye
Copy link

pelegye commented Apr 13, 2018

thx very much dude, solved my problem. i had thought i need to live with not closing the lid at all haha.

@gigcastro
Copy link

@mbartosi hey, i'm dealing with a lot of issues with touchpad on GL503VD (cursor jumping, freezing, etc..) on Ubuntu 18+kernel4.17. Seems by your comment that you got it to work, maybe? Even without Fn keys will be a major success for me, applying kernel patched made it work??

@soscler
Copy link

soscler commented Oct 27, 2018

I actually found the solution to have linux works normally on asus rog with nvidia gpu after 6 months of trying with ubuntu, linux mint, manjaro (with nouveau.modeset etc :( ).

1- Using KDE neon https://www.kde.org/index --the last version
KDE Plasma : 5.14.2
KDE Frameworks Version 5.51.0Q
Qt version : 5.11.2

2 - With ukuu upgrade the kernel to 4.19
$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update && sudo apt-get install ukuu

3- Upgrade the nvidia drivers to 410
$ sudo apt install nvidia-driver-410 && sudo reboot

4- Having nouveau.modeset in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 nvidia-drm.modeset=1"

5- Update the grub and restart
sudo update-grub2 && sudo reboot

@brothermechanic
Copy link

brothermechanic commented Nov 6, 2018

I actually found the solution to have linux works normally on asus rog with nvidia gpu after 6 months of trying with ubuntu, linux mint, manjaro (with nouveau.modeset etc :( ).

1- Using KDE neon https://www.kde.org/index --the last version
KDE Plasma : 5.14.2
KDE Frameworks Version 5.51.0Q
Qt version : 5.11.2

2 - With ukuu upgrade the kernel to 4.19
$ sudo add-apt-repository ppa:teejee2008/ppa
$ sudo apt-get update && sudo apt-get install ukuu

3- Upgrade the nvidia drivers to 410
$ sudo apt install nvidia-driver-410 && sudo reboot

4- Having nouveau.modeset in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 nvidia-drm.modeset=1"

5- Update the grub and restart
sudo update-grub2 && sudo reboot

Hello, i test your pipeline, but on gentoo GL703VM
I commit my grub options and add yours

#GRUB_CMDLINE_LINUX_DEFAULT="init=/usr/lib/systemd/systemd console=tty1 modprobe.blacklist=nouveau systemd.setenv=GPUMOD=nvidia nomodeset"
GRUB_CMDLINE_LINUX_DEFAULT="init=/usr/lib/systemd/systemd console=tty1 quet nouveau.modeset=0 nvidia-drm.modeset=1"

No result - can't get FN-keys work (((

@animator013
Copy link

I have Asus GL503VS. I had similar problems with function keys. Here is what i've done.

  • installed ubuntu 18.04.1

  • downloaded kernel source from kernel.org, I decided to downlad latest stable (at time of writing https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.7.tar.gz)

  • unpack that tar xvzf linux-4.19.7.tar.gz

  • open cd drivers/hid

  • edit vim hid-ids.h

  • line #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 to #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1866 where 0x1866 is the id of my keyboard, so maybe it is similar with these models

  • compile kernel (there is somewhere good tutorial how to do that)

  • install kernel with modules

  • reboot to new kernel

  • try function keys - they should be working

  • now to make screen brightness work you need install nvidia-driver-415 (or maybe any driver higher then 396)

  • it will work out of the box but if not add this line to grub GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_EnableBacklightHandler=1"

  • now screen brightness should work

  • keyboard backlight can't be controlled, really can't figure this out because I don't know how it is initialized in windows

Hope this helps. Touchpad was working out of the box so don't really know how to help there.

In gnome i get random freeze, am trying to figure that out too.

@Luc45
Copy link

Luc45 commented Jun 17, 2019

Problem:
Fn keys not working, this includes: Keyboard backlight, screen brightness control, trackpad disable/enable, etc

Solution:
Ubuntu 18.04 comes with Kernel 4.18~. Install ukuu and update your kernel to 5.X. I upgraded mine to 5.1.9 and everything is working fine. Read some tutorials online on how to do so if you need, it's pretty easy and straightforward, everything is done in a GUI with two clicks of a button. With these Kernel stuff you never know, have a backup around.

Reason:
There were recent fixes to the Linux kernel concerning specifically ASUS ROG laptops, and these fixes are not present in older versions of the Kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment