LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-04-2016, 10:21 AM   #1
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
How to get 3D acceleration working on Slackware VMs (VirtualBox 5.1.x)


Hello,

For thos who don't know, 3D acceleration on linux VMs is working when both conditions below are met :
  1. the VM is configured with 3D acceleration: Display > Acceleration > Enable 3D acceleration is checked.


  2. glxinfo output includes :

Code:
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
I always had trouble to get 3D acceleration working on Slackware VMs. As far as I remember, until VirtualBox 5, it was required to create the symlink below (source) for that :

Code:
$ mkdir -p /usr/lib/dri
$ cd /usr/lib/dri
$ ln -s /usr/lib/xorg/modules/dri/swrast_dri.so
But, this symlink is now of no help. 3D acceleration is not working:
Code:
$ glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)

Instead, to get 3D acceleration, (opengl) softwares can be started as below :

Code:
LD_PRELOAD=/usr/lib64/VBoxOGL.so <program_name>

Note: Some softwares will work (ex. dhewm3) while others will crash (ex. gzdoom).
Recently, I installed latest VirtualBox and created a Slackware-14.2 VM. After I installed the guest additions, I noticed the error message below on next boot :

Code:
/etc/rc.d/rc3.d/S10vboxadd: line 239: /etc/ld.so.conf.d/00vboxvideo.conf: No such file or directory
There's this thread about that. Creating only the directory /etc/ld.so.conf.d/ does not help. Indeed, on Slackware, /etc/ld.so.conf does not handle files in directory /etc/ld.so.conf.d/.

To fix that, simply add the line below at start of /etc/ld.so.conf :

Code:
include /etc/ld.so.conf.d/*.conf
After reboot, the 3D acceleration (should) work(s) :

Code:
$ glxinfo | grep -i opengl

OpenGL vendor string: Humper
OpenGL renderer string: Chromium

Hope this help some.

--
SeB

Last edited by phenixia2003; 11-04-2016 at 10:53 AM.
 
Old 11-05-2016, 09:40 AM   #2
sigkillall
LQ Newbie
 
Registered: Feb 2015
Distribution: Slackware64-14.2
Posts: 13

Rep: Reputation: Disabled
Nice! Works great.

Only problem I have is, after installing guest additions, resolution defaults to 1024x768 in the terminal and 1360x768 in Plasma instead of native 1366x768.

Thanks
 
Old 11-05-2016, 10:43 AM   #3
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by sigkillall View Post
Nice! Works great.

Only problem I have is, after installing guest additions, resolution defaults to 1024x768 in the terminal and 1360x768 in Plasma instead of native 1366x768.

Thanks
AFAIK, the terminal resolution cannot be set to fit the native resolution. In case of desktop managers (ie. kde, xfce,...), hit Right-Ctrl+F to enter/exit full screen mode. I guess this should solve your issue. Alternatively, xrandr should work.

Note: Full screen mode does not work with window managers like fluxbox, blackbox, and you have to use xrandr.

--
Seb
 
Old 11-05-2016, 03:52 PM   #4
sigkillall
LQ Newbie
 
Registered: Feb 2015
Distribution: Slackware64-14.2
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by phenixia2003 View Post
Hello,



AFAIK, the terminal resolution cannot be set to fit the native resolution. In case of desktop managers (ie. kde, xfce,...), hit Right-Ctrl+F to enter/exit full screen mode. I guess this should solve your issue. Alternatively, xrandr should work.

Note: Full screen mode does not work with window managers like fluxbox, blackbox, and you have to use xrandr.

--
Seb
The resolution needs to be set by VBoxManage. I will start an appropriate thread for this subject.
 
Old 11-07-2016, 10:36 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
I did all the things you suggested above and I still don't have 3d acceleration? I am a little confused though, is top suggestions obsolete, and all you need to do is create the missing directory and add the line to ld.so.conf? I am not totally clear on your directions.


DISREGARD: I must of missed something the first time. I just retried in a fresh VM and its working fine. Thanks for this info

Last edited by Daedra; 11-07-2016 at 11:19 PM.
 
Old 11-08-2016, 02:48 AM   #6
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by Daedra View Post
I did all the things you suggested above and I still don't have 3d acceleration? I am a little confused though, is top suggestions obsolete, and all you need to do is create the missing directory and add the line to ld.so.conf? I am not totally clear on your directions.


DISREGARD: I must of missed something the first time. I just retried in a fresh VM and its working fine. Thanks for this info
Maybe my 1st message is not as clear as I thought. Sorry for that.

To get 3D acceleration working on Slackware VMs with 3D acceleration enabled, you have to :
  1. Create directory /etc/ld.so.conf.d
  2. add the line below at start of /etc/ld.so.conf

    Code:
    include /etc/ld.so.conf.d/*.conf
  3. reboot.

3D acceleration is working when glxinfo output includes :

Code:
OpenGL vendor string: Humper
OpenGL renderer string: Chromium

--
SeB

Last edited by phenixia2003; 11-08-2016 at 04:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware -current :- Is hardware acceleration working or not on my machine? PrinceCruise Slackware 10 09-20-2014 05:07 AM
VirtualBox - teleport running VMs WarTurkey General 2 09-08-2014 06:40 PM
[SOLVED] Enabling 3D and hardware acceleration in GUEST VMs on LINUX HOST dobradude45 Linux - Virtualization and Cloud 1 06-22-2014 05:25 AM
LXer: How To Take Screenshots Of VirtualBox VMs LXer Syndicated Linux News 0 07-16-2012 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration