Setup optimal swap settings when firefox juggles with memory

My laptop runnning 20.04 has only 8GB of RAM but 32GB of swap on NVMe disk.

When RAM usage reaches ~90%, the “Web Content” processes of Firefox 79.0 (only those which are greedy in RAM such as social networks) start to juggle with memory pretty fast, even if the guilty tabs are inactive, and even if I finally free huge quantity of RAM to reach a reasonable percentage of usage as shown in the screenshot below.

Firefox juggles with chunks of RAM

My issue with this behaviour is that it slows down the whole system on the long term. THe only workaround I found is to open many apps to force swapping, and then close them so that RAM is freed but swap rate remains high.

I have 2 wishes:

  • How can I tell the kernel to swap earlier? At least Firefox wouldn’t have to deal with a few % of free memory. For instance just like the Windows pagefile strategy which seems to swap pages way before the Linux kernel does. My swapiness is currently 1, which looks the less terrible, I tried high values such as 60, 90, 100: it does not swap earlier but it’s definitely slower.
  • How can I prevent “Firefox Web Content” from juggling with RAM chunks for no reason? Not only it uses 100% of 1 CPU a few seconds for each change, but also the full system becomes slow a few seconds, that’s really nasty. Note: I am not wishing it could use less RAM, first because all browsers are RAM-greedy and second because I have 32GB of swap which can surely host pages from tabs I don’t use so much. So I just want it to stop freeing memory that it will request again 10 seconds later.

Go to Source
Author: myoan

Where to find documentation about the device tree pinctrl parameters?

I’m trying to add a new ethernet device to an existing stm32mp1 board, but i’m a bit lost in the device tree section.

What i found so far:

In the board.dts file, i could find the pins which connects to the ethernet phy:

&pinctrl {
        ethernet0_rgmii_pins: rgmii-0 {
                pins1 {
                        pinmux = <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
                                 <STM32_PINMUX('B', 12, AF11)>, /* ETH_RGMII_TXD0 */
                                 <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
                                 <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
                                 <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
                                 <STM32_PINMUX('G', 11, AF11)>, /* ETH_RGMII_TX_CTL */
                                 <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */
                        bias-disable;
                        drive-push-pull;
                        slew-rate = <2>;
                };

                pins2 {
                        pinmux = <STM32_PINMUX('A', 2, AF11)>; /* ETH_MDIO */
                        bias-disable;
                        drive-push-pull;
                        slew-rate = <0>;
                };

                pins3 {
                        pinmux = <STM32_PINMUX('C', 4, AF11)>, /* ETH_RGMII_RXD0 */
                                 <STM32_PINMUX('C', 5, AF11)>, /* ETH_RGMII_RXD1 */
                                 <STM32_PINMUX('H', 6, AF11)>, /* ETH_RGMII_RXD2 */
                                 <STM32_PINMUX('H', 7, AF11)>, /* ETH_RGMII_RXD3 */
                                 <STM32_PINMUX('A', 1, AF11)>, /* ETH_RGMII_RX_CLK */
                                 <STM32_PINMUX('A', 7, AF11)>; /* ETH_RGMII_RX_CTL */
                        bias-disable;
                };
        };
};

&ethernet0 {
        status = "okay";
        pinctrl-0 = <&ethernet0_rmii_pins>;
        pinctrl-names = "default";
        phy-mode = "rgmii";
        phy-handle = <&phy0>;
        st,eth_clk_sel = <1>;
        max-speed = <1000>;
        clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx", "eth-ck", "syscfg-clk", "ethstp";
        clocks = <&rcc ETHMAC>, <&rcc ETHTX>, <&rcc ETHRX>, <&rcc ETHCK_K>, <&rcc SYSCFG>, <&rcc ETHSTP>;

        mdio0 {
                #address-cells = <1>;
                #size-cells = <0>;
                compatible = "snps,dwmac-mdio";
                phy0: ethernet-phy@0 {
                        reg = <0>;
                        ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
                        ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
                        ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
                        ti,dp83867-rxctrl-strap-quirk;
                };
        };
};

For example in the pins1 section the following pins are connected:

pinmux = <STM32_PINMUX('G', 4, AF11)>, /* ETH_RGMII_GTX_CLK */
         <STM32_PINMUX('B', 12, AF11)>, /* ETH_RGMII_TXD0 */
         <STM32_PINMUX('G', 14, AF11)>, /* ETH_RGMII_TXD1 */
         <STM32_PINMUX('C', 2, AF11)>, /* ETH_RGMII_TXD2 */
         <STM32_PINMUX('E', 2, AF11)>, /* ETH_RGMII_TXD3 */
         <STM32_PINMUX('G', 11, AF11)>, /* ETH_RGMII_TX_CTL */
         <STM32_PINMUX('C', 1, AF11)>; /* ETH_MDC */

But how and where is the order defined? How is it passed later to the phy device driver? What if i change the phy from rgmii to rmii? Then the number of pins reduce, but in what order do i have to place the pins?

Sadly i just can’t find any documentation to it, maybe someone can help me out here.

Thanks.

Go to Source
Author: hberg539

Is the 5.3 linux kernel fully supported as LTS on Ubuntu 18.04?

I’m a bit confused about Ubuntu’s announcement to switch to a Rolling Kernel.

  1. I’ve noticed some of my Ubuntu 18.04 servers are now running the 5.3 kernel, which the blog post seems to imply is the linux-aws-edge kernel, or not for production workloads. Is that the case, or is the rolling kernel installing https://packages.ubuntu.com/bionic/linux-aws vs. the linux-aws-edge? I’m not sure because I see both linux-aws-edge (5.3.0.1019.20) and linux-aws (5.3.0.1019.20) on https://packages.ubuntu.com/bionic.

  2. Even if this is the production-ready 5.3 kernel being installed by the new Rolling Kernel model, what does this do to LTS support? It appears to break LTS support see the “Kernel support schedule” section, am I interpreting this right?

  3. Why would Canonical make this opt-out vs. opt-in?

Go to Source
Author: stantonk

Install driver rtl8814au on ubuntu 20.04

Install driver rtl8814au on ubuntu 20.04

Based on this

Install driver rtl8814au on ubuntu 18.04

I installed manually (make && make install) the driver when I had the kernel

$ uname -r
5.4.0-26-generic

Now, ubuntu 20.04 wants to install the new one:

linux-image-5.4.0-29-generic

I did it before (upgrade the system then, the kernel) and the driver stopped to work, even I installed thousand times, was impossible to up the driver which logical name is “wlx50c4ddcf488e”.

The installation I made:

$ sudo apt install build-essential
$ sudo apt install bc
$ sudo apt install linux-headers-`uname -r`
$ sudo apt install git

$ git clone https://github.com/aircrack-ng/rtl8812au.git

$ cd rtl8812au
$ make && sudo make install

Does anyone has idea about what can I do? Now, I cannot upgrade my system without losing the wireless connection.

Thank a lot.

Go to Source
Author: Ibringpies