Upgrading to Ubuntu 18.04 mouse jerking issues

Ausymark
Ausymark
Joined: 20 Nov 12
Posts: 5
Credit: 37952800
RAC: 0
Topic 214705

Hi Team

Not sure whats going on. Had Einstein working fine on my AMD RX480 with Ubuntu 17.10.

Yesterday I upgraded to the latest Ubuntu 18.04 and now when I have Einstein running the mouse will temporarily freeze for half a second and it repeats this every 3 to 5 seconds. Naturally this makes using the computer impossible lol.

I have disabled Einstein and the pc works as usual.

I have even downloaded the bleeding edge latest graphics system with the oibaf subsystems with no success.

The issue is occurring under both Wayland and X.

 

Any ideas?

 

Richie
Richie
Joined: 7 Mar 14
Posts: 656
Credit: 1702989778
RAC: 0

Hi! I don't have a solution,

Hi!

I don't have a solution, but I'm curious... what mouse exactly do you have there and what kind of port interface is it connected to (regular USB 2.0 ? ). Also... what motherboard brand and model?

archae86
archae86
Joined: 6 Dec 05
Posts: 3161
Credit: 7279341713
RAC: 1985763

I'm a Windows guy, so have no

I'm a Windows guy, so have no specifics, but the basics are that your system is not prioritizing some element of the mouse driving loop over the Einstein stuff.  You can either direct your system to run fewer Einstein tasks, or find knobs to turn which get the system to prioritize non-Einstein stuff higher relative to Einstein and task switch faster.

Reducing the number of Einstein tasks is easily performed using Computing Preferences for the location (aka venue) assigned to the machine.

On a Windows machine people use a third-party program to adjust CPU, memory, and I/O priority levels durably.  Surely there are Ubuntu means to these ends?

Like any other program Einstein uses what it gets.  It is up to the OS to take away the bowl of porridge when something more urgent needs it.

 

Rolf
Rolf
Joined: 7 Aug 17
Posts: 27
Credit: 135377187
RAC: 0

To me it sounds like you had

To me it sounds like you had OpenCL-capable graphics drivers installed and working on 17.10, then when upgrading to 18.04 Ubuntu replaced them with the default drivers. I don't think they are OpenCL-capable, at least I never got Ubuntu default drivers to work with Einstein GPU tasks. (I also have an AMD GPU, RX580.)

What happens then is that Einstein runs CPU tasks instead, which loads the CPU and memory bus more, to the point that the PC becomes irresponsive - possibly. If you didn't set a limit for Einstein CPU load.

Check first if Einstein/Boinc is running any GPU tasks. You can also check the log file in Boinc, it should mention the RX480 card in one of the first rows, if it finds it. If not it says "No usable GPUs found". Then install OpenCL-drivers - I don't know what works on 18.04. If the PC is still overloaded, reduce the CPU load percentage in Einstein settings.

Lots of guessing and assumptions from my part, hope you don't mind. I am in a similar situation now, since my Ubuntu install sneaked in a software upgrade of some packages and managed to redirect graphics and kernel so I'm on the default kernel and graphics again, no OpenCL.

To comment also on the balancing mechanism in linux/unix, it's called nice. Einstein tasks are already set to nice 19, which is very low priority. Normal tasks are nice 0, and high priority OS tasks (such as mouse and other input should be) is nice with negative values. But the nice system has some limits, it struggles to balance load when the CPU is extremely loaded, and especially if the memory bus is overloaded. So it will give CPU time to the mouse driver, but if the memory bus is overloaded it doesn't help, the CPU can't respond anyway. That is my experience. You can see the nice values of tasks with the top command.

Ausymark
Ausymark
Joined: 20 Nov 12
Posts: 5
Credit: 37952800
RAC: 0

Thanks for the ideas gang,

Thanks for the ideas gang, however all are basic solutions and some of the first things I looked into..

I am running the latest OpenCL stack/drivers on the GPU.

I am not only running the latest open source AMD/Mesa stack drivers from Ubuntu 18.04 but have gone one step over and installed the bleeding edge oibaf drivers to try and sort the issue.

https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

Boinc's log shows that it sees my GPU and lists its OpenCL attributes as well.

The pause of the mouse is also temporarily pausing the PC as well. Its more like a graphical 'glitch' that freezes the screen. The underlying subsystems hum along under the glitch with no issues.

I have an 8 core, 16 thread Ryzen CPU, even with it running 4 other boinc tasks it is no where near full capacity (about 35% utilisation in fact).

Suspending Einstein returns the PC to normal operation.

The PC ran this setup fluidly under Ubuntu 17.10

 

Rolf, to get openCL installed make sure you are running the latest mesa stack then run:

"sudo apt install mesa-opencl-icd"

You may need to reboot, once done you should have your opencl drivers ready to rock. This will enable you to run einstein ;)

Anyway, thx again, I am still open to suggestions.

byw/FYI my clinfo output is:
Number of platforms                               1
  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 18.2.0-devel
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.23.0, 4.15.0-20-generic, LLVM 6.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 18.2.0-devel
  Driver Version                                  18.2.0-devel
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               36
  Max clock frequency                             1342MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              64
  Preferred / native vector sizes                 
    char                                                16 / 16      
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              8587018240 (7.997GiB)
  Error Correction support                        No
  Max memory allocation                           6010912768 (5.598GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max number of constant args                     16
  Max constant buffer size                        2147483647 (2GiB)
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Clover
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [MESA]
  clCreateContext(NULL, ...) [default]            Success [MESA]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.23.0, 4.15.0-20-generic, LLVM 6.0.0)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.23.0, 4.15.0-20-generic, LLVM 6.0.0)
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Clover
    Device Name                                   AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.23.0, 4.15.0-20-generic, LLVM 6.0.0)

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1
 

Cheers

 

Mark

 

 

Rolf
Rolf
Joined: 7 Aug 17
Posts: 27
Credit: 135377187
RAC: 0

Hi Mark, coming back to this

Hi Mark,

coming back to this thread, I am happy someone takes the plunge and debugs 18.04 for us Ryzen+AMD GPU users. I will offer morale support, while holding back on 18.04 myself :-) Hope you sort this out and report back here.

The guys at ROCM seem to acknowledge that there are issues with Ubuntu graphics drivers "at full load". Mind you they support 16.04, but graphics drivers and kernel have been upgraded there too.

https://github.com/RadeonOpenCompute/ROCm (scroll down the page)

And there is this guy who is on a vendetta against irqbalance - I don't think it is related though. Please comment anyway, I have removed irqbalance but not seen any positive or negative effect.

https://github.com/konkor/cpufreq/issues/48

Furthermore, there is an issue with Ryzen and C-state 6, that can cause freezes. I don't think I have seen these, and changing the BIOS setting as recommended had no obvious effect. So not related to your problem I think, but please comment. Mentioned here:

https://www.reddit.com/r/Amd/comments/8gj125/asus_prime_x370pro_bios_4011_released/

 

Ausymark
Ausymark
Joined: 20 Nov 12
Posts: 5
Credit: 37952800
RAC: 0

I am following the ROCm site,

I am following the ROCm site, just waiting for a release for 18.04 which shouldnt be too far away. Thats what I am banking on anyway lol

 

Until then I just start einstein at home when I know I will be away from pc for several minutes so it can do some crunching while Im afk.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5874
Credit: 118444618388
RAC: 25899322

Are you sure your computer is

Are you sure your computer is actually doing something?

According to the computers list attached to the account under which you are posting, you have no computers that have been active in the last 30 days.  If your machine is working on Einstein tasks, it must be doing so using a different account.

Do you have multiple accounts?

 

Cheers,
Gary.

Ausymark
Ausymark
Joined: 20 Nov 12
Posts: 5
Credit: 37952800
RAC: 0

Hi Gary   I am running

Hi Gary

 

I am running under the Gridcoin group which may be messing up finding my computers. However my PC is doing work, still getting a GPU task uploaded every day or two.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5874
Credit: 118444618388
RAC: 25899322

I know nothing about Gridcoin

I know nothing about Gridcoin really, but my understanding was that you had to join their team.  This shouldn't prevent you from being able to 'see' your hosts on the website and examine hardware/OS details as well as lists of tasks and their completion status/details.

If you go to your account page on the website, can you see your computers listed there and can you browse host details and task lists, etc?  With an RX 480, you should be able to complete a task every 10 mins or less.  Something is drastically wrong if you are, "getting a GPU task uploaded every day or two".  Sounds like the GPU is not being used at all.  Can you look at your tasks list in BOINC Manager and tell us the name of the app doing the crunching?

 

Cheers,
Gary.

Ausymark
Ausymark
Joined: 20 Nov 12
Posts: 5
Credit: 37952800
RAC: 0

Hi Gary   The computer isnt

Hi Gary

 

The computer isnt running 24/7, and I am only activating Einstein when I am AFK from it - which isnt that often.

The PC is definitely running Einstein on the GPU. The application running is the "Gamma-ray pulsar binary search #1 on GPUs 1.18 (FPGPopencl1K-ati".

The account I am running under however is "grcpool.com" which is required to be set up this way to be part of the Gridcoin team. This effectively means that any work units I produce show up under their account ID.

However, the issue isnt that I am not completing GPU tasks, as I am, its more the temp halting of the video stream every few seconds.

It is most likely related to a vidio driver/openCL implementation. The annoying part is that I wasnt having this issue before the upgrade to Ubuntu 18.04, and, as far as I know, I am still running the latest drivers/openCL files as per previous version.

I am now daily updating to the new/pre-release versions of the graphics/OpenCL drivers (Which I installed to see if they would fix the issue) in the hope that a bug fix has been made.

Also note I am running other OpenCL Boinc projects that do not exhibit this pulse/freezing issue.

Hence the scratching of head......

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.