RStudio freezes when used only on laptop but not with monitor

Hi. I’m using RStudio but am finding it freezes when I’m using my laptop without a monitor plugged in. Freezing happens sporadically but can be triggered if I try to resize the window or minimise one of the panels in the RStudio app. The whole app window goes white and I can only close the window from the task manager. Strange thing is that the issue does not happen when my monitor is plugged in. Monitor is standard HD (1920x1080), laptop is 4k (3840x2160). Not sure how to troubleshoot this. I’ve tried changing the display settings, reinstalling, no joy. Any ideas? Running GNOME.

:+1: Welcome to Manjaro! :+1:

Please read this:

and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies…

An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)


P.S. If you enter a bit more details in your profile, we can also see which Desktop Environment you’re using, which CPU/GPU you have, …

Hi @Fabby thanks for the pointers. Sorry for the slow reply - I thought I’d get notified if someone replied but didn’t for some reason. Output of inxi --admin --verbosity=7 --filter --no-host --width pasted below.

I’m not sure what else would be useful… let me know if I can provide more info.

  Kernel: 5.4.80-2-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 
  root=UUID=8643e13d-67fa-4e6a-a82c-e45ef5ea0cb9 rw apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: GNOME 3.38.1 tk: GTK 3.24.23 wm: gnome-shell dm: GDM 3.38.2 
  Distro: Manjaro Linux 
  Type: Convertible System: HP product: HP Spectre x360 Convertible 13-ap0xxx 
  v: N/A serial: <filter> Chassis: type: 31 serial: <filter> 
  Mobo: HP model: 8514 v: 09.68 serial: <filter> UEFI: AMI v: F.34 
  date: 10/08/2019 
  ID-1: BAT0 charge: 56.7 Wh condition: 56.7/56.7 Wh (100%) volts: 16.3/15.4 
  model: HP Primary type: Li-ion serial: N/A status: Discharging 
  Device-1: hid-0018:04F3:2810.0001-battery model: ELAN2514:00 04F3:2810 
  serial: N/A charge: N/A status: N/A 
  RAM: total: 15.30 GiB used: 1.63 GiB (10.7%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
  Info: Quad Core model: Intel Core i7-8565U bits: 64 type: MT MCP 
  arch: Kaby Lake family: 6 model-id: 8E (142) stepping: B (11) microcode: DE 
  L2 cache: 8192 KiB bogomips: 32012 
  Speed: 800 MHz min/max: 400/4600 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 
  4: 800 5: 800 6: 800 7: 801 8: 800 
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_capabilities 
  arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc 
  cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms 
  est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window 
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm 
  mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat 
  pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand 
  rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 
  ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme 
  vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr 
  Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
  Type: l1tf status: Not affected 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:3ea0 
  Device-2: Quanta HP Wide Vision FHD Camera type: USB driver: uvcvideo 
  bus ID: 1-5:2 chip ID: 0408:5251 serial: <filter> 
  Display: x11 server: 1.20.9 compositor: gnome-shell driver: intel 
  unloaded: modesetting alternate: fbdev,vesa resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (WHL GT2) v: 4.6 Mesa 20.2.3 
  direct render: Yes 
  Device-1: Intel Cannon Point-LP High Definition Audio 
  vendor: Hewlett-Packard driver: snd_hda_intel v: kernel 
  alternate: snd_soc_skl,snd_sof_pci bus ID: 00:1f.3 chip ID: 8086:9dc8 
  Sound Server: ALSA v: k5.4.80-2-MANJARO 
  Device-1: Intel Cannon Point-LP CNVi [Wireless-AC] driver: iwlwifi v: kernel 
  port: 3000 bus ID: 00:14.3 chip ID: 8086:9df0 
  IF: wlp0s20f3 state: up mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
  Local Storage: total: 953.87 GiB used: 603.30 GiB (63.2%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 vendor: Toshiba model: N/A size: 953.87 GiB block size: 
  physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> 
  rev: AAHA4102 scheme: GPT 
  Message: No Optical or Floppy data was found. 
  Message: No RAID data was found. 
  ID-1: / raw size: 953.57 GiB size: 937.60 GiB (98.33%) 
  used: 603.30 GiB (64.3%) fs: ext4 dev: /dev/nvme0n1p2 label: N/A 
  uuid: 8643e13d-67fa-4e6a-a82c-e45ef5ea0cb9 
  ID-2: /boot/efi raw size: 300.0 MiB size: 299.4 MiB (99.80%) 
  used: 280 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 label: N/A uuid: 92FD-2E54 
  Alert: No Swap data was found. 
  Message: No unmounted partitions found. 
  Hub: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 speed: 480 Mb/s 
  chip ID: 1d6b:0002 
  Device-1: 1-5:2 info: Quanta HP Wide Vision FHD Camera type: Video 
  driver: uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s chip ID: 0408:5251 
  serial: <filter> 
  Device-2: 1-9:3 info: Synaptics type: <vendor specific> driver: N/A 
  interfaces: 1 rev: 2.0 speed: 12 Mb/s chip ID: 06cb:00bb serial: <filter> 
  Device-3: 1-10:4 info: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) 
  type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  chip ID: 8087:0aaa 
  Hub: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.1 speed: 10 Gb/s 
  chip ID: 1d6b:0003 
  Hub: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 speed: 480 Mb/s 
  chip ID: 1d6b:0002 
  Hub: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip ID: 1d6b:0003 
  System Temperatures: cpu: 47.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
  Processes: 272 Uptime: 18m Init: systemd v: 246 Compilers: gcc: 10.2.0 
  alt: 6 clang: 11.0.0 Packages: 1788 apt: 0 pacman: 1779 lib: 450 rpm: 0 
  flatpak: 0 snap: 9 Shell: Bash v: 5.0.18 running in: gnome-terminal 
  inxi: 3.1.08 

When the external Monitor is plugged in, is the internal screen turned off and not being in use?

If yes, it could be you’re running into memory problems as:

the kernel’s OOM (Out-Of-Memory) Killer doesn’t work properly when swap is disabled and if you run OOM, the system just freezes and the internal screen uses much more memory at UHD Resolution compared to only your monitor at FHD.

to verify, keep this open in a terminal:

watch --interval=5 "free --human"

And please: enable swap (or add more memory) if my suspicion is correct.

Hi @Fabby, thanks for the reply, I don’t think that’s the problem though. There is no shortage of memory (16GB) and I’ve monitored the memory when RStudio freezes - there is no change. Laptop screen is on when external monitor is plugged in. This is what happens upload://v77GYxcQLvpT3bzOvuFHBVQ8naM.gif

I.E. Both monitors are active in non-mirror mode when this happens or not?


When the monitor is plugged in I have both the laptop screen and the monitor in use (not mirrored). But just to be clear: RStudio freezes when there is no external monitor - it freezes when it is just the laptop screen. When the external monitor is plugged in RStudio does not freeze. Could it be an issue with the resolution? Laptop is 4k (3840x2160), monitor is standard HD (1920x1080).

Then I have no further bright ideas: I thought you closed the laptop lid and it would free up the laptop GPU memory and then not freeze which does not seem to be the case.