Linux on Asus R541U
This is my experience with openSUSE Linux LEAP
15.0 on the Asus R541UA-RS51 laptop. (Note: memtest
identifies this computer as X541UAK / U3E1.) Things in
parenthesis are what Windows reports with Device Manager.
Click the links to see previous version OpenSuSE 42.3 or the newest
version openSUSE LEAP 15.1.
Hardware Components
|
Status under Linux
|
Notes
|
Intel Core i5-7200UProcessor 2.5GHz (up to 3.1GHz) 3M Cache | Works |
|
Display: BOE 15.6inch FHD (1920 x 1080) | Works |
Roughly 141 DPI |
Intel HD graphics 620 |
Works |
|
8GB DDR4 RAM | Works | |
Toshiba 1TB 5400RPM Hard Drive |
Works | Upgraded to Seagate Hybrid Laptop 1TB |
Realtek RTS5286 PCI Express Card Reader (for
SD cards) |
Works |
|
DVD Drive: 8X Super Multi w/ DL ("HL-DT-ST
DVD-RAM") |
Works |
|
Realtek RTL8723BE PCIe Wireless Network
Adapter |
Works |
|
IMC Networks Video Cam ("VGA UVC Webcam") |
Works |
|
USB: one 3.0, one 2.0, and one USB-C 3.1
port |
Works |
Fast charge works even with stock kernel. |
36WHrs 3-cell Li-ion Battery Pack | Works |
Provides roughly 4 hrs |
Intel High Def. Audio 9d71 (rev 21)
Realtech ALC256 |
Works* |
Works |
ELAN Touchpad ("Asus
Precision") |
Works |
|
Realtek RTL8101/2/6E PCIE
Fast/Gigabit Ethernet controller |
Works |
|
Asus keyboard |
Works; slight nuissances |
Number lock keeps engaging;
no on-screen status program |
Realtech Bluetooth 4.0 |
Unsure |
Doesn't work |
Intel Sunrise Chipset, Power Management |
Works |
Physical Fit and Finish
This laptop is beautiful on the
outside. However, there are a few problems that might
concern people who want to modify and/or upgrade this laptop.
First, there are no "maintenance panels" on
the bottom, which means that upgrades and maintenance require
the keyboard to be removed. You first remove all screws
from the bottom of the laptop, then gently and carefully pry the
keyboard surface (because the keyboard is built into the upper
surface) off.
Second, there seems to be no way to upgrade
the RAM. I have not yet felt the need to remove the
motherboard to look at the bottom of it for expansion
capabilities. The hard drive can be upgraded fairly
easily, once you pull up the keyboard.
Third, unlike other laptops, the battery is
built inside the laptop rather than externally, so (again) to
replace it, you must pull up the keyboard. The stock
battery seems to give 4 hours of life in total (based on Linux
estimates), but you should not, in theory, go past 50% if you
want the battery to remain healthy longer, so you might want to
consider getting an external power source for long trips.
So it's beautiful, until you need to work on
it. Then it's not fun.
Note that this laptop comes with Windows 10,
a TPM module, and Secure Boot. You do NOT
get installation media: I strongly recommend making a disk image
before you boot this laptop for the very
first time. Also, Fedora and OpenSUSE can handle Secure
Boot (as can other Linux distributions), but why bother with
Secure Boot? It will only make upgrading the kernel a
nuisance. You would have to pay to upgrade Windows 10 to a
version that has disk encryption to make the laptop fully and
truly secure, otherwise Secure Boot is just another small hurdle
for a thief to jump in order to steal your information. So
in my opinion, if you want ultimate security, either disable
Secure Boot and install Linux in a way in which encryption will
be enabled (LUKS XTS 256, baby) so you can protect your
documents, or upgrade Windows 10. If you enable Windows 10
encryption (not free), you'd probably end up only sharing files
between operating systems using the SD card reader or USB
devices, which can have drawbacks. So again, my opinion is
disable secure boot. You can always enable it later, in theory.
Installation of OpenSUSE LEAP 15.0
Installation was easy. For the
previous version of openSUSE, see this
link.
First, I wanted a Seagate Hybrid drive, so I
did not boot the laptop with the original factory drive.
See the previous article for how I performed this.
Then I popped in the OpenSUSE LEAP 15.0
install media (whatever is current as of 22 October 2017) and
installed. I used the instructions from Tweak
Hound, and it worked perfectly. I had previously
shrank my windows partition down to about 150GB.
See below for how I
compile a kernel. I am currently running OpenSUSE
LEAP 15.0 with the stock kernel.
Using OpenSUSE LEAP 15.0
First, I noticed that my logs filled up with
error messages similar to these
about AER ePCI errors. Adding pci=noaer to the kernel
command line seemed to fix that.
Notice that on my last laptop, when you
issued a command to suspend to RAM, the laptop would remain off
until a lid up switch signal was given (i.e. if you tapped on
the keyboard, it would not come out of suspend: only closing the
lid, then re-opening the lid would solve this problem).
This laptop works fine: tapping on the keyboard will bring it
out of suspend. Also, the stock suspend key on the
keyboard (once you tell XFCE which keyboard you have) works out
of the box.
Note that the speakers on this laptop are
very loud and sound great, in general.
As for USB support, note that there's a 2.0,
3.0, and 3.1 port. The USB 2.0 port is nearest the laptop
user. Fast charging a cell phone with USB-C works even in
Linux, but it requires you to use a USB-C to USB-C cable from
the 3.1 port to your cell phone. When you do this, it
"just works", without any configuration required, unlike Windows
which has an Asus app that allows you to enable or disable fast
charge. The power outputs seem to be dependent upon system
state: i.e. if the laptop is on, USB-C power outputs are always
on, and thus will fast charge any USB-C device that supports
this.
My solution for using two USB hard drives at
the same time (due to having a 3.0 and 2.0 port) is to use a
USB-C to 3.0 adapter and then putting the two hard drives on 3.0
ports. I tend to reserve the 2.0 port for a USB mouse or
something that has low data usage.
Annoying Behavior on OpenSUSE LEAP 15.0
Bluetooth doesn't work with OpenSUSE's stock
kernel. When I updated the kernel it began to work.
You can disable Bluetooth separately from wireless LAN, which is
a plus. On my old laptop, you couldn't do this separately.
The keyboard has a hybrid laptop/desktop
layout with a numeric keyboard section. However, the end
key is on the numeric portion. When typing, the number
lock comes on, causing the end key to function as a "1". I
am constantly turning off the number lock
in OpenSUSE, even in the new kernel, and even though I've
configured the keyboard models and such. I may need to do
more testing to figure out why it's behaving this way.
Also, there's no on-screen application for XFCE that I can find
that will display the status of the number lock on screen.
In addition, I have set "no" or "off" to the only number lock
related setting in the sysconfig editor, and that results in the
computer booting up with the number lock off, but eventually it
will come back on by itself.
Kudos to openSUSE and/or Linux for fixing
something that always bothered me. While all of the tmpfs
mount points still seem to default to "half of RAM" for their
size, free memory reported in LEAP 15.0 is very low. I can
be using my computer and only be using 1GB of my 8GB of RAM.
Compiling a Linux Kernel on
OpenSUSE LEAP 15.0
NOTE: this section is carried over from LEAP
42.3, but I have not yet gotten a kernel to compile properly:
Some people have asked me how I got a kernel
to compile on OpenSUSE LEAP 42.3. I would like to go over
this part in depth. But first, a warning: if you are using
AppArmor, and need what it offers, you should not proceed.
In my experience, compiling a new Linux kernel breaks
AppArmor. Also, I am not including instructions on how to
make this work with UEFI/Secure Boot. There are tutorials
out there for that, and in my experience, Secure Boot is only a
nuissance (see above).
This "How To" assumes you are a home laptop
or home desktop user and you are compiling a kernel specifically
for the computer you are using OpenSUSE on.
Now, some obligatory safety warnings.
First, before you begin, always back up your files. I am
not responsible for the loss of your files. Second, there
is the rare possibility that compiling a kernel could break your
installation of OpenSUSE or corrupt the data in your
files. It's rare, but it could happen. I am not
responsible for the loss of damage to anything. Third,
choosing to compile a custom kernel obligates you to follow
Linux kernel security newsletters and otherwise keep yourself
informed as to the status of the Linux kernel. It also
means you are more or less taking your Linux kernel out of the
protective care of OpenSUSE's security team and handling your
own security, at least for the Linux kernel. Proceed at
your own risk.
First, you need to download the latest stable
Linux kernel.
Second, copy it to an area where you have
plenty of space to compile it. I have a 20GB root
partition and I didn't have enough space: I had to move it to
another place.
Third, install
patterns-openSUSE-devel_kernel. It will install all the
necessary packages to compile a kernel. But keep in mind,
it will auto-select the old kernel source: you can safely not
install that specific package. With the newest kernels,
you also need to install libelf-devel because some newer ELF
options in the kernel config have been added.
Fourth, as root, go unpack the kernel source
(example, tar -xf linux-4.14.1.tar.xz
).
Fifth, configure the kernel. If you do
not know how, my advice is to start with the OpenSUSE
configuration and then tailor it to your computer. This
means you need to know what hardware you have (the lspci command
can help you). One way to make this simple is use the
"oldconfig" feature, which means the kernel will prompt you
about new items. This feature usually presents you with a
yes/no/module type of decision per item, but makes the
recommended choice the default, meaning you could just keep
pressing enter. So an easy way to do this is (assuming you
are presently in the kernel source directory):
cp /boot/config-4.4.92-31-default .config
yes "" | make oldconfig
Now, let's go into the kernel configuration
tool using the command make menuconfig
.
The first thing you should do is, under
general setup, change the local version to "-custom" or
something that's different from OpenSUSE's "default" naming
convention.
Second, we will need to save space. I
recommend making the following changes:
- Under General Setup, change compiler optimization level to "size". This results in smaller files, and is actually the recommended method.
- Under Processor type and features, turn off (press "N") Support for extended (non-PC) x86 platforms.
- Under Processor type and features, if you have an AMD CPU, turn off all Intel CPU options, and visa versa.
- Under Processor type and features, select your CPU under
Processor family. The help will tell you which you
need. Note that it talks about CPU family. If you
don't know yours, in a separate terminal run
grep family /proc/cpuinfo
. - Under Processor type and features, select supported processor vendors and disable all companies that didn't make your CPU. So if you have an i3/i5/i7, disable AMD and Centaur, etc.
This should reduce the size of your Linux kernel dramatically.
Now some things that can improve the
response of your kernel and therefore your whole system:
- Under Processor type and features, select Preemption model and choose Voluntary Kernel Preemption (desktop). This should reduce kernel latency.
- Under Processor type and features, select Timer frequency
and choose 1000Hz. This is preferred for desktop
systems.
Next, a few general recommendations.
If you have a laptop, like I do, you know that there are several
things that will never happen, such as replacing the PCIE sound
card or video card. They're almost always permanently
built into the motherboard of a laptop. You can therefore
not compile other PCIE sound and video card support.
The best way to do this, if you are unsure,
is look at the output of lspci and look at the companies who
made your hardware. If you read the options under Device
Drivers > Sound cards, etc, you will see that there is a
section for PCI sound cards. So for me, since Intel made
my sound, I turned off all sound cards listed in PCI that were
not made by Intel. Then I went into graphics support and
basically did the same thing. But read the options and
know what the options are, and use Google if you need to.
DisplayPort, for example, isn't a company, it's a technology,
and you want that because your USB-C port should support
this. You can use this "manufacturer" philosophy in other
sections, too, but make sure that what you're enabling or
disabling, or adding/removing as modules, isn't something you
need. Choosing the best kernel configuration for your
computer is sort of like an art, and takes practice and
experience, so don't be discouraged if you forget something
important. Just boot into a stock kernel and try the whole
thing again.
If you're new, basically don't change
anything unless you're absolutely sure you should. Read
the help associated with the kernel items listed. Most
will say "if you're unsure...", which can help, but I find that
Googling the hardware item in question also helps. Another
helpful thing to do can be to go into Windows's Device Mangler
... I mean Manager (LOL) ... and writing down everything
listed. If you know, for instance, that you do not have a
PCMCIA card (like this laptop), you can safely comment all those
out under Bus types, etc. But keep in mind that even some
new laptops like this have legacy items like the ISA bus. (Why
this laptop has ISA bus items, I don't know, but it's listed in
lspci, so I keep it in my kernel config.)
Note that you should make everything in the
cryptographic portions a module: if you get errors at boot with
LUKS that it can't unlock your LUKS because of a failed
dependency, that's because (in my experience) it expects CRC32
and others to be configured as modules.
When we're done configuring our kernel, we
compile it. If you looked in /proc/cpuinfo, you know how
many CPUs you have. Add one to that number and then
compile using the -j option with that number. For this
laptop, since I have two cores with Hyperthreading (i.e. 4
virtual core) that means I ran make -j5 bzImage
&& make -j5 modules && make -j5
modules_install
.
Once this is done, you need to copy some
stuff. There are three files you need to copy.
Here's how it went on my computer, as an example.
cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.14.1-custom
cp .config /boot/config-4.14.1-custom
cp System.map /boot/System.map
-4.14.1-custom
Then you need to make an initrd. I ran
dracut /boot/initrd-4.14.1-custom 4.14.1-custom
to
build my initrd.
Last, you need to update the boot
loader. In OpenSUSE, go into Yast2 and open the boot
loader configuration program. I simply unchecked, then
rechecked the "use graphical console" and clicked Ok.
Basically, I made no changes, just made the program think I did,
so it would update GRUB2. Or, as root, simply run the
"update-bootloader" command as root. Some have said that
this isn't necessary (as I may have this habit left over from
LILO and my Slackware Linux days), but I still run it.
Keep in mind, again, if you're using Secure
Boot, you need to also sign that kernel image, which is an
involved process.
When you reboot, select "advanced options" or
whatever it's called, and then look at the kernel
versions. You should see your new kernel. If not,
boot the old kernel and troubleshoot the problem.
This is my current kernel compile philosophy
for this laptop:
- Watchdog timer support is disabled and not used. I got sick of the watchdog timer hard-locking the laptop. Watchdog timer support isn't needed on a laptop: you can just control+alt+delete or hold the power button down if something bad happens.
- Most PCI devices aren't compiled, not even as modules. With a laptop, you're most likely not going to install any PCI/PCIe devices, as you have no slots. So if, for example, an ethernet or wireless card has a USB version, as explained in the kernel help, I only compile in support for hardware specific to this laptop. This helps in that you're not wasting time compiling in hardware support you'll never use. If I needed to support all kinds of random hardware, like on a desktop, I would be making everything modules.
- If I know I will most likely never use something, such as fiber channel, ATM, or internet backbone type networking, I don't compile it in. Again, no sense in compiling things I'll probably never use, it just wastes time. If I run into such a scenario, I keep the default openSUSE kernel on the machine, I can switch to that and adjust later.
- If I can make a selection (such as processor type, etc)
specific to this laptop, I do. No sense in making the
kernel modules and binaries larger for no good reason.
Good luck!