<p>You should be able to add your current user to the plugdev group in Linux to be able to access the GPU as a standard user.  This can be accomplished by the following command:</p>

<blockquote>
  <p>sudo usermod -G plugdev -a <code>whoami</code></p>
</blockquote>

<p>There may be some additional bits of information that are relevant in the <a href="http://ck.kolivas.org/apps/cgminer/README" rel="nofollow">README</a> on the cgminer website.</p>

CC BY-SA 3.0
2016-01-15T03:47:14.123Z
2016-01-15T03:47:14.123Z
Mark S.
<p>I'm not familiar with cgminer -- i hope to learn more about it this year -- but a wild guess would be that it tries to configure some device driver, and that needs root priviledges.</p>

<p>If you are worried about using the root user for mining, maybe you can add this device driver priviledge to a common user using sudo. </p>

CC BY-SA 3.0
2015-02-17T21:16:18.007Z
2015-02-17T21:16:18.007Z
hgfernan
<p>Again, I am not familiar with cgminer but when I attempted to use it, I ran it with <code>sudo cgminer --verbose -T</code> This should work.</p>

CC BY-SA 3.0
2015-06-18T06:50:14.003Z
2015-06-18T06:50:14.003Z
MagikCow
<p>I followed this tutorial <a href="https://litecoin.info/Debian_Linux_cryptocoin_mining_rig_setup_guide" rel="nofollow">https://litecoin.info/Debian_Linux_cryptocoin_mining_rig_setup_guide</a> and set up a Mining rig (Debian 6.0.10). Sometimes I modified it (downloaded later graphics drivers than in the Tutorial sugestet etc) but it works and I can mine on a pool.</p>

<p>But I can mine only if I log in as root. If I log in as a normal user and type <code>cgminer --verbose -T</code>, I get the following error:</p>

<pre><code> [2015-02-15 22:36:50] Started cgminer 3.7.2                    
 [2015-02-15 22:36:50] Loaded configuration file /home/martin/.cgminer/cgminer.conf                    
No protocol specified
No protocol specified
No protocol specified
 [2015-02-15 22:36:50] CL Platform 0 vendor: Advanced Micro Devices, Inc.                    
 [2015-02-15 22:36:50] CL Platform 0 name: AMD Accelerated Parallel Processing                    
 [2015-02-15 22:36:50] CL Platform 0 version: OpenCL 2.0 AMD-APP (1642.5)                    
 [2015-02-15 22:36:50] Error -1: Getting Device IDs (num)                    
 [2015-02-15 22:36:50] clDevicesNum returned error, no GPUs usable                    
 [2015-02-15 22:36:50] All devices disabled, cannot mine! 
</code></pre>

<p>I tried setting all privileges in the folders in root - which are used for litecoin mining - to 777 and to change the owner to the usual user, but it didn't work. I copied the file <code>/root/.cgminer/cgminer.conf</code> to <code>/home/user/.cgminer/cgminer.conf</code>, set the user and the right to this file, but this didn't solve the problem too. </p>

<p>But why can only root access the OpenCL functions which are used, why can not the normal user do so?</p>

<p>Thank you.</p>

<litecoin><miner-configuration>
Mining Litecoins as User in Debian
Martin
# Mining Litecoins as User in Debian

(Asked by: username_0 on 2015-02-15)

I followed this tutorial <https://litecoin.info/Debian_Linux_cryptocoin_mining_rig_setup_guide> and set up a Mining rig (Debian 6.0.10). Sometimes I modified it (downloaded later graphics drivers than in the Tutorial sugestet etc) but it works and I can mine on a pool.

But I can mine only if I log in as root. If I log in as a normal user and type `cgminer --verbose -T`, I get the following error:

```
 [2015-02-15 22:36:50] Started cgminer 3.7.2                    
 [2015-02-15 22:36:50] Loaded configuration file /home/username_0/.cgminer/cgminer.conf                    
No protocol specified
No protocol specified
No protocol specified
 [2015-02-15 22:36:50] CL Platform 0 vendor: Advanced Micro Devices, Inc.                    
 [2015-02-15 22:36:50] CL Platform 0 name: AMD Accelerated Parallel Processing                    
 [2015-02-15 22:36:50] CL Platform 0 version: OpenCL 2.0 AMD-APP (1642.5)                    
 [2015-02-15 22:36:50] Error -1: Getting Device IDs (num)                    
 [2015-02-15 22:36:50] clDevicesNum returned error, no GPUs usable                    
 [2015-02-15 22:36:50] All devices disabled, cannot mine! 

```

I tried setting all privileges in the folders in root - which are used for litecoin mining - to 777 and to change the owner to the usual user, but it didn't work. I copied the file `/root/.cgminer/cgminer.conf` to `/home/user/.cgminer/cgminer.conf`, set the user and the right to this file, but this didn't solve the problem too.

But why can only root access the OpenCL functions which are used, why can not the normal user do so?

Thank you.

**Tags:** litecoin, miner-configuration


---

## 3 answers

### Answer by username_1 on 2016-01-15. Score: 1

You should be able to add your current user to the plugdev group in Linux to be able to access the GPU as a standard user. This can be accomplished by the following command:

> sudo usermod -G plugdev -a `whoami`

There may be some additional bits of information that are relevant in the [README](http://ck.kolivas.org/apps/cgminer/README) on the cgminer website.


---

### Answer by username_2 on 2015-02-17. Score: -1

I'm not familiar with cgminer -- i hope to learn more about it this year -- but a wild guess would be that it tries to configure some device driver, and that needs root priviledges.

If you are worried about using the root user for mining, maybe you can add this device driver priviledge to a common user using sudo.


---

### Answer by username_3 on 2015-06-18. Score: -1

Again, I am not familiar with cgminer but when I attempted to use it, I ran it with `sudo cgminer --verbose -T` This should work.


---

