Nvidia optimus and rotate screen

Hi,

I’m having Lenovo z510 with discrete GeForce GT 740M:


lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
07:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev ff)

I installed SDB:NVIDIA_Bumblebee#OPTIONAL:_Install_NVIDIA_driver


optirun glxspheres
Polygons in scene: 62464
Visual ID of window: 0x21
Context is Direct
OpenGL Renderer: GeForce GT 740M/PCIe/SSE2
221.774725 frames/sec - 197.175473 Mpixels/sec
225.087209 frames/sec - 200.120536 Mpixels/sec

I have problems with rotate screen connected to HDMI:


xrandr --output HDMI-0 --rotate left

provide black screen and no signal on external LCD.


uname -a
Linux mruz-lenovo 3.18.1-1-desktop #1 SMP PREEMPT Wed Dec 17 18:20:30 UTC 2014 (5f2f35e) x86_64 x86_64 x86_64 GNU/Linux


zypper se -s -i xorg xf86-video bumblebee
Loading repository data...
Reading installed packages...

S | Name                   | Type    | Version        | Arch   | Repository          
--+------------------------+---------+----------------+--------+---------------------
i | bumblebee              | package | 3.2.1-18.19    | x86_64 | Bumblebee           
i | nvidia-bumblebee       | package | 343.36-1.1     | x86_64 | Bumblebee           
i | nvidia-bumblebee-32bit | package | 343.36-1.1     | x86_64 | Bumblebee           
i | xf86-video-fbdev       | package | 0.4.4-3.1      | x86_64 | openSUSE-Factory-Oss
i | xf86-video-intel       | package | 2.99.917-1.1   | x86_64 | openSUSE-Factory-Oss
i | xf86-video-modesetting | package | 0.9.0-3.1      | x86_64 | openSUSE-Factory-Oss
i | xf86-video-nouveau     | package | 1.0.11-1.2     | x86_64 | openSUSE-Factory-Oss
i | xf86-video-nv          | package | 2.1.20-11.1    | x86_64 | openSUSE-Factory-Oss
i | xf86-video-vesa        | package | 2.3.3-6.1      | x86_64 | openSUSE-Factory-Oss
i | xorg-x11-Xvnc          | package | 1.3.1-11.1     | x86_64 | openSUSE-Factory-Oss
i | xorg-x11-driver-video  | package | 7.6_1-15.1     | x86_64 | openSUSE-Factory-Oss
i | xorg-x11-server        | package | 7.6_1.16.2-1.1 | x86_64 | openSUSE-Factory-Oss
i | xorg-x11-server-extra  | package | 7.6_1.16.2-1.1 | x86_64 | openSUSE-Factory-Oss
i | xorg-x11-driver-input  | package | 7.6_1-13.1     | noarch | openSUSE-Factory-Oss
i | xorg-x11-essentials    | package | 7.6_1-16.1     | noarch | openSUSE-Factory-Oss
i | xorg-x11-fonts         | package | 7.6-31.1       | noarch | openSUSE-Factory-Oss
i | xorg-x11-fonts-core    | package | 7.6-31.1       | noarch | openSUSE-Factory-Oss
i | xorg-x11-libX11-ccache | package | 7.6-20.1       | noarch | openSUSE-Factory-Oss
i | xorg-x11-libs          | package | 7.6-47.1       | noarch | openSUSE-Factory-Oss

Also nvidia-settings not working at all (no screens):


optirun -b none nvidia-settings -c :8
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.36.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1

ERROR: nvidia-settings could not find the registry key file. This file should have been installed along with this driver at either
       /usr/share/nvidia/nvidia-application-profiles-343.36-key-documentation or /usr/share/nvidia/nvidia-application-profiles-key-documentation. The
       application profiles will continue to work, but values cannot be preopulated or validated, and will not be listed in the help text. Please see
       the README for possible values and descriptions.

Can anyone provide xorg.conf with working rotation?

Also steam does not start:


primusrun steam
Running Steam on   64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Xlib:  extension "GLX" missing on display ":0.0".
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
[0115/161622:ERROR:nss_util.cc(1018)] Failed to load NSS libraries.
Installing breakpad exception handler for appid(steam)/version(1416617579)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Xlib:  extension "GLX" missing on display ":0.0".
glXChooseVisual failedAssert( Assertion Failed: Fatal Error: glXChooseVisual failed ):/home/buildbot/buildslave_steam/steam_rel_client_ubuntu12_linux/build/src/steamUI/Main.cpp:283


Installing breakpad exception handler for appid(steam)/version(1416617579)
Uploading dump (out-of-process) [proxy '']
/tmp/dumps/assert_20150115161622_6.dmp
Finished uploading minidump (out-of-process): success = yes
response: CrashID=bp-587c1b87-6c0b-4586-9a0d-22e752150115
Requested Force create but SharedObjectMutex already created
Forced create but already created for SharedObjectEvent
Forced create but already created for SharedObjectEvent

With optirun starts, but crasch when I run Counter-Strike: Source:


optirun steam
Running Steam on   64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
Installing breakpad exception handler for appid(steamwebhelper)/version(1416587021)
[0115/162046:ERROR:nss_util.cc(1018)] Failed to load NSS libraries.
Installing breakpad exception handler for appid(steam)/version(1416617579)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
FillInMachineIDInfo took a total of 0 milliseconds
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)


** (steam:29095): WARNING **: Unknown device type 14


** (steam:29095): WARNING **: Could not create object for /org/freedesktop/NetworkManager/Devices/0: unknown object type
Installing breakpad exception handler for appid(steam)/version(1416617579)
Generating new string page texture 2: 48x256, total string texture memory is 49,15 KB
Generating new string page texture 3: 256x256, total string texture memory is 311,30 KB
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Adding licenses for the following package(s): 0, 4156, 16019
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Failed to init SteamVR because it isn't installed
sh: lspci: nie znaleziono polecenia
ExecCommandLine: ""/home/mruz/.local/share/Steam/ubuntu12_32/steam" "
Installing breakpad exception handler for appid(steam)/version(1416617579)
System startup time: 4,46 seconds
[0115/162050:ERROR:renderer_main.cc(227)] Running without renderer sandbox
Generating new string page texture 69: 1024x256, total string texture memory is 1,36 MB
Generating new string page texture 70: 128x256, total string texture memory is 131,07 KB
Generating new string page texture 71: 128x256, total string texture memory is 1,49 MB
Generating new string page texture 72: 64x256, total string texture memory is 1,56 MB
Generating new string page texture 73: 32x256, total string texture memory is 1,59 MB
Generating new string page texture 78: 128x256, total string texture memory is 1,72 MB
Generating new string page texture 79: 384x256, total string texture memory is 2,11 MB
Generating new string page texture 80: 8x256, total string texture memory is 2,12 MB
Generating new string page texture 82: 512x256, total string texture memory is 2,65 MB
Generating new string page texture 83: 24x256, total string texture memory is 2,67 MB
Running Steam on   64-bit
STEAM_RUNTIME has been set by the user to: /home/mruz/.local/share/Steam/ubuntu12_32/steam-runtime
ExecCommandLine: "/home/mruz/.steam/root/ubuntu12_32/steam steam://open/driverhelperready"
ExecSteamURL: "steam://open/driverhelperready"
CAPIJobRequestUserStats - Server response failed 2
Generating new string page texture 88: 128x256, total string texture memory is 2,80 MB
roaming config store loaded successfully - 705 bytes.
migrating temporary roaming config store
Game update: AppID 240 "Counter-Strike: Source", ProcID 29204, IP 0.0.0.0:0
ERROR: ld.so: object '/home/mruz/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mruz/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 29206 != 29205, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/mruz/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/mruz/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
SDL video target is 'x11'
SDL video target is 'x11'
Installing breakpad exception handler for appid(gameoverlayui)/version(20141121162421)
Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)
Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number
Using breakpad crash handler
Setting breakpad minidump AppID = 240
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198059528477 [API loaded yes]
Steam_SetMinidumpSteamID:  Setting Steam ID:  76561198059528477
Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)
Did not detect any valid joysticks.
[0115/162059:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation
This system supports the OpenGL extension GL_EXT_framebuffer_object.
This system supports the OpenGL extension GL_EXT_framebuffer_blit.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample.
This system DOES NOT support the OpenGL extension GL_APPLE_fence.
This system supports the OpenGL extension GL_NV_fence.
This system supports the OpenGL extension GL_ARB_sync.
This system supports the OpenGL extension GL_EXT_draw_buffers2.
This system supports the OpenGL extension GL_EXT_bindable_uniform.
This system DOES NOT support the OpenGL extension GL_APPLE_flush_buffer_range.
This system supports the OpenGL extension GL_ARB_map_buffer_range.
This system supports the OpenGL extension GL_ARB_vertex_buffer_object.
This system supports the OpenGL extension GL_ARB_occlusion_query.
This system DOES NOT support the OpenGL extension GL_APPLE_texture_range.
This system DOES NOT support the OpenGL extension GL_APPLE_client_storage.
This system DOES NOT support the OpenGL extension GL_ARB_uniform_buffer.
This system supports the OpenGL extension GL_ARB_vertex_array_bgra.
This system supports the OpenGL extension GL_EXT_vertex_array_bgra.
This system supports the OpenGL extension GL_ARB_framebuffer_object.
This system DOES NOT support the OpenGL extension GL_GREMEDY_string_marker.
This system supports the OpenGL extension GL_ARB_debug_output.
This system supports the OpenGL extension GL_EXT_direct_state_access.
This system supports the OpenGL extension GL_NV_bindless_texture.
This system DOES NOT support the OpenGL extension GL_AMD_pinned_memory.
This system supports the OpenGL extension GL_EXT_framebuffer_multisample_blit_scaled.
This system supports the OpenGL extension GL_EXT_texture_sRGB_decode.
This system supports the OpenGL extension GL_NVX_gpu_memory_info.
This system DOES NOT support the OpenGL extension GL_ATI_meminfo.
This system supports the OpenGL extension GL_EXT_texture_compression_s3tc.
This system supports the OpenGL extension GL_EXT_texture_compression_dxt1.
This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt3.
This system DOES NOT support the OpenGL extension GL_ANGLE_texture_compression_dxt5.
This system DOES NOT support the OpenGL extension GLX_EXT_swap_control_tear.
GL_NV_bindless_texture: DISABLED
GL_AMD_pinned_memory: DISABLED
GL_EXT_texture_sRGB_decode: AVAILABLE
GL_NVX_gpu_memory_info: AVAILABLE
GL_ATI_meminfo: UNAVAILABLE
GL_NVX_gpu_memory_info: Total Dedicated: 2097152, Total Avail: 2097152, Current Avail: 2061704
GL_MAX_SAMPLES_EXT: 32
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3200 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
CShaderDeviceMgrBase::GetRecommendedConfigurationInfo: CPU speed: 3200 MHz, Processor: GenuineIntel
GlobalMemoryStatus: 4294967295
IDirect3DDevice9::Create: BackBufWidth: 1366, BackBufHeight: 768, D3DFMT: 3, BackBufCount: 1, MultisampleType: 0, MultisampleQuality: 0
GL sampler object usage: ENABLED
GL prefer MapBufferRange: NO


 ##### swap interval = 0     swap limit = 1 #####
The program 'hl2_linux' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 131 error_code 3 request_code 15 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Missing shutdown function for DevShotGenerator_Init() : DevShotGenerator_Shutdown()
Missing shutdown function for MapReslistGenerator_Init() : MapReslistGenerator_Shutdown()
Missing shutdown function for COM_InitFilesystem( m_StartupInfo.m_pInitialMod ) : COM_ShutdownFileSystem()
Missing shutdown function for Steam3Client().Activate() : Steam3Client().Shutdown()
/home/mruz/.local/share/Steam/SteamApps/common/Counter-Strike Source/hl2.sh: line 67: 29208 Naruszenie ochrony pamięci   ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Game removed: AppID 240 "Counter-Strike: Source", ProcID 29208 
Installing breakpad exception handler for appid(steam)/version(1416617579)

Xorg.0.log and Xorg.8.log
0ad works fine, any ideas?

It is always unclear to me on optimus systems which GPU does what to which plug. LOL

Had you ever installed the regular NVIDA driver, then NOT uninstalled it before installing bumblebee?? That can leave a mess.

In any case before you can rotate (if it can be done) you need to get things running right normally.

Who ever suggested the ideal of optimus should be thrown under a bus. >:) Maybe check with NVIDA it was their idea and see why it is not fully supported in Linux. Enough people complain maybe they will do something.

Yes, I tried to install regular NVIDA driver before. I’ll reinstall openSUSE (I have problems with kde5 also - it crashes during start) and try to install just bumblebee.

Yes, I have AOC i2470Pw with pivot. I’ll try to rotate before install bumblebee.

It is unfortunate that in my BIOS I can’t completely turn off the Intel card and leave only the Nvidia card.

After reinstall I can rotate. Also after install bumblebee steam & css works fine. I think you are right, installing regular nvidia driver and not uninstalling it before bumblebee left a mess. Thanks :wink:

Also stay away from plasma 5 (kde5) for a while it is early alpha quality. Unless you like to play with those kind of things. Remember when you ride the bleeding edge prepare to bleed.

Glad that worked.