[Optimus Manager] Switching to Nvidia leads to Blank Screen

Recently I wasn’t able to connect my laptop to my TV via HDMI, so I created this topic, and I was told to try optimus-manager.

So I followed this guide and I did not face any boot issues, and my laptop works fine with the Intel card, but when I switch to Nvidia, the display goes blank, and I’d be left with the only option to enter a tty and reboot.

What I’ve tried:

  • I used Nouveau mode to switch GPU’s but my DM goes blank after logging out.
  • Tried bbswitch, but it shows a warning “The bbswitch module does not seem to be available for the current kernel”, and it logs back with the intel card.

Here’s my optimus-manager configuration file

>>> cat /etc/optimus-manager/optimus-manager.conf                            
[intel]
DRI=3
accel=
driver=modesetting
modeset=yes
tearfree=

[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
ignore_abi=no
modeset=yes
options=overclocking

[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=intel
startup_auto_extpower_mode=nvidia
startup_mode=intel
switching=bbswitch

And this is inxi

>>> inxi -Fazy                                                               
System:
  Kernel: 5.8.6-1-MANJARO x86_64 bits: 64 compiler: N/A 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.8-x86_64 
  root=UUID=56d77d09-dec0-4408-b59c-9e65207adba1 rw quiet apparmor=1 
  security=apparmor resume=UUID=8a55e655-a595-4619-847e-091f12bb98da 
  udev.log_priority=3 
  Desktop: GNOME 3.36.6 tk: GTK 3.24.23 wm: gnome-shell dm: GDM 3.36.3 
  Distro: Manjaro Linux 
Machine:
  Type: Laptop System: HP product: HP Pavilion Notebook v: N/A 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 84F8 v: 08.11 serial: <filter> UEFI: AMI v: F.29 
  date: 07/17/2020 
Battery:
  ID-1: BAT0 charge: 46.8 Wh condition: 52.7/52.7 Wh (100%) volts: 12.9/11.6 
  model: HP Primary type: Li-ion serial: N/A status: Charging 
CPU:
  Topology: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP 
  arch: Kaby Lake family: 6 model-id: 9E (158) stepping: A (10) microcode: D6 
  L2 cache: 9216 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 52815 
  Speed: 900 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 900 2: 900 3: 901 
  4: 900 5: 899 6: 899 7: 900 8: 900 9: 900 10: 900 11: 900 12: 900 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  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 
Graphics:
  Device-1: Intel UHD Graphics 630 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 chip ID: 8086:3e9b 
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Hewlett-Packard 
  driver: N/A alternate: nouveau, nvidia_drm, nvidia bus ID: 01:00.0 
  chip ID: 10de:1c8d 
  Device-3: Chicony HP Wide Vision HD type: USB driver: uvcvideo bus ID: 1-6:4 
  chip ID: 04f2:b56d 
  Display: x11 server: X.org 1.20.8 compositor: gnome-shell 
  driver: modesetting unloaded: intel alternate: fbdev,vesa 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.1.7 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci 
  bus ID: 00:1f.3 chip ID: 8086:a348 
  Sound Server: ALSA v: k5.8.6-1-MANJARO 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8169 v: kernel port: 4000 bus ID: 02:00.0 
  chip ID: 10ec:8168 
  IF: eno1 state: down mac: <filter> 
  Device-2: Realtek RTL8822BE 802.11a/b/g/n/ac WiFi adapter 
  vendor: Hewlett-Packard driver: rtw_8822be v: N/A modules: rtw88_8822be 
  port: 3000 bus ID: 03:00.0 chip ID: 10ec:b822 
  IF: wlo1 state: up mac: <filter> 
Drives:
  Local Storage: total: 585.00 GiB used: 43.52 GiB (7.4%) 
  SMART Message: Required tool smartctl not installed. Check --recommends 
  ID-1: /dev/sda vendor: Samsung model: MZNLN128HAHQ-000H1 size: 119.24 GiB 
  block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> 
  rev: 3H3Q scheme: GPT 
  ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB 
  block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> 
  rev: 023 scheme: GPT 
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci 
  v: 3.0 port: 6060 bus ID: 00:17.0 chip ID: 8086.282a rev: 10 
Partition:
  ID-1: / raw size: 205.27 GiB size: 201.55 GiB (98.19%) 
  used: 43.51 GiB (21.6%) fs: ext4 dev: /dev/sdb4 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 4.00 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sdb3 
Sensors:
  System Temperatures: cpu: 60.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 361 Uptime: 37m Memory: 7.59 GiB used: 2.02 GiB (26.7%) 
  Init: systemd v: 246 Compilers: gcc: 10.2.0 Packages: 1288 pacman: 1285 
  lib: 308 flatpak: 0 snap: 3 Shell: Zsh v: 5.8 running in: gnome-terminal 
  inxi: 3.1.05 

My objective however is still to connect my HDMI to my TV screen, which still doesn’t seem to work. But, the same HDMI cable and monitor work when connected to the same laptop running Windows.

Open to provide any more info if needed, thanks in advance!

Also, when I was trying to switch using Nouveau, I tried running systemctl status optimus-manager.service in the tty, and the this was the last line:

[33742] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'intel'}

Hello,

Nor quite experienced with Optimus-Manager, but from what i gathered it requires Nvidia Drivers to work and in most cases to add modprobe.blacklist=nouveau as kernel boot parameter. Have you tried that when using the Nvidia drivers.
When switching to Nouveau, have you checked is was still blacklisted or not in /etc/modprobe.d/ file stou have there?
If you have trouble to switch to Nvidia GPU then i guess you missed some step in the tutorial you followed.
Since Optimus-Manager also requires to disable bumblebeed.service … i don’t know if you did that too.

This is my /etc/modprobe.d file and it says that Nouveau is blacklisted:

>>> cat mhwd-gpu.conf                                          
##
## Generated by mhwd - Manjaro Hardware Detection
##
 
blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm
options nvidia "NVreg_DynamicPowerManagement=0x02"

And about bumblebee, i have never installed it, and it doesn’t exist in my system, so i don’t think that’s the problem

Ok, but i see a problem here. If you tested nouveau with that file, then it would not work. Also, to my knowledge with the

then NVIDIA GPU driver will allow the GPU to go into its lowest power state when no applications are running that use the nvidia driver stack. Whenever an application requiring NVIDIA GPU access is started, the GPU is put into an active state. In other words, you have to use prime-run <application> to use the dGPU with it. Are you sure if that option allows then to completely switch to dGPU and is not only for render-offload?

Maybe @openminded and @michaldybczak pass by with their hands on experience :slight_smile:

So should I try commenting that line?

Not sure what driver are you using right now. From here:

is like none.
Then the alternate is even more confusing for me. I would go step by step from the linked tutorial and see what is different. You still should have better results with the Nvidia driver than nouveau. But, did you also checked if that HP laptop doesn’t require some custom kernel boot parameters related to ACPI, as described here:

Are you sure you have installed the nvidia propietary drivers? I have a 1050 Ti and i can connect to the TV just fine,you need to install the video-hybrid-intel-nvidia-450xx-prime drivers,you can find it in hardware configuration,if you are using KDE is in the settings

in my inxi,my driver appears like this

Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Dell
driver: nvidia v: 450.66 alternate: nouveau,nvidia_drm bus ID: 01:00.0
chip ID: 10de:1c8c

I’m a noob when it comes to linux, but I’m pretty sure I didn’t set any parameters related to ACPI, this is what I’m using:

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor resume=UUID=8a55e655-a595-4619-847e-091f12bb98da udev.log_priority=3"

The driver I’m using is video-hybrid-intel-nvidia-prime-440x. And about the HP laptop, I’m not sure if I need specific kernel parameters, but I do see ACPI errors in my journalctl, I can attach them if you want to. I’m attaching mhwd li:

>>> mhwd -li                                                   
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-440xx-prime            2019.10.25               false            PCI
     video-modesetting            2020.01.13                true            PCI
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

The 440 don’t allow the HDMI to work,that was fixed in the 450.

Update to the 450.

1 Like

I see, is there a clean way to uninstall 440 and install 450?

I don’t know how to do it in the terminal way,but in the gui you just right click the 440 driver and select remove,then right click on the 450 and select install,then you should reboot.

@XRaTiX That did the trick, I’ve upgraded to 450xx and I’m able to connect to my TV now, and xrandr -q outputs this:

>>> xrandr -q                                                                

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
...
HDMI-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-2 connected (normal left inverted right x axis y axis)
...

However I still can’t switch to nvidia using optimus-manager, it still blacks out.

>>> inxi -G                                                                  
Graphics:
  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] driver: nouveau 
  v: kernel 
  Device-3: Chicony HP Wide Vision HD type: USB driver: uvcvideo 
  Display: x11 server: X.org 1.20.8 driver: modesetting 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 20.1.7

Please help!

Intel is barely keeping up with the display, I see a lot of breaks in the display when I scroll.

You don’t need to switch to nvidia anymore to use the HDMI port,in the 450 driver you can now use hybrid mode the HDMI port,try using that one.

One note,i don’t know why still mark that you are using nouveau,thats weird.

Just tried hybrid mode and that blacks out as well. I’m using Nouveau in the swtiching method.

Yeah me too, anyways @XRaTiX thanks man I’m atleast happy that the HDMI works, have been at the HDMI thingy for a week now. But I’d really like to use the 4GB Nvidia card, somebody help!

Also, I’mn not able to open nvidia-settings which gives me even more reason to believe that something isn’t right with my drivers, should I start a new thread perhaps?

>>> nvidia-settings                                                          

ERROR: NVIDIA driver is not loaded


ERROR: Unable to load info from any available system

Maybe thats why? you don’t have nouveau drivers so you should not use nouveau method,try using bbswitch method.

EDIT: Correction,you have nouveau drivers,but you are not using the nvidia propietary drivers.

There is a explanation in the optimus-manager wiki of what does each option,normally bbswitch works for most laptops,but try with bbswitch.

I just tried using bbswitch and rebooting caused my HDMI to stop working again :man_facepalming:

I’ve installed bbswitch, but there is still a warning that pops up when I try to switch “The bbswitch module does not seem to be available for the current kernel”, and it logs back with the intel card.

Did you install the linux58-bbswitch?,that the one you should use because you have kernel 5.8

I think I broke my DM, I uninstalled linux414-bbswitch and installed linux58-bbswitch now I’m not able to boot into a DM…

Unable to open a tty either, tried at keys Ctrl + Alt + F1 to F12 …