Manjaro Deepin on an Asus FX504G laptop

This is a post that I did not think I would be writing. My wife bought me a new laptop, an Asus FX504G, as a Christmas present. It is a very sturdy rig and the specs are pretty good (in Thailand) for the price. Of course, the first thing I wanted to do was install Linux, specifically Manjaro Deepin, onto it. Because I needed to preserve the Windows install if I needed to get warranty service on it, I bought a new NVME drive to replace the one that came with it. I then proceeded to install Manjaro. This turned into a nightmare at first, and then into a big learning experience. It felt like I was back in 2009 installing Fedora 9 on a laptop with an ATI card. It was NOT the fault of Manjaro, but the hardware, an Elantech touch pad, Samsung NVME SSD, and an nVidia Optimus setup, in the laptop. At first I was worried that I would be unable to install Linux at all on this machine, but I was not about to give up. After a month of researching, trial and error, and lots of caffeine, I now have a fast and stable Manjaro Deepin install. Here is how I was able to accomplish it.

Before I start, here are the results of inxi -Fxxz command:

System:    Host: Manjaro Kernel: 4.19.13-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.1 Desktop: Deepin 15.8 
           tk: Qt 5.12.0 wm: DeepinWM dm: LightDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: ASUSTeK product: TUF GAMING FX504GD_FX80GD v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: FX504GD v: 1.0 serial: <filter> UEFI: American Megatrends v: FX504GD.312 
           date: 07/13/2018 
Battery:   ID-1: BAT1 charge: 45.9 Wh condition: 46.1/48.1 Wh (96%) volts: 3.9/11.7 model: ASUS A32-K55 
           serial: <filter> status: Discharging 
CPU:       Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP arch: Kaby Lake rev: A 
           L2 cache: 9216 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 53004 
           Speed: 900 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 900 2: 900 3: 900 4: 901 5: 900 6: 900 7: 901 
           8: 900 9: 900 10: 900 11: 901 12: 900 
Graphics:  Device-1: Intel UHD Graphics 630 vendor: ASUSTeK driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:3e9b 
           Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: ASUSTeK driver: nvidia v: 415.25 
           bus ID: 01:00.0 chip ID: 10de:1c8d 
           Display: x11 server: X.Org 1.20.3 driver: modesetting,nvidia resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 415.25 direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:a348 
           Sound Server: ALSA v: k4.19.13-1-MANJARO 
Network:   Device-1: Intel Wireless-AC 9560 [Jefferson Peak] driver: iwlwifi v: kernel port: 5000 bus ID: 00:14.3 
           chip ID: 8086:a370 
           IF: wlo1 state: up mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel 
           port: 3000 bus ID: 03:00.0 chip ID: 10ec:8168 
           IF: enp3s0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.14 TiB used: 330.13 GiB (28.4%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 250GB size: 232.89 GiB speed: 31.6 Gb/s lanes: 4 
           serial: <filter> 
           ID-2: /dev/sda vendor: HGST (Hitachi) model: HTS541010B7E610 size: 931.51 GiB speed: 6.0 Gb/s 
           serial: <filter> 
Partition: ID-1: / size: 227.74 GiB used: 23.59 GiB (10.4%) fs: ext4 dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 46.0 C mobo: 27.8 C gpu: nvidia temp: 42 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 266 Uptime: 1m Memory: 15.52 GiB used: 647.6 MiB (4.1%) Init: systemd v: 239 Compilers: 
           gcc: 8.2.1 Shell: bash v: 4.4.23 running in: deepin-terminal inxi: 3.0.28 

Manjaro Architect was used to install the system. I really enjoy the freedom it gives me when I do an install.

Issue No.1 - NVME "Lag"

No matter what distro I installed on the laptop, the system would randomly freeze. This freeze would last from a couple of seconds to over a minute. After some research, I found that there is an issue in the kernel with Samsung NVME drives. The kernel was trying use a power saving state that the drive does not support. This was causing write errors. Adding the following parameter to the kernel fixed the issue: nvme_core.default_ps_max_latency_us=5500 This disabled the lowest power saving state for the drive and now random desktop freezing was a thing of the past. While this was a known issue with kernel 4.10, I found that it was still present in kernel 4.19.x.
source

Issue No.2 - nVidia Optimus

This issue turned into the hardest one to fix. When I first started to troubleshoot it, the Manjaro Forums were awash with support requests regarding this issue. Rather than adding to the pile with my own post, I decided to lurk the posts and take notes on what fixes worked for other users. After a couple of weeks and copious amount of notes, I was ready to take a shot at fixing it. After some experimentation, I found that the following kernel parameters worked the best on my system: nouveau.modeset=0 acpi_rev_override=5 With these kernel parameters, I was able to get to a desktop using the Nouveau driver. Using this guide, link, I used chroot to get into my system and setup my nVidia card to run all the time. After making sure that I had uninstalled the Nouveau driver, and placed the run command for the optimus.sh script in the [Seat:*]section of the lightdm.conf , my system booted without any problems. Now the laptop is only using the nVidia card.

Issue No.3 - Elantech Touch Pad

Once I had the nVidia and the NVME drive issues resolved, I noticed that there was another problem. It was the touch pad. The touch pad in my laptop is manufactured by Elantech. This touch pad does not work and play well with Linux. It was non-functional on any kernel before the 4.17.x series. With 4.17.x and newer, it will work, but not reliably. The libinput driver will randomly crash, causing the touch pad to stop working and the "gestures" support is also very spotty. After some research, I ran across this post, link. I tried running the suggested command, and it did not resolve the problem for me. In that same post, there was a link to a bug report on the Arch Wiki. It was there, that I found yet another kernel parameter to try. So I added psmouse.elantech_smbus=0 as a parameter on boot and gave it a test. This solved the problem. The touch pad would no longer randomly freeze, but the gestures still do not work properly. Since I do not use gestures on the touch pad, because I have found them annoying instead of helpful, this solution works great for me. The 4.20 Linux kernel has fixed these issues with some models of the Elantech touch pad, but unfortunately my model is not one of them.

Conclusion

Except for setting up my nVidia card as Prime, most of my problems were solved using kernel arguments. Ultimately, the GRUB_CMDLINE_LINUX_DEFAULT line in my grub has the following:
rd.udev.log-priority=3 bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash nvme_core.default_ps_max_latency_us=5500 nouveau.modeset=0 acpi_rev_override=5 psmouse.elantech_smbus=0

Using all of those arguments, my laptop is now booting properly, is stable, and fast. I could not be happier. After a month of having to run Windows off and on, I feel like I have finally come back home.

7 Likes

I am in the market for a new laptop and have shortlisted this one because it is the best in terms of specs and cost. However, would you recommend someone to go for this? I will only be using Linux on it. A couple of months back I got a Ryzen Laptop (Dell Inspiron 5575) and had to work really hard to get it to work properly. Even after that I realised that its thermal performance is so bad that I will have to return it. I won't have the option of return this time.
I will be OK with using only a mouse though. I rarely use the touchpad any ways. But I would like to get the dual graphics working sometime in future.

@saurabh Honestly, it is a great laptop within its limitations. If you are looking for a coding or video editing powerhouse, I would suggest going with something else. Here are some things I found after using it for almost 2 months now.

  1. Setting it up to work with Linux was not that hard. This was my first time setting up a machine with dual graphics cards. My last laptop only had an nVidia card. So it took me longer than normal. Currently. I do not have it set up to switch between the Intel and nVidia card. I have it set up to use the nVidia card all the time. Eventually I plan on playing around with my install to get this working. After I back everything up of course. :wink:

  2. As for heat management, I re-encoded a 1080p video from the H264 codec to H265 codec using Handbrake. While the processor did not thermal throttle, it did get a little warm. So you can do some light duty video work with it.

  3. I really like the ability to do future upgrades. Every other laptop I looked at in this price range, were limited on their upgrade paths. This laptop model can handle up to 32gb of DDR4 RAM and essentially 2 hard drives.

  4. Upgrading the laptop is very easy. Remove the bottom shell, and the RAM, wireless card, and hard drive connections are right there. You do not have to remove the motherboard to get to anything you may want to upgrade.

The only complaint I honestly have with it is the touchpad. It will still sometimes freeze, but it is very rarely. The support for the Elantech touchpads in the Linux Kernel is getting better, so I see it as an issue that will be solved with time. With the 4.15 Kernel, it was totally non-functional unless you were willing to manually patch the kernel. To have it working as well as it does on the 4.19 kernel is pretty awesome.

Would I suggest this laptop? Yes. Its price to performance ratio and its ugradeability make it a good buy. Especially if you are going to use it for daily tasks and some light gaming. The first thing I would do is get an M.2 NVME SSD and make it your boot drive. The spinning drive that come with it by default is slow. I use it now for bulk storage. Someday I will be replacing it with an SSD of the same capacity (1TB).

I hope this helps!

1 Like

I am so thankful that you took out the time to write this reply for me. I think I will get it. I like the upgradeability aspect too. I will try to get the dual graphics to work too and will surely post a solution if I find one.

1 Like

@saurabh I was glad to help. I wish you luck on the dual graphics. That seems to be the biggest issue right now with all nVidia laptops. :thinking: That is why I followed the guide to set the laptop up using the nVidia card in Prime mode. I look forward to hearing about your adventures!

Can you also comment on the build quality of this Laptop? Will it last a few years if handled normally? My last one broke off near the heat vents, probably the plastic couldn't tolerate the heat.

It feels very sturdy compared to the competition. I think it will last.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by