I can't enable the HDMI output in laptop with opitmus

Hi!
I bought a new laptop, DELL Inspiron 15 7000 Gaming and I can’t enable the HDMI output.

Any help is welcome

INFO:
Opensuse Leap 42.3 (clean install)
Plasma: 5.8.7
Kernel: 4.4.79-19-default
Video: Intel / Nvidia 1050 Ti (4GB)

/var/log/Xorg.0.log

xrandr -q

xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1080, current 1920 x 1080, maximum 1920 x 1080
default connected primary 1920x1080+0+0 0mm x 0mm
   1920x1080     77.00*

lspci | egrep ‘VGA|3D’

00:02.0 VGA compatible controller: Intel Corporation Device 591b (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1c8c (rev ff)

systemctl status bumblebeed

● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since lun 2017-08-21 02:21:53 -05; 13min ago
 Main PID: 1337 (bumblebeed)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/bumblebeed.service
           └─1337 /usr/sbin/bumblebeed

ago 21 02:21:53 linux-r6jt systemd[1]: Started Bumblebee C Daemon.
ago 21 02:21:53 linux-r6jt bumblebeed[1337]: [    8.699982] [INFO]/usr/sbin/bumblebeed 3.2.1 started

zypper lr -d

#  | Alias                     | Nombre                                  | Habilitado | Comprobación GPG | Actualizar | Prioridad | Tipo   | URI                                                                          | Servicio
---+---------------------------+-----------------------------------------+------------+------------------+------------+-----------+--------+------------------------------------------------------------------------------+---------
 1 | bumblebee                 | bumblebee                               | Si         | (r ) Si          | Si         |   80      | rpm-md | http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Leap_42.3/ |         
 2 | openSUSE-Leap-42.3-0      | openSUSE-Leap-42.3-0                    | No         | ----             | ----       |   99      | yast2  | hd:///?device=/dev/disk/by-id/usb-hp_v245o_070D59582459A246-0:0-part2        |         
 3 | packman                   | packman                                 | Si         | (r ) Si          | Si         |   70      | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_42.3/           |         
 4 | repo-debug                | openSUSE-Leap-42.3-Debug                | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/debug/distribution/leap/42.3/repo/oss/          |         
 5 | repo-debug-non-oss        | openSUSE-Leap-42.3-Debug-Non-Oss        | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/debug/distribution/leap/42.3/repo/non-oss/      |         
 6 | repo-debug-update         | openSUSE-Leap-42.3-Update-Debug         | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/debug/update/leap/42.3/oss/                     |         
 7 | repo-debug-update-non-oss | openSUSE-Leap-42.3-Update-Debug-Non-Oss | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/debug/update/leap/42.3/non-oss/                 |         
 8 | repo-non-oss              | openSUSE-Leap-42.3-Non-Oss              | Si         | (r ) Si          | Si         |   99      | yast2  | http://download.opensuse.org/distribution/leap/42.3/repo/non-oss/            |         
 9 | repo-oss                  | openSUSE-Leap-42.3-Oss                  | Si         | (r ) Si          | Si         |   99      | yast2  | http://download.opensuse.org/distribution/leap/42.3/repo/oss/                |         
10 | repo-source               | openSUSE-Leap-42.3-Source               | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/source/distribution/leap/42.3/repo/oss/         |         
11 | repo-source-non-oss       | openSUSE-Leap-42.3-Source-Non-Oss       | No         | ----             | ----       |   99      | NONE   | http://download.opensuse.org/source/distribution/leap/42.3/repo/non-oss/     |         
12 | repo-update               | openSUSE-Leap-42.3-Update               | Si         | (r ) Si          | Si         |   99      | rpm-md | http://download.opensuse.org/update/leap/42.3/oss/                           |         
13 | repo-update-non-oss       | openSUSE-Leap-42.3-Update-Non-Oss       | Si         | (r ) Si          | Si         |   99      | rpm-md | http://download.opensuse.org/update/leap/42.3/non-oss/                       |

rpm -qa | grep kernel

kernel-default-4.4.76-1.1.x86_64
kernel-source-4.4.79-19.1.noarch
patterns-openSUSE-devel_kernel-20170518-6.1.x86_64
kernel-firmware-20170530-9.1.noarch
kernel-devel-4.4.79-19.1.noarch
kernel-default-4.4.79-19.1.x86_64
kernel-default-devel-4.4.79-19.1.x86_64
kernel-syms-4.4.79-19.1.x86_64
kernel-macros-4.4.79-19.1.noarch

rpm -qa | grep nvidia

nvidia-bumblebee-32bit-375.66-1.1.x86_64
nvidia-bumblebee-375.66-1.1.x86_64

glxspheres

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x1a4
Context is Direct
OpenGL Renderer: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
34.686275 frames/sec - 38.709883 Mpixels/sec
34.755700 frames/sec - 38.787361 Mpixels/sec
36.524304 frames/sec - 40.761123 Mpixels/sec
36.885706 frames/sec - 41.164448 Mpixels/sec
35.982285 frames/sec - 40.156230 Mpixels/sec
35.188890 frames/sec - 39.270801 Mpixels/sec
37.165416 frames/sec - 41.476604 Mpixels/sec
36.637231 frames/sec - 40.887150 Mpixels/sec

optirun glxspheres

Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GTX 1050 Ti/PCIe/SSE2
187.472601 frames/sec - 209.219422 Mpixels/sec
189.738145 frames/sec - 211.747770 Mpixels/sec
180.724968 frames/sec - 201.689064 Mpixels/sec
188.873463 frames/sec - 210.782785 Mpixels/sec
185.966571 frames/sec - 207.538693 Mpixels/sec
188.303382 frames/sec - 210.146575 Mpixels/sec
184.786172 frames/sec - 206.221368 Mpixels/sec
179.954157 frames/sec - 200.828839 Mpixels/sec

optirun nvidia-smi

Mon Aug 21 22:19:12 2017                                                                                                                                                                                                                                                       
+-----------------------------------------------------------------------------+                                                                                                                                                                                                
| NVIDIA-SMI 375.66                 Driver Version: 375.66                    |                                                                                                                                                                                                
|-------------------------------+----------------------+----------------------+                                                                                                                                                                                                
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |                                                                                                                                                                                                
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |                                                                                                                                                                                                
|===============================+======================+======================|                                                                                                                                                                                                
|   0  GeForce GTX 105...  Off  | 0000:01:00.0     Off |                  N/A |                                                                                                                                                                                                
| N/A   45C    P0    N/A /  N/A |      6MiB /  4038MiB |      0%      Default |                                                                                                                                                                                                
+-------------------------------+----------------------+----------------------+                                                                                                                                                                                                
                                                                                                                                                                                                                                                                               
+-----------------------------------------------------------------------------+                                                                                                                                                                                                
| Processes:                                                       GPU Memory |                                                                                                                                                                                                
|  GPU       PID  Type  Process name                               Usage      |                                                                                                                                                                                                
|=============================================================================|                                                                                                                                                                                                
|    0      4450    G   Xorg                                             6MiB |                                                                                                                                                                                                
+-----------------------------------------------------------------------------+

Also, when I run: optirun nvidia-xconfig --query-gpu-info
with the HDMI cable (my TV):

Number of GPUs: 1

GPU #0:
  Name      : GeForce GTX 1050 Ti
  UUID      : GPU-045745ff-d31d-e9da-b426-e5d4f2748786
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 1

  Display Device 0 (TV-0):
      EDID Name             : SAMSUNG
      Minimum HorizSync     : 15.000 kHz
      Maximum HorizSync     : 81.000 kHz
      Minimum VertRefresh   : 24 Hz
      Maximum VertRefresh   : 75 Hz
      Maximum PixelClock    : 594.000 MHz
      Maximum Width         : 4096 pixels
      Maximum Height        : 2160 pixels
      Preferred Width       : 3840 pixels
      Preferred Height      : 2160 pixels
      Preferred VertRefresh : 30 Hz
      Physical Width        : 890 mm
      Physical Height       : 500 mm

without the HDMI cable (only the laptop screen):

Number of GPUs: 1

GPU #0:
  Name      : GeForce GTX 1050 Ti
  UUID      : GPU-045745ff-d31d-e9da-b426-e5d4f2748786
  PCI BusID : PCI:1:0:0

  Number of Display Devices: 0

It’s a Kaby Lake machine, with Leap you will have to install drm-kmp-default since the old 4.4 Kernel doesn’t support the Kaby Lake GPU OOTB.
You’re currently running a simple frambuffer without hardware accel.

OK, I upgraded to Kernel 4.12.8-1

With the nouveau driver is the same, the HDMI not works.

My new xorg

Maybe I must install the official nvidia driver + bumblebee again?

As a preface, Bumblebee is not supported in this forum as most people hanging around here don’t use it.
The supported way would be to use PRIME.
Changing kernels, you should reinstall the nvidia driver.
Now to your problem:
Your hardware is a mixed Optimus setup, i.e. the internal display is connected to the intel GPU and the HDMI is connected to the Nvidia GPU. This doesn’t work OOTB with Bumblebee, some extra work has to be done:
[url]https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup[/url]