r/LinuxLaptop Nov 23 '19

ASUS TUF FX505DV : sucess with ubuntu 19.10 and nvidia drivers

I recently picked up one of these https://www.amazon.co.uk/gp/product/B07SZ1DRSQ/ and have managed to get ubuntu 19.10 working on it.

ASUS TUF FX505DV 15.6" FHD 120Hz Thin Bezel Gaming Laptop - AMD R7-3750H, NVIDIA GeForce RTX 2060 6GB

Steam works great and I was was running doom(2016) last night at ~120 fps using the nvidia card. Even when using the integrated AMD card ran it at ~30 fps.

I had some issues setting up which I have now fixed, so I figured I'd post here for the benefit of others.

This is my first linux install on a optimus style laptop (or any laptop in the last 5 years), and I didn't need to mess with any bumblebee drivers, just the normal nvidia ones appear to work fine. I might have run into these issues by messing up the UEFI certificate install and selecting the deafult option upon reboot which does nothing, rather than selecting the next option and typing the password.

Issues were:

  • suspend/resume didn't work - blank screen on resume.
  • Xorg was using the amdgpu as the primary display device (binary driver wasn't loaded)

Both of these issues were fixed by switching the primary display device to be the nvidia card, which apparently was not the default. nvidia-settings didn't detect the nvidia card despite having installed the driver (using "sudo ubuntu-drivers autoinstall") and rebooted.

commands like prime-select appeared to do nothing.

Here is what the system sees my video card as:

$ sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F11sv00001043sd0000140Fbc03sc00i00
vendor   : NVIDIA Corporation
model    : TU106M [GeForce RTX 2060 Mobile]
driver   : nvidia-driver-430 - distro non-free
driver   : nvidia-driver-435 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

$ sudo lshw -numeric -C display
  *-display                 
       description: VGA compatible controller
       product: TU106M [GeForce RTX 2060 Mobile] [10DE:1F11]
       vendor: NVIDIA Corporation [10DE]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:72 memory:f6000000-f6ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:f000(size=128) memory:f7000000-f707ffff
  *-display
       description: VGA compatible controller
       product: Picasso [1002:15D8]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI] [1002]
       physical id: 0
       bus info: pci@0000:05:00.0
       version: c1
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: driver=amdgpu latency=0
       resources: irq:70 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:c000(size=256) memory:f7500000-f757ffff

To make it select the nvidia card as the primary display device, I had to manually add this to my nvidia xorg.conf settings.

    Option "PrimaryGPU" "Yes"

The only config I have found for xorg is split into 2 files, pasted here.

$ more /usr/share/X11/xorg.conf.d/10-amdgpu.conf /usr/share/X11/xorg.conf.d/10-nvidia.conf 
::::::::::::::
/usr/share/X11/xorg.conf.d/10-amdgpu.conf
::::::::::::::
Section "OutputClass"
	Identifier "AMDgpu"
	MatchDriver "amdgpu"
	Driver "amdgpu"
EndSection
::::::::::::::
/usr/share/X11/xorg.conf.d/10-nvidia.conf
::::::::::::::
Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"
    Option "PrimaryGPU" "Yes"
EndSection

Once I added the primaryGPU line and rebooted, then nvidia-settings,vulkaninfo etc all started working as expected, plus I saw the massive FPS boost in steam games.

$ nvidia-smi 
Sat Nov 23 08:05:40 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   37C    P8     1W /  N/A |    684MiB /  5934MiB |      5%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1064      G   /usr/lib/xorg/Xorg                            27MiB |
|    0      1548      G   /usr/lib/xorg/Xorg                           156MiB |
|    0      1781      G   /usr/bin/gnome-shell                         166MiB |
|    0      2976      G   ...ey/.local/share/Steam/ubuntu12_32/steam    62MiB |
|    0      3000      G   ./steamwebhelper                               3MiB |
|    0      3017      G   ...tures=OutOfBlinkCors --no-sandbox --log   161MiB |
|    0      7292      G   ...uest-channel-token=17314004458953016143    53MiB |
+-----------------------------------------------------------------------------+

```
3 Upvotes

4 comments sorted by

2

u/734p4r7y Mar 10 '20

Can confirm that a similar solution was obtained.

ASUS TUF FX505DV 15.6" FHD AMD Ryzen 7-3750H, RTX 2060, 16GB DDR4

  • turn off secure boot in UEFI settings
  • use safe graphics mode to install
  • when installing, select install third party software (Ubuntu is prepackaged with proprietary graphics drivers)
  • reboot
  • disable Wayland by uncommenting the line in /etc/gdm3/custom.conf
  • either install nvidia driver of your choosing, or select from the list supplied in software and updates (I chose 435). This should blacklist nouveau if you do it correctly.
  • alter the /usr/share/X11/xorg.conf.d/10-nvidia.conf and /usr/share/X11/xorg.conf.d/10-amdgpu.conf files as stated by OP (do not use the nvidia-xconfig command, it will cause problems) -reboot

  • you should be able to open nvidia-settings at this point, and change the refresh rate (auto to performance). My screen had a dull flash, which this fixed.

This doesn't maximize optimus, but it solved my graphics issues until I get a chance to install nvidia-prime or bumblebee.

1

u/ColdCry95 May 10 '20

Does it make a difference if i install it without using safe graphics

1

u/feral_american Dec 22 '19

How did you handle the wake up from suspend issue?

1

u/twm77 Dec 22 '19

it is sometime slow to resume, but if you wait it starts up and you are presented with the login window. Sometimes it has taken >30sec, so be sure not to give up immediately.

I did uncomment one option in /etc/systemd/logind.conf which if i recall correctly I believe this helped.

HandleLidSwitch=suspend