Make optimus laptop works (again) with nouveau

Hello,

Configuring screens can be a nightmare…

As said in a previous post, I tried to make an ASUS N550 laptop (optimus) works with the proprietary nvidia driver, but failed.

But trying to revert to nouveau as more difficult than expected and finally the optirun option works worst than standard - glxsphere runs slower with optirun than without!!

Not easy to setup and understand.

Initially (yesterday :-), optirun glxspheres run at 160 frames / s approx, now at 32 :frowning:

sept. 24 18:03:17 linux-owxt.suse bumblebeed[1744]:   512.732838] [ERROR][XORG] (EE) NOUVEAU(0): Error initialising acceleration.  ...oAccel
sept. 24 18:03:17 linux-owxt.suse bumblebeed[1744]:   512.732841] [ERROR][XORG] (EE) AIGLX: reverting to software rendering
sept. 24 18:03:17 linux-owxt.suse bumblebeed[1744]:   512.732846] [ERROR][XORG] (EE) kbd: <default keyboard>: failed to set us as f...evice)
sept. 24 18:03:17 linux-owxt.suse bumblebeed[1744]:   512.732850] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface ve...denied
sept. 24 18:04:18 linux-owxt.suse bumblebeed[1744]:   573.412734] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface ve...denied
sept. 24 18:04:18 linux-owxt.suse bumblebeed[1744]:   573.412753] [ERROR][XORG] (EE) NOUVEAU(0): Failed to initialise context objec...E0 (0)
sept. 24 18:04:18 linux-owxt.suse bumblebeed[1744]:   573.412756] [ERROR][XORG] (EE) NOUVEAU(0): Error initialising acceleration.  ...oAccel
sept

of course, software rendering…

How can I get back?

then, How can I prevent screen from looking like this:

http://www.cjoint.com/doc/17_09/GIyngfoJXLs_IMG-20170924-145554.jpg

well it happens mostly with kpat… but …

thanks
jdd

Hello,

I still do not have an answer, and work as much as I can to solve it. I write my experience here:

http://dodin.org/wiki/pmwiki.php?n=Doc.OptimusVideo

Right now, I have 42.3 running in graphic mode but only in 1366x768 (I used to be 1920x1080) and optimus do not work, or only in software, so very slow.

I try to fix this (when I could reinstall the distrib), because it’s not the first time I have similar problem and I would like to solve it cleanly.

So there are two, may be unrelated problems: how to get again 1920x1080 and how to make bumblebee works. The later probably first.

Just at boot, I have


# systemctl status bumblebeed -l
● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since mar. 2017-09-26 11:18:40 CEST; 29s ago
 Main PID: 2021 (bumblebeed)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/bumblebeed.service
           └─2021 /usr/sbin/bumblebeed

sept. 26 11:18:40 linux-owxt.suse systemd[1]: Started Bumblebee C Daemon.
sept. 26 11:18:40 linux-owxt.suse bumblebeed[2021]:     6.021445] [INFO]/usr/sbin/bumblebeed 3.2.1 started

if I run optirun glxspheres, I get


# systemctl status bumblebeed -l
● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since mar. 2017-09-26 11:18:40 CEST; 1min 9s ago
 Main PID: 2021 (bumblebeed)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/bumblebeed.service
           └─2021 /usr/sbin/bumblebeed

sept. 26 11:18:40 linux-owxt.suse systemd[1]: Started Bumblebee C Daemon.
sept. 26 11:18:40 linux-owxt.suse bumblebeed[2021]:     6.021445] [INFO]/usr/sbin/bumblebeed 3.2.1 started
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989029] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989058] [ERROR][XORG] (EE) NOUVEAU(0): Failed to initialise context object: COPY_NVE0 (0)
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989060] [ERROR][XORG] (EE) NOUVEAU(0): Error initialising acceleration.  Falling back to NoAccel
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989063] [ERROR][XORG] (EE) AIGLX: reverting to software rendering
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989069] [ERROR][XORG] (EE) kbd: <default keyboard>: failed to set us as foreground pgrp (Inappropriate ioctl for device)
sept. 26 11:19:36 linux-owxt.suse bumblebeed[2021]:    61.989073] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

and dmesg says:

http://susepaste.org/28525004

any hint?

thanks
jdd

I still don’t find any solution and feel a bit desperate… So I will probably stop some days and come back later. Gladfully my work needing optirun is done for now.

Brief summary:

  • I buy second hand this ASUS N550 for a reasonable price two weeks ago

  • I replaced the windows 250 GB ssd by a 480Gb ssd with Leap 42.3 (fresh install)

  • I was a bit disappointed to see the screen couldn’t be set to full HD and noticed it was an optimus one

  • installed bumblebee, played some time with it

  • tested various external screens (TV set). One of them was a 24" screen I already know to be reluctant to display 1920x1080 but able to do, xrandr permitting and I could make it, I have it right now in front of me, full HD.

  • At some time during experiment, my laptop screen suddenly turned to work in full 1920x1080 with xrandr and nouveau. Good Surprise! optirun worked also to a bit more than twice the intel speed, so good. I could finish my video compiling work at full speed.

  • some days ago, some kind of update and I wanted to see if the proprietary driver could make a bit more speed. Deadly! Since then I can’t anymore make optirun work and my laptop screen is down to 1366x768.

One thing I noted and is curious. When it worked, my screen name was eDP-1. Now its eDP1 (without “-”). I even have this on my history:

xrandr --output eDP-1 --mode 1920x1080_60.00 --pos 1920x0

and now I have this:


> xrandr 
Screen 0: minimum 8 x 8, current 3286 x 1080, maximum 32767 x 32767
eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   1366x768      60.06*+
(...)

so what is the update that Changed eDP-1 by eDP1 ?

thanks
jdd

Partial success. It took some time, but the openSUSE KOTD saved my life, at least partially.

I’m still not able to get 1920x108 on my laptop screen, but optirun works


> optirun glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0x20
Context is Direct
OpenGL Renderer: Gallium 0.4 on NV117
102.702017 frames/sec - 114.615451 Mpixels/sec
103.301441 frames/sec - 115.284408 Mpixels/sec
99.468483 frames/sec - 111.006827 Mpixels/sec
103.386675 frames/sec - 115.379529 Mpixels/sec
103.435918 frames/sec - 115.434485 Mpixels/sec
103.923364 frames/sec - 115.978474 Mpixels/sec
107.950829 frames/sec - 104.226777 Mpixels/sec
156.381231 frames/sec - 111.567687 Mpixels/sec
153.648382 frames/sec - 109.617980 Mpixels/sec
150.957063 frames/sec - 107.697901 Mpixels/sec
152.370981 frames/sec - 108.706638 Mpixels/sec
157.576764 frames/sec - 112.420621 Mpixels/sec
157.898130 frames/sec - 112.649895 Mpixels/sec
154.635321 frames/sec - 110.322095 Mpixels/sec
153.697556 frames/sec - 109.653062 Mpixels/sec
155.473812 frames/sec - 110.920303 Mpixels/sec

> glxspheres
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Visual ID of window: 0xcc
Context is Direct
OpenGL Renderer: Mesa DRI Intel(R) Haswell Mobile 
60.607115 frames/sec - 67.637541 Mpixels/sec
73.444748 frames/sec - 65.517476 Mpixels/sec
60.066156 frames/sec - 39.247226 Mpixels/sec
60.058898 frames/sec - 39.242484 Mpixels/sec
60.048488 frames/sec - 39.235682 Mpixels/sec
60.099011 frames/sec - 39.268694 Mpixels/sec
60.029865 frames/sec - 39.223513 Mpixels/sec




Sorry I can’t help you directly (don’t have a working 42.3 at the moment) but this seems an old problem resurfacing: please see comment #12 in https://forums.opensuse.org/showthread.php/522828-optirun-fails-failed-to-set-DRM-interface-version-1-4-Permission-denied?p=2811699#post2811699

Also, maybe you have something weird in your xorg.conf files (a remnant of previous tests?) since on a similar machine, but with 42.2, I see:


bruno@LT_B:~> xrandr
Screen 0: minimum 8 x 8, **current 1920 x 1080**, maximum 32767 x 32767
eDP1 connected primary **1920x1080**+0+0 (normal left inverted right x axis y axis) 350mm x 190mm
   **1920x1080     60.02*+**
   1400x1050     59.98  
   1600x900      60.00  
   1280x1024     60.02  
   1280x960      60.00  
   1368x768      60.00 
...

As a last comment, please be aware that simply issuing:


optirun glxspheres

you actually get one screen per video refresh cycle, hence about 60 frames/sec (or about 67 Mpixels/sec on a 1920x1080 screen) as rendered by Intel Haswell mobile graphics.
To unleash the full potential of integrated graphics, as a benchmark, you should issue:


vblank_mode=0 glxspheres

which gives about 300 frames/sec on my i7 4720HQ.

right now, to have it work, I have installed nouveau and nvidia driver, but with nouveau activated on bumblebee, nividia do not works. I still don’t have full HD.

the vblank_mode=0 trick is impressive (same result as yours). But for now I do not use optirun for display but with ffmpeg to convert videos. This give a 2x or 3x gain, but do not need a display.

My next use will be from kdenlive to display clips with effects, I didn’t test it yet

the problem is most certainly related to the kernel, my present system use the KOTD

linux-owxt.suse 4.14.0-rc1-3.g6627c5a-default

and then nouveau works but not nvidia, but this may be a driver problem, I will have to test rebuilding the nvidia driver with this kernel

thanks
jdd

Seldom does NVIDIA driver work with cutting edge kernels fresh from Linus’s gentle hands :wink:

You may try installing a driver from NVIDIA the hard way it may compile for the newer kernel and maybe not :stuck_out_tongue:

yes, I know that :slight_smile:

Do you know if something really better may be expected with proprietary driver? It seems to me than nouveau works better each month :slight_smile:

I will probably keep this and test the next kernel update to see if it works and if I can go for it

thanks
jdd

You might have a feeling by looking at this: https://forums.opensuse.org/showthread.php/522499-How-do-I-install-(nvidia-suse)-Prime-using-the-Nouveau-driver-on-my-Asus-Optimus-laptop?p=2813463#post2813463
But be aware that you have a different GPU and some water passed under the bridges since then, so YMMV!

Of course the Nvidia driver installed via the KMP is not going to work with a 4.14.x kernel and installing it “the hard way” is not guaranteed to work on a RC kernel either, as gogalthorp suggested.
But be aware that manual reclocking might be available with your GPU with the 4.14 nouveau driver, see this for a hint: https://forums.opensuse.org/showthread.php/522499-How-do-I-install-(nvidia-suse)-Prime-using-the-Nouveau-driver-on-my-Asus-Optimus-laptop?p=2810382#post2810382
If available, be careful to check temperatures and be prepared for occasional freezes (at least that was what I witnessed with kernels 4.9 and 4.10 at the time).

The link was very interesting but a bit above my knowledge :frowning:

still work to be done

thanks
jdd

I always use following instructions
https://forums.opensuse.org/showthread.php/505270-ultimate-tutorial-installing-Bumblebee-driver-for-SUSE

I used them last time yesterday for my MSI notebook.

just tested, don’t works

http://dodin.org/wiki/pmwiki.php?n=Doc.OptimusVideo#toc9

thanks
jdd