Setup & Software Discussions
A script to change Xorg config
 

A script to change Xorg config  

 of  4
  RSS

(@welly_wu)
Active Member
Joined: 9 months ago
 

Forgive me for revisiting this same topic again, but I decided to reinstall Ubuntu 18.04.2 64 bit LTS GNU/Linux on my mid-2018 Huawei Matebook X Pro laptop again.

Here is some important technical information:

[email protected]:~$ sudo inxi -G
[sudo] password for wellywu: 
Graphics:  Card-1: Intel UHD Graphics 620
           Card-2: NVIDIA GP108M [GeForce MX150]
           Card-3: Advanced Micro Devices [AMD/ATI] Vega 10 XT [Radeon RX Vega 64]
           Display Server: X.Org 1.20.1
           drivers: modesetting,ati,amdgpu (unloaded: fbdev,vesa)
           Resolution: 3000x2000@60.00hz
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2)
           version: 4.5 Mesa 18.3.3
[email protected]:~$ sudo lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
0a:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] (rev c1)
[email protected]:~$

As a quick follow up, here is more important technical information:

Section "Module"
    Load "modesetting"
EndSection

Section "Device"
    Identifier "Vega 10 XT"
    Driver "amdgpu"
    BusID "PCI:0a:0:0"
    Option "AllowEmptyInitialConfiguration"
    Option "AllowExternalGpus" "True"
EndSection

When I plug in my AKiTiO Node and the Intel Thunderbolt 3 cable into my mid-2018 Huawei Matebook X Pro running Ubuntu 18.04.2 64 bit LTS GNU/Linux, I get a black screen with a blinking cursor or I get the LightDM login screen and it gives me a login loop error so I can not get into my GNOME 3 desktop environment. I must have the PCI BusID wrong, but I need someone to help me by giving me the exact PCI BusID that is going to work. I am not good at converting hexadecimal into numerical format or whatever is required to get that conversion correct. Please help me in the near future to fix this technical issue. Thank you.

This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Welly Wu

I must have the PCI BusID wrong, but I need someone to help me by giving me the exact PCI BusID that is going to work. I am not good at converting hexadecimal into numerical format or whatever is required to get that conversion correct.

Indeed you have 🙂
https://www.binaryhexconverter.com/hex-to-decimal-converter
a = 10, so what you want is:
'BusID "PCI:10:0:0"'
Good luck!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

Sebulon:

Thank you. It just works. It's a little slow, but it's tolerable for now. I'll test using my eGPU later this week to gauge its' performance.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

I keep getting a black screen with a blinking cursor after using the gswitch application to choose my eGPU. I did install lightdm and set it as my default for my login screen. What is going wrong here?

Sebulon:

Nevermind. I uninstalled lightdm and I switched back to GDM3. I also restarted my mid-2018 Huawei Matebook X Pro laptop and left the Intel Thunderbolt 3 cable connected after restarting my laptop. Your gswitch app just works again. Sorry for the confusion.

This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

I did not want to post this follow up, but I am at a complete loss right now.

Using GDM3, I consistently get either login loops or I get a black screen when using Sebulon's gswitch software package to choose the eGPU. Before I make the switch, I double check to ensure that nVidia Prime Select has chosen the Intel iGPU because I learned that Sebulon's gswitch software package will not work if the nVidia MX150 GPU is currently enabled in order to switch to the AMD Radeon RX 580 8GB or RX Vega 64 8GB HBM2 GPUs. I also reinstalled lightdm and configured it correctly while disabling GDM3 and restarting my mid-2018 Huawei Matebook X Pro Intel Ultrabook laptop with the Intel 620 HD Graphics iGPU pre-selected by default using nVidia Prime Select. Now, I keep getting erratic behavior including these scenarios: 1. Black screen after switching to the eGPU or 2. random freezes and lock ups thereby forcing me to press and hold my power button until my laptop turns off without a graceful shut down of my Ubuntu 18.04.2 64 bit LTS GNU/Linux desktop operating system.

I purchased Tony George's Ubuntu Kernel Update Utility and licensed it and I installed Linux kernel 5.0.7 64 bit. I also added Miguel Paulo Dias' MESA Ubuntu PPA and it should be at MESA version 19.1 64 bit. I also installed the latest Vulkan 1.1 64 bit drivers. I configured my /etc/X11/xorg.conf.d/20-amdgpu.conf file to permit DRI3 and variable refresh rate even though I know that I need to plug in an AMD FreeSync 1 or 2 desktop monitor into the back of my AKiTiO Node eGPU directly to the DisplayPort 1.4 port; however, my mid-2018 Huawei Matebook X Pro only has up to an Intel Thunderbolt 3 PCI-e x2 lanes so I am limited up to 20 GB/s. I am not sure if the combination of these bleeding edge software packages and versions are contributing factors to why Sebulon's gswitch software package is not working reliably any longer.

How do I get you relevant technical information so as to be able to help the experts here to help me diagnose, troubleshoot and fix this technical issue?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

I got it working partially again. This time, I had to install lightdm and disable GDM3. I also removed the Paulo Miguel Dias MESA PPA and installed the semi-official X-Swat Updates PPA. I also removed the 20-amdgpu.conf file and I removed the /etc/X11/xorg.conf.d sub-folder. I can switch between the internal and external GPUs just fine again.

I know that I asked this beforehand, but my AMD Radeon RX Vega 64 GPU is limited to 1.00 FPS when using my eGPU. I do not fully understand why that is the case, but I am aware that my laptop is limited to 20 GB/s. My question is this: is there any way to improve the 3D graphics hardware acceleration using my laptop's screen when I choose to use my eGPU? How does DRI_PRIME=1 and DRI_PRIME=0 affect the external and internal GPUs? Here is some code:

[email protected]:~$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Radeon RX Vega (VEGA10, DRM 3.27.0, 5.0.7-050007-generic, LLVM 8.0.0)
[email protected]:~$ DRI_PRIME=0 glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) 
[email protected]:~$ 

When I switch to my AMD RX Vega 64 GPU, glxgears tells me this information:

[email protected]:~$ glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
2970 frames in 5.1 seconds = 582.499 FPS
5 frames in 5.0 seconds =  1.000 FPS
5 frames in 5.0 seconds =  1.000 FPS
6 frames in 6.0 seconds =  1.000 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 3036 requests (684 known processed) with 0 events remaining.
[email protected]:~$

I apologize for continuing to seek good support for this performance issue, but I wanted to share  this if it can help someone to help me improve 3D graphics performance:

[email protected]:~$ glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Radeon RX Vega (VEGA10, DRM 3.27.0, 5.0.7-050007-generic, LLVM 8.0.0)
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_NVX_gpu_memory_info, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance, 
    GL_EXT_render_snorm, GL_EXT_robustness, GL_EXT_sRGB_write_control, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 
[email protected]:~$ LIBGL_DEBUG=verbose glxinfo
name of display: :0
libGL: Can't open configuration file /home/wellywu/.drirc: No such file or directory.
libGL: Can't open configuration file /home/wellywu/.drirc: No such file or directory.
libGL: pci id for fd 4: 1002:687f, driver radeonsi
libGL: MESA-LOADER: dlopen(/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so)
libGL: Can't open configuration file /home/wellywu/.drirc: No such file or directory.
libGL: Can't open configuration file /home/wellywu/.drirc: No such file or directory.
libGL: Can't open configuration file /home/wellywu/.drirc: No such file or directory.
/usr/share/libdrm/amdgpu.ids version: 1.0.0
libGL: Using DRI3 for screen 0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_libglvnd, GLX_EXT_no_config_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age, 
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile, 
    GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, 
    GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float, 
    GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: X.Org (0x1002)
    Device: Radeon RX Vega (VEGA10, DRM 3.27.0, 5.0.7-050007-generic, LLVM 8.0.0) (0x687f)
    Version: 19.0.2
    Accelerated: yes
    Video memory: 8176MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 4.5
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 7960 MB, largest block: 7960 MB
    VBO free aux. memory - total: 8128 MB, largest block: 8128 MB
    Texture free memory - total: 7960 MB, largest block: 7960 MB
    Texture free aux. memory - total: 8128 MB, largest block: 8128 MB
    Renderbuffer free memory - total: 7960 MB, largest block: 7960 MB
    Renderbuffer free aux. memory - total: 8128 MB, largest block: 8128 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 8176 MB
    Total available memory: 16352 MB
    Currently available dedicated video memory: 7960 MB
OpenGL vendor string: X.Org
OpenGL renderer string: Radeon RX Vega (VEGA10, DRM 3.27.0, 5.0.7-050007-generic, LLVM 8.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_AMD_conservative_depth, GL_AMD_depth_clamp_separate, 
    GL_AMD_draw_buffers_blend, GL_AMD_framebuffer_multisample_advanced, 
    GL_AMD_gpu_shader_int64, GL_AMD_multi_draw_indirect, 
    GL_AMD_performance_monitor, GL_AMD_pinned_memory, 
    GL_AMD_query_buffer_object, GL_AMD_seamless_cubemap_per_texture, 
    GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax, 
    GL_AMD_texture_texture4, GL_AMD_vertex_shader_layer, 
    GL_AMD_vertex_shader_viewport_index, GL_ANGLE_texture_compression_dxt3, 
    GL_ANGLE_texture_compression_dxt5, GL_ARB_ES2_compatibility, 
    GL_ARB_ES3_1_compatibility, GL_ARB_ES3_2_compatibility, 
    GL_ARB_ES3_compatibility, GL_ARB_arrays_of_arrays, GL_ARB_base_instance, 
    GL_ARB_bindless_texture, GL_ARB_blend_func_extended, 
    GL_ARB_buffer_storage, GL_ARB_clear_buffer_object, GL_ARB_clear_texture, 
    GL_ARB_clip_control, GL_ARB_color_buffer_float, 
    GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_ARB_conservative_depth, GL_ARB_copy_buffer, GL_ARB_copy_image, 
    GL_ARB_cull_distance, GL_ARB_debug_output, GL_ARB_depth_buffer_float, 
    GL_ARB_depth_clamp, GL_ARB_derivative_control, GL_ARB_direct_state_access, 
    GL_ARB_draw_buffers, GL_ARB_draw_buffers_blend, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_draw_indirect, 
    GL_ARB_draw_instanced, GL_ARB_enhanced_layouts, 
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location, 
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_no_attachments, 
    GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB, 
    GL_ARB_get_program_binary, GL_ARB_get_texture_sub_image, 
    GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, GL_ARB_gpu_shader_int64, 
    GL_ARB_half_float_pixel, GL_ARB_half_float_vertex, 
    GL_ARB_indirect_parameters, GL_ARB_instanced_arrays, 
    GL_ARB_internalformat_query, GL_ARB_internalformat_query2, 
    GL_ARB_invalidate_subdata, GL_ARB_map_buffer_alignment, 
    GL_ARB_map_buffer_range, GL_ARB_multi_bind, GL_ARB_multi_draw_indirect, 
    GL_ARB_occlusion_query2, GL_ARB_pipeline_statistics_query, 
    GL_ARB_pixel_buffer_object, GL_ARB_point_sprite, 
    GL_ARB_polygon_offset_clamp, GL_ARB_program_interface_query, 
    GL_ARB_provoking_vertex, GL_ARB_query_buffer_object, 
    GL_ARB_robust_buffer_access_behavior, GL_ARB_robustness, 
    GL_ARB_sample_shading, GL_ARB_sampler_objects, GL_ARB_seamless_cube_map, 
    GL_ARB_seamless_cubemap_per_texture, GL_ARB_separate_shader_objects, 
    GL_ARB_shader_atomic_counter_ops, GL_ARB_shader_atomic_counters, 
    GL_ARB_shader_ballot, GL_ARB_shader_bit_encoding, GL_ARB_shader_clock, 
    GL_ARB_shader_draw_parameters, GL_ARB_shader_group_vote, 
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size, 
    GL_ARB_shader_objects, GL_ARB_shader_precision, 
    GL_ARB_shader_stencil_export, GL_ARB_shader_storage_buffer_object, 
    GL_ARB_shader_subroutine, GL_ARB_shader_texture_image_samples, 
    GL_ARB_shader_texture_lod, GL_ARB_shader_viewport_layer_array, 
    GL_ARB_shading_language_420pack, GL_ARB_shading_language_packing, 
    GL_ARB_stencil_texturing, GL_ARB_sync, GL_ARB_tessellation_shader, 
    GL_ARB_texture_barrier, GL_ARB_texture_buffer_object, 
    GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range, 
    GL_ARB_texture_compression_bptc, GL_ARB_texture_compression_rgtc, 
    GL_ARB_texture_cube_map_array, GL_ARB_texture_filter_anisotropic, 
    GL_ARB_texture_float, GL_ARB_texture_gather, 
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_multisample, 
    GL_ARB_texture_non_power_of_two, GL_ARB_texture_query_levels, 
    GL_ARB_texture_query_lod, GL_ARB_texture_rectangle, GL_ARB_texture_rg, 
    GL_ARB_texture_rgb10_a2ui, GL_ARB_texture_stencil8, 
    GL_ARB_texture_storage, GL_ARB_texture_storage_multisample, 
    GL_ARB_texture_swizzle, GL_ARB_texture_view, GL_ARB_timer_query, 
    GL_ARB_transform_feedback2, GL_ARB_transform_feedback3, 
    GL_ARB_transform_feedback_instanced, 
    GL_ARB_transform_feedback_overflow_query, GL_ARB_uniform_buffer_object, 
    GL_ARB_vertex_array_bgra, GL_ARB_vertex_array_object, 
    GL_ARB_vertex_attrib_64bit, GL_ARB_vertex_attrib_binding, 
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_viewport_array, GL_ATI_blend_equation_separate, GL_ATI_meminfo, 
    GL_ATI_texture_float, GL_ATI_texture_mirror_once, GL_EXT_abgr, 
    GL_EXT_blend_equation_separate, GL_EXT_depth_bounds_test, 
    GL_EXT_draw_buffers2, GL_EXT_draw_instanced, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_framebuffer_multisample_blit_scaled, 
    GL_EXT_framebuffer_object, GL_EXT_framebuffer_sRGB, GL_EXT_memory_object, 
    GL_EXT_memory_object_fd, GL_EXT_packed_depth_stencil, GL_EXT_packed_float, 
    GL_EXT_pixel_buffer_object, GL_EXT_polygon_offset_clamp, 
    GL_EXT_provoking_vertex, GL_EXT_semaphore, GL_EXT_semaphore_fd, 
    GL_EXT_shader_integer_mix, GL_EXT_texture_array, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_filter_anisotropic, 
    GL_EXT_texture_integer, GL_EXT_texture_mirror_clamp, GL_EXT_texture_sRGB, 
    GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent, 
    GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query, 
    GL_EXT_transform_feedback, GL_EXT_vertex_array_bgra, 
    GL_EXT_vertex_attrib_64bit, GL_EXT_window_rectangles, 
    GL_IBM_multimode_draw_arrays, GL_KHR_blend_equation_advanced, 
    GL_KHR_context_flush_control, GL_KHR_debug, GL_KHR_no_error, 
    GL_KHR_robust_buffer_access_behavior, GL_KHR_robustness, 
    GL_KHR_texture_compression_astc_ldr, 
    GL_KHR_texture_compression_astc_sliced_3d, GL_MESA_pack_invert, 
    GL_MESA_shader_integer_functions, GL_MESA_texture_signed_rgba, 
    GL_NVX_gpu_memory_info, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_NV_packed_depth_stencil, GL_NV_texture_barrier, GL_NV_vdpau_interop, 
    GL_OES_EGL_image, GL_S3_s3tc

OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.2
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
    GL_AMD_conservative_depth, GL_AMD_depth_clamp_separate, 
    GL_AMD_draw_buffers_blend, GL_AMD_framebuffer_multisample_advanced, 
    GL_AMD_multi_draw_indirect, GL_AMD_performance_monitor, 
    GL_AMD_pinned_memory, GL_AMD_query_buffer_object, 
    GL_AMD_seamless_cubemap_per_texture, GL_AMD_shader_stencil_export, 
    GL_AMD_shader_trinary_minmax, GL_AMD_texture_texture4, 
    GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index, 
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
    GL_APPLE_packed_pixels, GL_ARB_ES2_compatibility, 
    GL_ARB_ES3_1_compatibility, GL_ARB_ES3_compatibility, 
    GL_ARB_arrays_of_arrays, GL_ARB_base_instance, GL_ARB_bindless_texture, 
    GL_ARB_blend_func_extended, GL_ARB_buffer_storage, 
    GL_ARB_clear_buffer_object, GL_ARB_clear_texture, GL_ARB_clip_control, 
    GL_ARB_color_buffer_float, GL_ARB_compatibility, 
    GL_ARB_compressed_texture_pixel_storage, GL_ARB_compute_shader, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_ARB_conservative_depth, GL_ARB_copy_buffer, GL_ARB_copy_image, 
    GL_ARB_cull_distance, GL_ARB_debug_output, GL_ARB_depth_buffer_float, 
    GL_ARB_depth_clamp, GL_ARB_depth_texture, GL_ARB_derivative_control, 
    GL_ARB_direct_state_access, GL_ARB_draw_buffers, 
    GL_ARB_draw_buffers_blend, GL_ARB_draw_elements_base_vertex, 
    GL_ARB_draw_indirect, GL_ARB_draw_instanced, GL_ARB_enhanced_layouts, 
    GL_ARB_explicit_attrib_location, GL_ARB_explicit_uniform_location, 
    GL_ARB_fragment_coord_conventions, GL_ARB_fragment_layer_viewport, 
    GL_ARB_fragment_program, GL_ARB_fragment_program_shadow, 
    GL_ARB_fragment_shader, GL_ARB_framebuffer_no_attachments, 
    GL_ARB_framebuffer_object, GL_ARB_framebuffer_sRGB, 
    GL_ARB_get_program_binary, GL_ARB_get_texture_sub_image, 
    GL_ARB_gpu_shader5, GL_ARB_gpu_shader_fp64, GL_ARB_half_float_pixel, 
    GL_ARB_half_float_vertex, GL_ARB_indirect_parameters, 
    GL_ARB_instanced_arrays, GL_ARB_internalformat_query, 
    GL_ARB_internalformat_query2, GL_ARB_invalidate_subdata, 
    GL_ARB_map_buffer_alignment, GL_ARB_map_buffer_range, GL_ARB_multi_bind, 
    GL_ARB_multi_draw_indirect, GL_ARB_multisample, GL_ARB_multitexture, 
    GL_ARB_occlusion_query, GL_ARB_occlusion_query2, 
    GL_ARB_pipeline_statistics_query, GL_ARB_pixel_buffer_object, 
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_polygon_offset_clamp, 
    GL_ARB_program_interface_query, GL_ARB_provoking_vertex, 
    GL_ARB_query_buffer_object, GL_ARB_robust_buffer_access_behavior, 
    GL_ARB_robustness, GL_ARB_sample_shading, GL_ARB_sampler_objects, 
    GL_ARB_seamless_cube_map, GL_ARB_seamless_cubemap_per_texture, 
    GL_ARB_separate_shader_objects, GL_ARB_shader_atomic_counter_ops, 
    GL_ARB_shader_atomic_counters, GL_ARB_shader_ballot, 
    GL_ARB_shader_bit_encoding, GL_ARB_shader_clock, 
    GL_ARB_shader_draw_parameters, GL_ARB_shader_group_vote, 
    GL_ARB_shader_image_load_store, GL_ARB_shader_image_size, 
    GL_ARB_shader_objects, GL_ARB_shader_precision, 
    GL_ARB_shader_stencil_export, GL_ARB_shader_storage_buffer_object, 
    GL_ARB_shader_subroutine, GL_ARB_shader_texture_image_samples, 
    GL_ARB_shader_texture_lod, GL_ARB_shader_viewport_layer_array, 
    GL_ARB_shading_language_100, GL_ARB_shading_language_420pack, 
    GL_ARB_shading_language_packing, GL_ARB_shadow, GL_ARB_stencil_texturing, 
    GL_ARB_sync, GL_ARB_tessellation_shader, GL_ARB_texture_barrier, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_buffer_object, 
    GL_ARB_texture_buffer_object_rgb32, GL_ARB_texture_buffer_range, 
    GL_ARB_texture_compression, GL_ARB_texture_compression_bptc, 
    GL_ARB_texture_compression_rgtc, GL_ARB_texture_cube_map, 
    GL_ARB_texture_cube_map_array, GL_ARB_texture_env_add, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_filter_anisotropic, 
    GL_ARB_texture_float, GL_ARB_texture_gather, 
    GL_ARB_texture_mirror_clamp_to_edge, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_texture_multisample, GL_ARB_texture_non_power_of_two, 
    GL_ARB_texture_query_levels, GL_ARB_texture_query_lod, 
    GL_ARB_texture_rectangle, GL_ARB_texture_rg, GL_ARB_texture_rgb10_a2ui, 
    GL_ARB_texture_stencil8, GL_ARB_texture_storage, 
    GL_ARB_texture_storage_multisample, GL_ARB_texture_swizzle, 
    GL_ARB_texture_view, GL_ARB_timer_query, GL_ARB_transform_feedback2, 
    GL_ARB_transform_feedback3, GL_ARB_transform_feedback_instanced, 
    GL_ARB_transform_feedback_overflow_query, GL_ARB_transpose_matrix, 
    GL_ARB_uniform_buffer_object, GL_ARB_vertex_array_bgra, 
    GL_ARB_vertex_array_object, GL_ARB_vertex_attrib_64bit, 
    GL_ARB_vertex_attrib_binding, GL_ARB_vertex_buffer_object, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, 
    GL_ARB_vertex_type_10f_11f_11f_rev, GL_ARB_vertex_type_2_10_10_10_rev, 
    GL_ARB_viewport_array, GL_ARB_window_pos, GL_ATI_blend_equation_separate, 
    GL_ATI_draw_buffers, GL_ATI_fragment_shader, GL_ATI_meminfo, 
    GL_ATI_separate_stencil, GL_ATI_texture_compression_3dc, 
    GL_ATI_texture_env_combine3, GL_ATI_texture_float, 
    GL_ATI_texture_mirror_once, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_equation_separate, GL_EXT_blend_func_separate, 
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_compiled_vertex_array, 
    GL_EXT_copy_texture, GL_EXT_depth_bounds_test, GL_EXT_draw_buffers2, 
    GL_EXT_draw_instanced, GL_EXT_draw_range_elements, GL_EXT_fog_coord, 
    GL_EXT_framebuffer_blit, GL_EXT_framebuffer_multisample, 
    GL_EXT_framebuffer_multisample_blit_scaled, GL_EXT_framebuffer_object, 
    GL_EXT_framebuffer_sRGB, GL_EXT_gpu_program_parameters, 
    GL_EXT_memory_object, GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays, 
    GL_EXT_packed_depth_stencil, GL_EXT_packed_float, GL_EXT_packed_pixels, 
    GL_EXT_pixel_buffer_object, GL_EXT_point_parameters, 
    GL_EXT_polygon_offset_clamp, GL_EXT_provoking_vertex, 
    GL_EXT_rescale_normal, GL_EXT_secondary_color, GL_EXT_semaphore, 
    GL_EXT_semaphore_fd, GL_EXT_separate_specular_color, 
    GL_EXT_shader_integer_mix, GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, 
    GL_EXT_stencil_wrap, GL_EXT_subtexture, GL_EXT_texture, GL_EXT_texture3D, 
    GL_EXT_texture_array, GL_EXT_texture_compression_dxt1, 
    GL_EXT_texture_compression_latc, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map, 
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, 
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_integer, 
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp, 
    GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_texture_sRGB, 
    GL_EXT_texture_sRGB_decode, GL_EXT_texture_shared_exponent, 
    GL_EXT_texture_snorm, GL_EXT_texture_swizzle, GL_EXT_timer_query, 
    GL_EXT_transform_feedback, GL_EXT_vertex_array, GL_EXT_vertex_array_bgra, 
    GL_EXT_vertex_attrib_64bit, GL_EXT_window_rectangles, 
    GL_IBM_multimode_draw_arrays, GL_IBM_rasterpos_clip, 
    GL_IBM_texture_mirrored_repeat, GL_INGR_blend_func_separate, 
    GL_KHR_blend_equation_advanced, GL_KHR_context_flush_control, 
    GL_KHR_debug, GL_KHR_no_error, GL_KHR_robust_buffer_access_behavior, 
    GL_KHR_robustness, GL_KHR_texture_compression_astc_ldr, 
    GL_KHR_texture_compression_astc_sliced_3d, GL_MESA_pack_invert, 
    GL_MESA_shader_integer_functions, GL_MESA_texture_signed_rgba, 
    GL_MESA_window_pos, GL_NVX_gpu_memory_info, GL_NV_blend_square, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance, 
    GL_NV_light_max_exponent, GL_NV_packed_depth_stencil, 
    GL_NV_primitive_restart, GL_NV_texgen_reflection, GL_NV_texture_barrier, 
    GL_NV_texture_env_combine4, GL_NV_texture_rectangle, GL_NV_vdpau_interop, 
    GL_OES_EGL_image, GL_OES_read_format, GL_S3_s3tc, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
    GL_AMD_framebuffer_multisample_advanced, GL_AMD_performance_monitor, 
    GL_ANDROID_extension_pack_es31a, GL_ANGLE_texture_compression_dxt3, 
    GL_ANGLE_texture_compression_dxt5, GL_APPLE_texture_max_level, 
    GL_EXT_base_instance, GL_EXT_blend_func_extended, GL_EXT_blend_minmax, 
    GL_EXT_buffer_storage, GL_EXT_clip_cull_distance, 
    GL_EXT_color_buffer_float, GL_EXT_compressed_ETC1_RGB8_sub_texture, 
    GL_EXT_copy_image, GL_EXT_discard_framebuffer, 
    GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers, 
    GL_EXT_draw_buffers_indexed, GL_EXT_draw_elements_base_vertex, 
    GL_EXT_frag_depth, GL_EXT_geometry_point_size, GL_EXT_geometry_shader, 
    GL_EXT_gpu_shader5, GL_EXT_map_buffer_range, GL_EXT_memory_object, 
    GL_EXT_memory_object_fd, GL_EXT_multi_draw_arrays, 
    GL_EXT_occlusion_query_boolean, GL_EXT_polygon_offset_clamp, 
    GL_EXT_primitive_bounding_box, GL_EXT_read_format_bgra, 
    GL_EXT_render_snorm, GL_EXT_robustness, GL_EXT_sRGB_write_control, 
    GL_EXT_semaphore, GL_EXT_semaphore_fd, GL_EXT_separate_shader_objects, 
    GL_EXT_shader_implicit_conversions, GL_EXT_shader_integer_mix, 
    GL_EXT_shader_io_blocks, GL_EXT_tessellation_point_size, 
    GL_EXT_tessellation_shader, GL_EXT_texture_border_clamp, 
    GL_EXT_texture_buffer, GL_EXT_texture_compression_bptc, 
    GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc, 
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map_array, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888, 
    GL_EXT_texture_norm16, GL_EXT_texture_rg, GL_EXT_texture_sRGB_R8, 
    GL_EXT_texture_sRGB_decode, GL_EXT_texture_type_2_10_10_10_REV, 
    GL_EXT_texture_view, GL_EXT_unpack_subimage, GL_EXT_window_rectangles, 
    GL_KHR_blend_equation_advanced, GL_KHR_context_flush_control, 
    GL_KHR_debug, GL_KHR_no_error, GL_KHR_robust_buffer_access_behavior, 
    GL_KHR_robustness, GL_KHR_texture_compression_astc_ldr, 
    GL_KHR_texture_compression_astc_sliced_3d, 
    GL_MESA_shader_integer_functions, GL_NV_draw_buffers, 
    GL_NV_fbo_color_attachments, GL_NV_image_formats, GL_NV_read_buffer, 
    GL_NV_read_depth, GL_NV_read_depth_stencil, GL_NV_read_stencil, 
    GL_OES_EGL_image, GL_OES_EGL_image_external, 
    GL_OES_EGL_image_external_essl3, GL_OES_EGL_sync, 
    GL_OES_compressed_ETC1_RGB8_texture, GL_OES_copy_image, GL_OES_depth24, 
    GL_OES_depth_texture, GL_OES_depth_texture_cube_map, 
    GL_OES_draw_buffers_indexed, GL_OES_draw_elements_base_vertex, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 
    GL_OES_geometry_point_size, GL_OES_geometry_shader, 
    GL_OES_get_program_binary, GL_OES_gpu_shader5, GL_OES_mapbuffer, 
    GL_OES_packed_depth_stencil, GL_OES_primitive_bounding_box, 
    GL_OES_required_internalformat, GL_OES_rgb8_rgba8, GL_OES_sample_shading, 
    GL_OES_sample_variables, GL_OES_shader_image_atomic, 
    GL_OES_shader_io_blocks, GL_OES_shader_multisample_interpolation, 
    GL_OES_standard_derivatives, GL_OES_stencil8, GL_OES_surfaceless_context, 
    GL_OES_tessellation_point_size, GL_OES_tessellation_shader, 
    GL_OES_texture_3D, GL_OES_texture_border_clamp, GL_OES_texture_buffer, 
    GL_OES_texture_cube_map_array, GL_OES_texture_float, 
    GL_OES_texture_float_linear, GL_OES_texture_half_float, 
    GL_OES_texture_half_float_linear, GL_OES_texture_npot, 
    GL_OES_texture_stencil8, GL_OES_texture_storage_multisample_2d_array, 
    GL_OES_texture_view, GL_OES_vertex_array_object, GL_OES_vertex_half_float, 
    GL_OES_viewport_array
This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

@welly_wu

I'm sorry I can't be of more help to you as I don't have an AMD card to test with. What I can say is that my software only puts a configuration file in place to use the external GPU, so it in itself has nothing to do with the performance issues you are having, which I think that you know.

Now, this is a users forum for hobbyists so there's little chance of having any of the developers taking a look at this, the question is where you should report this, because I don't think there are many people with this hardware around to actually test much of this. It's probably best to file a bug over at launchpad as a "amdgpu" problem, and either they'll take it upstream or tell you how to do so. Please keep us posted though, I am curious to see how it goes!

P.S. You are welcome to donate that RX Vega 64 card to me if you want me test it for you *wink wink* 🙂

This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@michael_watkins)
Active Member
Joined: 10 months ago
 

not working on 19.04 get repo error

Pending: 2018 Lenovo X1 Extreme / Razer Core v2 my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Michael Watkins

not working on 19.04 get repo error

Packages now published for 19.04 Disco Dingo!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


nu_ninja liked
ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 
Posted by: nu_ninja

I usually use glxheads or glxinfo to check what's doing the rendering.

I don't know what your setup is, but I use the DRI_PRIME=1 environment variable to accelerate the internal display or the gswitch script to accelerate external displays connected to the eGPU but not both at the same time.

So, do I add the DRI_PRIME=1 to my environment variable to accelerate the internal display? How do I do that in Ubuntu 18.04.2 64 bit LTS? I am concerned with the internal display as I am not going to plug in a desktop monitor. Should this solve the slow 3D graphics acceleration problem?

I think I figured it out:

https://askubuntu.com/questions/791022/how-to-configure-an-application-to-always-run-with-dri-prime-1-set-is-there-an

I set the DRI_PRIME=1 in my /etc/environment file and restarted, but when I use sudo gswitch egpu and reload, I get a login loop using lightdm. In other words, I can not load up GNOME 3.28 64 bit with DRI_PRIME=1 in my /etc/environment configuration file while using my eGPU.

Can someone give me shortcut links to figure out how to accelerate 3D graphics hardware performance for AMD GPUs in an eGPU? Thanks.

Is this article going to help?

1. https://www.reddit.com/r/linux_gaming/comments/9nuzf3/please_help_set_up_an_amd_egpu_on_linux/

2. https://www.phoronix.com/scan.php?page=news_item&px=Radeon-RX-590-Linux-Working

This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

If you are only using the internal display then you shouldn't use these scripts. Setting the DRI_PRIME variable as you have already done is the only thing you should do to make the internal screen as fast as possible

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

Can you elaborate on that in detail?

So, I should not be using Sebulon's script at all? Then, how do I switch to use my eGPU and still accelerate my laptop's screen? In other words, I want to be able to connect my AKiTiO Node using my AMD Radeon RX Vega 64 GPU and get the maximum 3D graphics hardware acceleration as possible. When I put the DRI_PRIME=1 in /etc/environment and restarted, I used Sebulon's gswitch and I kept getting a login loop error using lightdm. I'm new to eGPUs for GNU/Linux. Tell me what I need to know in step by step details please. Thanks.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

Yes once the prime variable is set you shouldn't have to do anything else to get the internal display working. I recommend reading on what prime offloading is doing if you want to get further into this

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

If I understand correctly regarding my mid-2018 Huawei Matebook X Pro laptop, it has an Intel 620 HD iGPU and nVidia MX150 2GB GDDR5 GPU. I installed the nVidia graphics driver version 418.56 64 bit. I can type in sudo prime-select intel or nvidia to choose which internal GPU and log out and log back in for the changes to take into effect. However, DRI_PRIME=1 forces 3D graphics acceleration and it can be saved in /etc/environment after restarting.

Here is where I am running into a problem. I choose the Intel iGPU and Sebulon's gswitch to select the eGPU. I have an AMD Radeon RX Vega 64 GPU inside my AKiTiO Node. When I set DRI_PRIME=1 in /etc/environment and I restart my laptop with the Intel Thunderbolt 3 cable plugged in, I can see my lightdm login screen, but it keeps giving me a login loop error and I can not load GNOME 3.28.2 64 bit. This is where I am stuck at until I recently removed the DRI_PRIME=1 from /etc/environment and restarted my laptop again. So, that modification to that configuration file no longer exists due to the problem that I just described.

What I am not clear about is what you previously said that I do not need scripts to get the internal display to work. Does that mean that I don't need Sebulon's gswitch software package? In other words, how do I get full 3D graphics hardware acceleration for my RX Vega 64 with the internal display?

I apologize for being obtuse, but this is new territory for me so please be patient and understanding. Thank you.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

Ok I can only speak for my own experience, your laptop might have other issues because of the nvidia mx150 but here's my exact process when using the egpu with the internal screen.

1. Boot without any scripts or modifications. The egpu is connected but not doing anything.
2. After logging in, run the command export DRI_PRIME=1 to get the egpu to do the 3D rendering work.

And that's all I do. I only use the gswitch script when I'm using an external display.

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

I just placed my Amazon order for a new Zotac nVidia Geforce GTX 1660Ti GPU. It should be delivered to my apartment today by 9:00 PM EDT. I double checked to ensure it is compatible with my AKiTiO Node and mid-2018 Huawei Matebook X Pro laptop running Ubuntu 18.04.2 64 bit LTS GNU/Linux. So, I install it and plug it in. Do I need to use sudo prime-select nvidia and log out and log in along with gswitch to switch to the eGPU in order to get it to work? Let me know what I need to know. Thanks.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

@welly_wu

Yes, that it correct. I have noticed (didn't even think of it before) that I have to be in "performance" mode (nvidia) for the switching to work. Once I tried switching to my eGPU from integrated and it only gave me a black screen, if my memory serves me right.

Good luck with it!

This post was modified 8 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
(@welly_wu)
Active Member
Joined: 9 months ago
 

I hosed my closed source and proprietary nVidia graphics driver and I reinstalled Ubuntu 18.04.2 64 bit LTS GNU/Linux on my mid-2018 Huawei Matebook X Pro laptop; I just finished a full installation, but I am still restoring some data at this time. Long story short, it just works. Sebulon's gswitch Ubuntu PPA and software packages just work with my AKiTiO Node via Intel Thunderbolt 3 and my new Zotac nVidia Geforce GTX 1660Ti GPU with Ubuntu 18.04.2 64 bit LTS GNU/Linux. I do have to use prime-select to choose the nVidia (performance mode) and log out and log in again before using gswitch egpu to use my AKiTiO Node and GTX 1660Ti, but it works reasonably well. Glxgears shows 3D graphics acceleration at around 30.00 FPS at 3000 X 2000 pixels. If I lower my screen resolution to 1920 X 1080P, then it should perform quite a bit faster overall, but I have not tested this yet. It was worth the pain in the ass to reinstall Ubuntu again. Once my data is restored, then I am going to play Spec Ops: The Line using my eGPU to test it at FHD resolution. In the meantime, I need to go to Starbucks to test and ensure that the modification to my /etc/hosts file is correct and I can get access to their Starbucks Google 802.11 public Wi-Fi and to connect to VPNSecure.Me at US #6 via UDP. Thank you all for your feedback.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

@welly_wu

Yikes, that difference, huh? That is such a shame, I would really like to ditch NVIDIA some day but it won't be any time soon, by the looks of it. True shame.

Super glad you finally got it working, though!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

Hey All!

So it happened one too many times that I had been gaming, turned the computer off, went to bed and in the morning put my laptop in the bag and went to work, just to find myself staring at a black screen upon arrival because I'd forgotten to switch back to internal before shutting it down... Well, no more!

I finally got so fed up at hacking my way back from the console (and popular demand) that I got around to solving the problem once and for all 🙂

"gswitch-0.2.0" now ships with a systemd service that automatically switches to your eGPU if it's plugged in and authorized at boot. If it cannot find the eGPU, it switches back to internal. Relief!

The service isn't enabled by default so if you want to start using it after the update, simply run:

systemctl enable gswitch

Huge thank you to @christopher_herrmann, @nu_ninja, @hertg and everybody else who is working on this!!!

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


nu_ninja liked
ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

Question:

After installing & setting everything up, can I just plug in the eGPU during my system is running and activate it with the command: sudo gswitch egpu (and re-login)? Or do I have to plug in the eGPU and after this I have to boot my computer?

Short: does this also work when the eGPU wasn't connected when the computer was started? 

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Liemaeu

Question:

After installing & setting everything up, can I just plug in the eGPU during my system is running and activate it with the command: sudo gswitch egpu (and re-login)? Or do I have to plug in the eGPU and after this I have to boot my computer?

Short: does this also work when the eGPU wasn't connected when the computer was started?

@liemaeu

I guess that depends on what laptop you're running, but in my case, no it does not for the moment, but your question intrigued me and got me thinking "why the heck shouldn't it, though?", so I started digging 🙂

Turns out all of the "nvidia" modules needs to be unloaded and loaded again for it to work, since the driver got loaded at boot and the eGPU wasn't there then, and as we all know, hardware is static and doesn't change, right 😉 I'll whip something up and release a new version once I've tested and feel comfortable with it. In the meantime, if you plug the eGPU in after you've booted, you have to stop X somehow, I dropped to a TTY and did "systemctl stop display-manager". After that you do:

for i in nvidia_uvm nvidia_drm nvidia_modeset nvidia; do modprobe -r $i; done
modprobe nvidia
systemctl start display-manager

That'll make it possible to switch without rebooting first. My plan is to integrate that in the "reloading" process of the script so it does that automatically for you. Or you can just reboot it 🙂

Thanks for the nudge man, appreciate it!

This post was modified 7 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


Liemaeu liked
ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

If we would find a way to load a driver without having the hardware (the eGPU) during the boot-process then we could have a real plug and play (hotplug) feature in Linux.

The open source driver can use DRI_PRIME=1 to run an application with the (e/d)GPU, without having to re-login. (I don't know if external screens would work too)

(But only with AMD GPUs, because the nouveau driver for Nvidia cards is nearly unusable. But using AMD cards for e.g. gaming with your laptops internal screen would be great enough, I think).

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Liemaeu

If we would find a way to load a driver without having the hardware (the eGPU) during the boot-process then we could have a real plug and play (hotplug) feature in Linux.

The open source driver can use DRI_PRIME=1 to run an application with the (e/d)GPU, without having to re-login. (I don't know if external screens would work too)

(But only with AMD GPUs, because the nouveau driver for Nvidia cards is nearly unusable. But using AMD cards for e.g. gaming with your laptops internal screen would be great enough, I think).

No, loading the driver without having the hardware would be pointless since it won't enumerate any card, and won't notice when you afterwards plug something in. Sorry, won't work. Also keep in mind that what I'm doing right now (switch without reboot) is a NVIDIA feature only, since I don't have a AMD card to test with.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

Okay :/
is it possible to run this commands when the display manager is still running?

for i in nvidia_uvm nvidia_drm nvidia_modeset nvidia; do modprobe -r $i; done
modprobe nvidia

And after this: systemctl restart display-manager

so you would only have to re-login once for enabling the eGPU.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Liemaeu

Okay :/
is it possible to run this commands when the display manager is still running?

for i in nvidia_uvm nvidia_drm nvidia_modeset nvidia; do modprobe -r $i; done
modprobe nvidia

And after this: systemctl restart display-manager

so you would only have to re-login once for enabling the eGPU.

Nope, because you cannot unload the driver while it's in use...

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

Fortunately, I bashed my head against this for a day and now there is an update!

gswitch 0.3 has support for switching to your eGPU even if it was plugged in after you booted! This only works for NVIDIA cards until someone donates a AMD card, or I buy one when my GTX 1060 starts feeling crufty 🙂

But man was this non-trivial, my head really started hurting after all that banging against the systemd brick wall. The challenge I had to face was that as soon as you tell display-manager to stop, systemd clobbers every little process related to it, including the rest of the script- just hard kill- boom! So none of the commands to reload the driver and start display-manager again never got executed, which isn't wrong by any stretch, it's very correct and diligent in doing so, it's just sooo not what I want in this case.

So I had to find a way to make the reloading part be fired off in the background, plus be detached from the parent process so it would continue doing it's thing. Now, there are plenty of ways to do this, if you run bash... But I'm a BSD person so I always try to find the most portable way. Plus, the default shell in Debian/Ubuntu is dash, so them bash tricks just weren't going to fly any way. After much head banging I finally got it going and it works beautifully! The only problem now is to remember to actually plug the eGPU in before switching... Yeah, that happened 🙂

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 

Hey again!

After getting the boot routine going and figuring out how to convert the hex numbers from 'lspci' to decimal, I figured I could spend some time on making a setup routine as well!

With 'gswitch 0.4', if you run 'sudo gswitch setup', it will present you with a 'lspci' list of GPU's and ask you to type in the hexadecimal BusID. After doing so, it automatically does the rest of converting it to decimal and tries to figure out which driver to use. It's not super clever, it assumes that if you've typed in a NVIDIA GPU, the driver will be 'nvidia' and when AMD it will type in 'amdgpu', so there's room for improvement there if it's needed. Bug reports, git issues etc. are most welcome, as always!

On that note, I noticed that changes to the xorg template file was being clobbered on updates. So if you'd typed in your BusID and changed the driver to 'amdgpu', or whatever, the next 'apt-get upgrade' would just rewrite it with what's in the package. I hadn't noticed simply because it's my eGPU in the template, haha! 🙂 And no one says anything!? After about 500 downloads, surely someone must've been bitten by it sometime or another... Well, suffer no more! I have now moved the template to '/usr/share/gswitch' and the only time '/etc/X11/xorg.conf.egpu' gets touched is when the setup is run. So, you know, you're welcome 🙂

Oh, and I may, sorta, kinda, possibly forgot a debugging flag in the script in the last version, which if I did, is fixed now, that I will neither confirm nor deny... 🙂

This post was modified 7 months ago

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


itsage liked
ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

Looks awesome! The setup function seems to be working for me. If you have the time, I think adding a setup/configure button to the GUI would make it even better.

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


itsage liked
ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: nu_ninja

Looks awesome! The setup function seems to be working for me. If you have the time, I think adding a setup/configure button to the GUI would make it even better.

Tiii-i-i-ime, is on my side, yes it is! 😉

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

Does it only work with an external screen, or does it also work with the internal screen of the laptop?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Sebulon
(@sebulon)
Trusted Member
Joined: 1 year ago
 
Posted by: Liemaeu

Does it only work with an external screen, or does it also work with the internal screen of the laptop?

Set in this way, the eGPU renders both the internal laptop screen and any other screens you may have connected.

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

Perfect 🙂

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

What is the best Thunderbolt 3 PCIe Box for Linux?
The Akitio Node? Or the Razer Core X?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
nu_ninja
(@nu_ninja)
Estimable Member
Joined: 2 years ago
 

@liemaeu

I have the Node and it works great in linux, but I believe the razer core X will work fine as well. It just comes down to what you need/want. The major difference being that the core X has a bigger PSU and should charge a TB3 laptop where the node will not.

Mid-2012 13" Macbook Pro (MacBookPro9,2) TB1 -> RX 460/560 (AKiTiO Node/Thunder2)
+ macOS 10.15+Win10 + Linux Mint 19.1


ReplyQuote
Liemaeu
(@liemaeu)
Active Member
Joined: 7 months ago
 

Thank you very much!
I read some reviews of the Akitio Node on Amazon, some user complained about the very loud fans.
How are your experiences with the Node?

Pending: Add my system information and expected eGPU configuration to my signature to give context to my posts


ReplyQuote
 of  4