Ubuntu HowTo: How to install Kinect drivers?

Original Source Link

I have a Kinect v2 and I am trying to connect it to my laptop using libfreenect2.

Here is what I have done so far :

  1. Got the libfreenect2 project

    git clone https://github.com/OpenKinect/libfreenect2.git
  2. Installed needed dependencies

    sudo apt-get install build-essential libturbojpeg libjpeg-turbo8-dev libtool autoconf libudev-dev cmake mesa-common-dev freeglut3-dev libxrandr-dev doxygen libxi-dev automake
    cd libfreenect2/depends
    sh install_ubuntu.sh
    sudo apt-get install libglfw3-dev
  3. I have an Intel GPU, installed beignet-dev for OpenCL

    sudo apt-get install beignet-dev
  4. Build the executable

    mkdir build && cd build
    cmake ..
    sudo make install     

Everything successfully installed and the build was successful too.

  1. Launch the program

    sudo ./bin/Protonect              

The output does not display any error but the Viewer windows stay black :

[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 8 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @2:5 with serial 501696141942
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] opened
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] ReadData0x14 response
[Debug] [Freenect2DeviceImpl] 92 bytes of raw data
0x0000:  00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41    2e2e2e2e2e2e2e2e2e2e2e2e432e2e41
0x0010:  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e
0x0020:  0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00    2e2133552e2e2e202e2e2e2e2e2e2e2e
0x0030:  00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00    2e2e2e2e2e2e2e2e2e2e802e2e2e2e2e
0x0040:  31 33 00 00 00 04 0f 0d 47 4d 48 38 34 36 2e 31    31332e2e2e2e2e2e474d483834362e31
0x0050:  58 00 00 00 00 00 00 00 00 00 00 00                582e2e2e2e2e2e2e2e2e2e2e

[Debug] [Freenect2DeviceImpl] ReadStatus0x090000 response
[Debug] [Freenect2DeviceImpl] 4 bytes of raw data
0x0000:  00 22 00 00                                        2e222e2e

[Debug] [Freenect2DeviceImpl] ReadStatus0x090000 response
[Debug] [Freenect2DeviceImpl] 4 bytes of raw data
0x0000:  00 22 00 00                                        2e222e2e

[Info] [Freenect2DeviceImpl] enabling usb transfer submission...
[Info] [Freenect2DeviceImpl] submitting usb transfers...
[Info] [Freenect2DeviceImpl] started
device serial: 50**************
device firmware: 4.3.3912.0.7
[Info] [TurboJpegRgbPacketProcessor] avg. time: 18.4934ms -> ~54.0734Hz
[Info] [TurboJpegRgbPacketProcessor] avg. time: 19.4946ms -> ~51.2961Hz

Viewer :

kinect viewer

Additional informations :

The kinect is connected on a USB 3.0 (required) port and I am using Ubuntu 15.04.

What am I missing here ?

It’s best to report this issue on GitHub where we can track your progress.

Protonect uses OpenGL be default. What is your OpenGL version glxinfo | grep OpenGL? If the depth processor really running? To see if the depth processor is really running, look for [XXXDepthRgbPacketProcessor] avg. time log messages.

As you have installed OpenCL driver, you may also run ./Protonect cl.

Please follow up the issue on GitHub if you can.

Tagged : /

Ubuntu HowTo: Nvidia prime integrated GPU shown as llvmpipe (LLVM 6.0)

Original Source Link

My girlfriend just bought a Dell laptop with Ubuntu and updated to 18.04. But I saw that in Preferences > About shows the “graphics” as llvmpipe (LLVM 6.0, 256bits). “lspci -k” command shows that Nvidia MX150 is using “nouveau” driver and Intel UHD 620 “i915”. Ubuntu additional drivers shows that Nvidia-prime (opensource) is being used.

I uninstalled nouveau (it still was showing in the additional drivers but Nvidia-Prime disappeared, so I selected Nvidia 390 and when I reboot it was using Nvidia drivers and showing the correct card name (and the Nvidia driver in “lspci -k”, but when I select Intel in Nvidia-settings, after a long time and the app freezing, it tells me to reboot my computer and when I do it, changes back to llvmpipe and nouveau driver in lspci (I even uninstalled the f***ing driver).

The battery is dying with 2:30h (medium brightness and TLP configured) and it was supposed to last 4~5h, maybe it is related to screwed up drivers?
Thanks in advance, and sorry if I’m not being clear, English is not my native language

For me (only integrated graphics) helped setting i915.alpha_support=1. Try using instuction below:

  1. Run sudo nano /etc/default/grub (you may use whatever editor instead of nano)
  2. Add i915.alpha_support=1 nouveau.alpha_support=1 to the existing line GRUB_CMDLINE_LINUX_DEFAULT= after quiet splash.
  3. Run sudo update-grub
  4. Reboot

P.S. My backgound with this problem:

Initially I had a blackscreen after splash, so I had to add nomodeset (afterwards replaced to i915.modeset=0). Doing this I could boot the desktop, but it was rendered by LLVMpipe (software rendering using CPU capabilities).

Tagged : / / /

Ubuntu HowTo: XP Pen PenTablet driver installing issues on Ubuntu 16.04

Original Source Link

I’m new to Linux. I have been trying to install drivers for my XP Pen G640, because the tablet doesn’t work correctly with my current system (Ubuntu 16.04.05).

Now, they have provided a Beta version of their Linux driver that is said to be supported by Ubuntu (Heres the link). I have tried to install it using this method, but the terminal always returns with this,
Terminal Log

I have tried their instructions on how to install it from their site for Ubuntu 18.10 but that returns with “sudo: command not found”.

Now, I am really confused. How can I get the driver working?

Here’s the terminal output in text format – https://pastebin.com/p7pceZam

[email protected]:~/Downloads$ cd Linux_Pentablet_V1.2.3/
[email protected]:~/Downloads/Linux_Pentablet_V1.2.3$ sudo ./Pentablet_Driver.sh
[sudo] password for tasnim_tamim: 
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: �7: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ���-: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ��: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 1: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: ELF: not found
/home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: 2: /home/tasnim_tamim/Downloads/Linux_Pentablet_V1.2.3/./Pentablet_Driver: Syntax error: ")" unexpected
[email protected]:~/Downloads/Linux_Pentablet_V1.2.3$

This answer was originally posted by the author of this question, tasnim_tamim, as an edit to their question:


After 4 days of email exchange to the XP-Pen support team, I found out that it only support 64-bit PC’s. I on the another hand had 32-bit and as a result it gave out this error.

Issue was fixed by installing a 64 bit Linux Distribution. Used Ubuntu 16.04 x64 in this case and it worked flawlessly with no issues.

TL;DR – Driver only supports 64-bit OS, 32-bit will not work.

(Linux Mint – V19 / Hardware Acer Laptop, Travelmate / Pen-Tablet Display – xp-pen Artist 12)

I use the driver in V1.3.4….etc (Original package of xp-pen HP)

The Pen-Tablet Display works, but I need the driver that the pen fits with the screensize and Mouse.

Use the Terminal – /folder there the package is located

I use: chmod +x Linux_Pentablet_Driver_V1.3.4.sh
after that: sudo ./Linux_Pentablet_Driver……sh

Now you get a window from the driver to set-up it.

But, there is a problem: I have to activate the driver always new

Adding this because driver support is under active development: I just bought an XP-Pen Artist Pro 15.6. Linux beta driver works for me on opensuse, better than advertised even: Supports everything but tilt sensitivity. In other words, the buttons and dial all work. However, in its present incarnation, it runs as a script that requires root: Just unzip in its permanent location (I used /opt), change into the subdirectory it creates and make Pentablet_Driver.sh executable, then link to the script from your autostart settings (or use crontab if you don’t want to be pestered for root password). Tip: If you use KDE, you can create a window rule to “skip taskbar”, so when you minimize it, the window disappears (but to get it back, use the Alt+Tab task switcher).

EDIT: Thanks to korvox and of course spbnick, there’s a digimend fork with full suport for the xp-pen artist pro 15.6! However, you have to use commandline (xsetwacom) instead of a gui to map the buttons. The setup is a bit tricky, but I wrote a step-by-step guide here: https://forums.opensuse.org/showthread.php/537880-XP-Pen-Drawing-Tablet?p=2918114#post2918114

Here’s a little write up on how to get the PenTablet program / driver from XP-Pen to work in linux as autostart without root privileges.
I tested this on Ubuntu 18.04 with XP-Pen G640 tablet.

Download the latest driver from XP-Pen’s website, and unpack it in a folder on your system. I used /usr/share/xp-pen

If you start Pentablet.sh as normal user it will complain, that it needs root access. But really all it needs is access to /dev/uinput and the usb tablet device.

So create a new group, for example tablet and add your current user to that group, replace <user_name> with your user name.

sudo groupadd tablet
sudo adduser <user_name> tablet

Then create a new udev rule file in /etc/udev/rules.d, mine is called /etc/udev/rules.d/80-xp-pen.rules containing

SUBSYSTEM=="usb", ATTR{idVendor}=="28bd", ATTR{idProduct}=="0094", GROUP="tablet", MODE="0660"
KERNEL=="uinput", MODE="0660", GROUP="tablet", OPTIONS+="static_node=uinput"

The first line will grant read and write access to the usb tablet device to group tablet. You may need to adjust idVendor and or idProduct if you are using a different tablet than me. Just plug you tablet into USB and look through the output of dmesg for example to find your id’s.
The second line will grant access to /dev/uinput

Now reload your udev rules with

sudo udevadm control --reload-rules
sudo udevadm trigger

Double check that your user is in the tablet group by issuing this command


you should see the tablet group in this list. Otherwise log out or restart.

By now you should be able to start the Pentablet.sh without sudo. You can now add it to the autostart by opening


Click add, give it a name like “XP Pentablet” and as command /usr/share/xp-pen/Pentablet_Driver.sh or where ever you unpacked the driver files.

Congratulations, you should be done! And despite this long explanation it’s actually pretty fast to achieve.

One side note: Your /dev/uinput file is now accessible by any process running as your user account. That could make it easy for keyloggers or other malicious software to steal your passwords or else. If you want to make this more secure, you can do the following:

Remove your user from the tablet group again (google if you don’t know how).
Add the following line to your /etc/sudoers:

<user_name> ALL=(<user_name>:tablet) NOPASSWD: /usr/share/xp-pen/Pentablet_Driver.sh

This will allow your user to execute the following command without password, which executes the Pentablet.sh script with the group tablet:

sudo -g tablet /usr/share/xp-pen/Pentablet_Driver.sh

Now you can put that exact command in gnome-session-properties and you are done again. This time with a more secure version!

Tagged : / /

Ubuntu HowTo: Install the correct Nvidia driver version for NVIDIA CUDA Toolkit

Original Source Link

I have installed Ubuntu on, but now I am trying to install NVIDIA CUDA Toolkit for the GPU. When I install it, it says that there is no driver found, so I have tried to install the driver, but I don’t know why after installation, the system not coming up. Maybe it is because of the wrong version of the driver.

When I tried to detect the driver version using sudo lshw -C display , it showed this information:

enter image description here

But here it doesn’t say that what is the product name of the driver, and also when I go Software & Updates -> Additional Drivers, then it says NVIDIA Corporation: Unknown.

enter image description here

What should I do?

Sorry about posting this as an answer, I’m not able to post a comment to ask you this. Can you show the output of sudo lspci | grep -i nvidia? That might show what GPU it is.

edit: I don’t think this is a duplicate. the output of lshw would typically have the name of the GPU, which you could use to install the right driver. Here’s what it would usually look like:

       description: VGA compatible controller
       product: GK107GL [Quadro K420]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: [email protected]:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:49 memory:fa000000-faffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff

From the Software and Updater/Alternative Drivers tab:

  1. Click on the Nvidia binary driver (384.111, should say “tested”)
  2. Then click on the “Apply Change” button. Wait for the installation to finish.
  3. Reboot and use the command:

    lshw -c video

    to ensure the Nvidia driver is used (should say driver=nvidia).

    Login problems may result from a “nomodeset” left in the grub.cfg file — edit it out of the grub boot commands to successfully boot (type e, instructions at bottom of grub screen). Permanently fix grub by editing the /etc/default/grub file and remove the “nomodeset” wherever it appears. Leftover dot files (those beginning with a “.”) in your home directory may also cause login problems after installing the Nvidia drivers. These dot files are normally hidden in directory listings, but are shown when the -a is used for the ls command:

    ls -a

    Move them to a directory to save them and let them be recreated as needed.

    mkdir tmphold
    mv .Xauthority .cache .config .local tmphold

    Pull any pieces out of the saved copied if necessary. .Xauthority, .cache, .config and .local are the prime candidates for holding leftover configuration information.

Once the Nvidia drivers are installed and working, just install the cuda deb from the Intel site. Do check that your hardware is compatible with CUDA 9.1. You might need to use CUDA 8.0 which has lower requirements. Download the CUDA deb
Intel CUDA download page and the patches offered. Follow the instructions in step one, copied below:

`sudo dpkg -i cuda-repo-ubuntu1604-9-1-local_9.1.85-1_amd64.deb`
`sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub`
`sudo apt-get update`
`sudo apt-get install cuda`

The last step installs the cuda package(s) from the Ubuntu repositories.

Tagged : / / /

Ubuntu HowTo: How to get OpenCL working with AMD GPU on Ubuntu 18.04

Original Source Link

I have tried several attempts but without success. AMDGPU-PRO 17.40, 17.50, ROCm, Oibaf PPA, Kernel 4.16 and something more, but nothing makes OpenCL working with the AMD card and clinfo never gives right results.

Can I only wait the next AMDGPU-PRO driver compatible with Ubuntu 18.04 or could I do something different?

You can try to install their experimental driver from here:


Hope it works for you

I’m in the same boat – for completeness here is the thread I started.
@Mods, please consolidate if it makes sense to do so.

Intel/AMD Hybrid graphics Ubuntu 18.04

Tagged : / / /

Ubuntu HowTo: What is the content of mod_evasive Log File

Original Source Link

After the configuration of the mod_evasive. I found a log file there with the name of


and the content was in the file is


Could you please help me out what is this no. 15243?

After inspect the source files on https://github.com/jzdziarski/mod_evasive

The number inside the log file is the Process ID returned by the function getpid() which

returns the process ID (PID) of the calling process. (This is often
used by routines that generate unique temporary filenames.)

check this page for more details https://www.man7.org/linux/man-pages/man2/getpid.2.html

Tagged : / / / /

Ubuntu HowTo: Ubuntu 20.04 No wireless extensions

Original Source Link

I did a dual-boot with Ubuntu 20.04 and since i did it, i can only have internet with Ethernet.

So I searched some issues on internet but nothing that I found worked.


lspci -knn | grep Net -A3; rfkill list:

04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]
    Subsystem: AzureWave RTL8821CE 802.11ac PCIe Wireless Network Adapter [1a3b:3041]
    Kernel modules: 8821ce, rtl8821ce
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso [1002:15d8] (rev c2)
    Subsystem: ASUSTeK Computer Inc. Picasso [1043:18f1]
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no


br-6524119a49b6  no wireless extensions.

lo        no wireless extensions.

enp2s0    no wireless extensions.

docker0   no wireless extensions.

sudo modprobe rtl8821ce && dmesg | grep -i rtl:

modprobe: ERROR: could not insert 'rtl8821ce': Device or resource busy

lsmod | grep 8821 produced no output.

Tagged : / / /

Ubuntu HowTo: Wireless Authentication Problem [20.04]

Original Source Link

Wireless Authentication Problem on Ubuntu 20.04

Issue Description:

I am unable to connect to any wireless network, so far I have tested 3 networks on both 5, and 2.4GHz bands. Every test I have noticed that the connection will stop during the authentication phase, as Ubuntu is able to find and search the networks no problem. Only when it comes to authentication, it has issues.

Every time I attempt to login via gnome and the network manager gui, it asks for a password, attempts to connect, and then asks for a password again without any error message in the GUI.

Some information about my device:

  • OS: Ubuntu 20.04 (installed yesterday)
  • Laptop: ASUS TUF FX505D
  • Wireless Driver: RTL8822CE
  • wpa_supplicant version: v2.9

The drivers I have loaded for realtek are as follows (from lsmod | grep rtw)

rtwpci                 24576  0
rtw88                 610304  1 rtwpci
mac80211              843776  2 rtwpci,rtw88
cfg80211              704512  2 mac80211,rtw88

Some things I have tried:

  • Re-installed wpa_supplicant (sudo apt reinstall wpasupplicant)
  • Tried 3 different networks (varing between 2.4GHz, and 5GHz)
  • Attempted manual connection using wpa_supplicant (see below)

In order to get the log directly from wpa_supplicant, I used the following script to attempt to authenticate to my wireless network (SSID and PASSWORD are replaced with the actual SSID and Password of the network).

sudo systemctl stop NetworkManager.service
wpa_passphrase SSID PASSWORD > network.conf
sudo wpa_supplicant -Dnl80211 -iwlp4s0 -cnetwork.conf

From this, I get the following output:

Successfully initialized wpa_supplicant
wlp4s0: SME: Trying to authenticate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: Trying to associate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: SME: Deauth request to the driver failed
wlp4s0: Associated with f8:1d:0f:90:6f:c8
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=f8:1d:0f:90:6f:c8 reason=2
wlp4s0: SME: Trying to authenticate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: Trying to associate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: SME: Deauth request to the driver failed
wlp4s0: Associated with f8:1d:0f:90:6f:c8
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=f8:1d:0f:90:6f:c8 reason=2
wlp4s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="SSID" auth_failures=1 duration=10 reason=CONN_FAILED
wlp4s0: SME: Trying to authenticate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: Trying to associate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: SME: Deauth request to the driver failed
wlp4s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="SSID" auth_failures=2 duration=23 reason=CONN_FAILED
wlp4s0: Associated with f8:1d:0f:90:6f:c8
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=f8:1d:0f:90:6f:c8 reason=2
wlp4s0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="SSID" auth_failures=3 duration=46 reason=CONN_FAILED
wlp4s0: SME: Trying to authenticate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: Trying to associate with f8:1d:0f:90:6f:c8 (SSID='SSID' freq=2462 MHz)
wlp4s0: CTRL-EVENT-DISCONNECTED bssid=f8:1d:0f:90:6f:c8 reason=3 locally_generated=1
nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0

Other devices are able to connect to said wireless networks perfectly fine. This is a clean install of Ubuntu with very little on it. Any help would be much appreciated!

Tagged : / / / /

Ubuntu HowTo: Conflicting Wacom drivers?

Original Source Link

Sometimes when plugging in my Wacom tablet, it works great. Other times, even though it is responsive, it is unusably buggy.

I can detect which situation I am in by running the command

$ xsetwacom --list

If I get the output (id’s may change)

Wacom Intuos S Pad pad              id: 17  type: PAD       
Wacom Intuos S Pen stylus           id: 18  type: STYLUS    
Wacom Intuos S Pen eraser           id: 19  type: ERASER    
Wacom Intuos S Pen cursor           id: 20  type: CURSOR

then I know all is well. If instead I get

Wacom Co.,Ltd. Intuos S stylus      id: 17  type: STYLUS    
Wacom Co.,Ltd. Intuos S eraser      id: 18  type: ERASER  

then I am in trouble. Unplugging the device and plugging it back in never seems to help go from bad to good, but does go the other way. Rebooting the system sometimes – but not always – solves the problem.

Are there two conflicting drivers between which the OS chooses? How can I force it to make the right choice?

edit: output of lsusb ‘good situation’

Bus 001 Device 004: ID 056a:0374 Wacom Co., Ltd 

output of lsusb ‘bad situation’

Bus 001 Device 006: ID 2d1f:0374  

To expand on your discovery and meuh’s comment above, the tablet has two VID:PIDs. One for Android Mode, one for regular Linux mode. It is not ideal, but in order to switch in to the correct mode you need to hold down the buttons on both ends for a few seconds. More info here:


Tagged : / /