Freeze on shutdown and switch to nvidia graphics


#1

Hi everyone

I’m new to Manjaro (and fairly new to Linux in general) and have been trying to get a stable system for the last 2 weeks without any luck.

I managed to get the installer to work with the combination of free drivers plus setting nouveau.modeset=0. Post installation I had to set that parameter for every boot.

I’m keen to use optimus-manager if possible. I have the latest version installed and I’m now able to boot without any parameters.

However I have 2 issues: shutting down and switching to nvidia graphics.

When I go to shut down, as soon as I click shut down everything freezes. I’m not able to open tty with `control + alt + f2 and I have to hard reset the laptop.

A similar thing happens when switching to nvidia - my laptop completely freezes and I have to hard reset. I’m assuming they are both related, but my lack of experience has been proving an issue. I’ve lost count of the number of reinstalls I’ve done, but I have a timeshift backup of my current system to I can at least restore to this point whenever I break something :grinning:

Also worth noting I fully updated after installing Manjaro. Also I’m not sure if there should be a splash screen when booting, but all I see is a black screen until I get to the desktop.

Result of inxi -Fxz:

System:
  Host: brett-pc Kernel: 4.19.6-1-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.2.1 Desktop: KDE Plasma 5.14.4 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: Micro-Star product: GS63 7RD v: REV:1.0 
  serial: <filter> 
  Mobo: Micro-Star model: MS-16K4 v: REV:1.0 serial: <filter> 
  UEFI: American Megatrends v: E16K4IMS.10E date: 08/16/2017 
Battery:
  ID-1: BAT1 charge: 46.8 Wh condition: 61.0/65.0 Wh (94%) 
  model: MSI BIF0_9 status: Discharging 
CPU:
  Topology: Quad Core model: Intel Core i7-7700HQ bits: 64 type: MT MCP 
  arch: Kaby Lake rev: 9 L2 cache: 6144 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 44944 
  Speed: 3100 MHz min/max: 800/3800 MHz Core speeds (MHz): 1: 3100 
  2: 3100 3: 3100 4: 3101 5: 3100 6: 3101 7: 3100 8: 3100 
Graphics:
  Device-1: Intel vendor: Micro-Star MSI driver: i915 v: kernel 
  bus ID: 00:02.0 
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] 
  vendor: Micro-Star MSI driver: nouveau v: kernel bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.3 driver: modesetting 
  resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 630 (Kaby Lake GT2) 
  v: 4.5 Mesa 18.2.6 direct render: Yes 
Audio:
  Device-1: Intel CM238 HD Audio vendor: Micro-Star MSI 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
  Sound Server: ALSA v: k4.19.6-1-MANJARO 
Network:
  Device-1: Qualcomm Atheros Killer E2500 Gigabit Ethernet 
  vendor: Micro-Star MSI driver: alx v: kernel port: d000 bus ID: 3d:00.0 
  IF: enp61s0 state: down mac: <filter> 
  Device-2: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 
  vendor: Bigfoot Networks driver: ath10k_pci v: kernel port: d000 
  bus ID: 3e:00.0 
  IF: wlp62s0 state: up mac: <filter> 
  Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-10:4 
Drives:
  Local Storage: total: 1.38 TiB used: 7.57 GiB (0.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLW512HMJP-00000 
  size: 476.94 GiB 
  ID-2: /dev/sda vendor: HGST (Hitachi) model: HTS541010B7E610 
  size: 931.51 GiB 
Partition:
  ID-1: / size: 451.32 GiB used: 7.57 GiB (1.7%) fs: ext4 
  dev: /dev/nvme0n1p2 
  ID-2: swap-1 size: 17.11 GiB used: 0 KiB (0.0%) fs: swap 
  dev: /dev/nvme0n1p3 
Sensors:
  System Temperatures: cpu: 50.0 C mobo: N/A gpu: nouveau temp: 511 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 291 Uptime: 3m Memory: 15.55 GiB used: 1.20 GiB (7.7%) 
  Init: systemd Compilers: gcc: 8.2.1 Shell: bash v: 4.4.23 inxi: 3.0.27 

#2

That will not work with optimus-manager. You need the video-nvidia driver, not the nouveau …
Make sure you follow this


#3

Thanks. When installing optimus-manager I was prompted to install video-nvidia drivers which I did.

Could you point me in the direction of the correct driver to install? I’m a little confused with the Manjaro driver options for graphics and the correct way to install this.


#4

Yes, it would do all the necessary scripts for you and install all the files automatically.
Did you reboot after that? Is the service running?
systemctl status optimus-manager.service
if is running, then run:
optimus-manager --switch nvidia
and make some test, or see
glxinfo | grep OpenGL
glxgears


#5

Yep I restarted after installing. I can’t remember if it crashed or not with the reboot though…

systemctl status optimus-manager.service is running, but running optimus-manager --switch nvidia freezes the laptop completely.

Interestingly, after hard resetting when it freezes from running that command it is running in nvidia mode according to glxinfo | grep "server glx vendor string" (taken from the optimus-manager faqs).


#6

So it looks like for whatever reason the video-nvidia drivers didn’t install when going through the process with optimus-manager. Is the correct command to install them sudo mhwd -i pci video-nvidia? And do I need to first remove any other drivers that could cause a conflict/issue?


#7

yes

you can find what drivers are installed with
mhwd -li

Once you install video-nvidia make sure you pass trough what is suggested in the github page, so the files created by mhwd are removed and replaced so the optimus-manager will work.


#8

This shows:

Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2018.08.09               false            PCI
           video-linux            2018.05.04                true            PCI

Do I need to remove video-linux or is that needed for the Intel graphics? I managed to install the nvidia drivers successfully now according to the above.

Thanks for all your help so far :grinning:


#9

Make some tests …

i wish i could be 100% sure, but … since the optimus-manager deals with everything, the switching and so, i think you can leave it for now.


#10

So I was able to successfully switch to nvidia. The screen resolution was tiny but I guess that’s a configuration issue.

However I switched back to Intel and it crashed. Now unable to boot back to the desktop. I’m stuck on Started Load/Save Screen Backlight Brightness of backlight:intel_backlight.

I am able to open another tty session but I don’t know what to do to help identify the issue and get back to the desktop.


#11

From TTY switch back to nvidia … then remove the video-linux … or look why the

failed. I honestly don’t know much about that.


#12

Maybe @Librewish could help.

BTW, the last message on boot doesn’t necessarily means it’s the one that crashed…


#13

have you tried startx in tty
which diaplaymanager are you using
on wiki only lightdm and sddm are supported are discribed


#14

So after some more experimenting and debugging I “think” I have everything pretty much working.
In case it helps others in a similar situation this is what I had to do:

I am now able to switch between graphics cards and reboot/shutdown successfully. The scaling seems smaller on the nvidia card but I’m sure there’s a way in the config to solve this, I just haven’t found it yet…

How would I test to make sure the nvidia card is being used fully when on that mode and not used when on Intel mode?