I tried to run python3 script as follows :

$python3 quick_dump.py

...but every time I get output as :

ImportError: No module named '_chipset'

I just watched the quick_dump.py script imports and here they are :

#!/usr/bin/env python3

# register definition format:
# ('register name', 'register offset', 'register type')
# register types:
#  '' - normal register
#  'DPIO' - DPIO register
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

import argparse
import os
import sys
import ast
import subprocess
import chipset
import reg_access as reg

I tried the $python3 -> help() util to see if chipset module is available; I can see the chipset module presents in the list; So all should be fine but it is not :P btw I don't see _chipset module in the list so maybe this is the thing?

I watched the chipset.py script and here its code :

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.2
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
            fp, pathname, description = imp.find_module('_chipset', [dirname(__file__)])
        except ImportError:
            import _chipset
            return _chipset
        if fp is not None:
                _mod = imp.load_module('_chipset', fp, pathname, description)
            return _mod
    _chipset = swig_import_helper()
    del swig_import_helper
    import _chipset
del version_info
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0

def is_sandybridge(*args):
  return _chipset.is_sandybridge(*args)
is_sandybridge = _chipset.is_sandybridge

def is_ivybridge(*args):
  return _chipset.is_ivybridge(*args)
is_ivybridge = _chipset.is_ivybridge

def is_valleyview(*args):
  return _chipset.is_valleyview(*args)
is_valleyview = _chipset.is_valleyview

def is_cherryview(*args):
  return _chipset.is_cherryview(*args)
is_cherryview = _chipset.is_cherryview

def is_haswell(*args):
  return _chipset.is_haswell(*args)
is_haswell = _chipset.is_haswell

def is_broadwell(*args):
  return _chipset.is_broadwell(*args)
is_broadwell = _chipset.is_broadwell

def is_skylake(*args):
  return _chipset.is_skylake(*args)
is_skylake = _chipset.is_skylake

def intel_get_pci_device():
  return _chipset.intel_get_pci_device()
intel_get_pci_device = _chipset.intel_get_pci_device

def intel_register_access_init(*args):
  return _chipset.intel_register_access_init(*args)
intel_register_access_init = _chipset.intel_register_access_init

def intel_register_read(*args):
  return _chipset.intel_register_read(*args)
intel_register_read = _chipset.intel_register_read

def intel_register_write(*args):
  return _chipset.intel_register_write(*args)
intel_register_write = _chipset.intel_register_write

def intel_register_access_fini():
  return _chipset.intel_register_access_fini()
intel_register_access_fini = _chipset.intel_register_access_fini

def intel_register_access_needs_fakewake():
  return _chipset.intel_register_access_needs_fakewake()
intel_register_access_needs_fakewake = _chipset.intel_register_access_needs_fakewake

def pcidev_to_devid(*args):
  return _chipset.pcidev_to_devid(*args)
pcidev_to_devid = _chipset.pcidev_to_devid

def intel_dpio_reg_read(*args):
  return _chipset.intel_dpio_reg_read(*args)
intel_dpio_reg_read = _chipset.intel_dpio_reg_read

def intel_flisdsi_reg_read(*args):
  return _chipset.intel_flisdsi_reg_read(*args)
intel_flisdsi_reg_read = _chipset.intel_flisdsi_reg_read
# This file is compatible with both classic and new-style classes.

So my question is ... how to fix the error or is there a way of optimal workaround?


I tried to a) configure b) compile c) install the intel-gpu-tools sources with make util; so it seems to be installed now but still I cannot call quick_dump; I input "$sudo quick_dump" but I get "sudo: quick_dump: command not found" as an output :(

pls give me a tip what I am doing wrong?


  • Where did you get this script and what is it supposed to do? It seems to perform some hardware diagnostics. Is it some kind of programming task? – David Foerster Mar 27 '15 at 1:17
  • @DavidFoerster Thanks for your comment; No, it is not a programming task; You are right the script helps to debug the i915 kernel module cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/tools/…; The script generates so called "quick dump"; The thing is I have intel-gpu-tools installed but still I cannot run the quick_dump.py script because of the mentioned error :( – user390525 Mar 27 '15 at 16:09

_chipset is supposed to be a native module (see chipset.i in the same directory), that you need to build from source apparently.

Rough download and compilation instructions:

  1. Install git with the package manager and clone the repository:

    git clone git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
    cd intel-gpu-tools
  2. Install build tools (build-essential autoconf automake gcc), prerequisites (see last section of README) and run ./autogen.sh (which tells you about missing prerequisites).

  3. Build: make -C tools/quick_dump

  4. Install: sudo make -C tools/quick_dump install

I didn't try it myself, since it would be difficult to install i915 driver development files here.

  • You mean I have to download sources and compile? I am a bit confused how to download sources from cgit? – user390525 Mar 27 '15 at 16:52
  • I am a bit confused you mean cgit.freedesktop.org or "anongit.freedesktop.org" ? – user390525 Mar 27 '15 at 17:10
  • cgit is a web interface for Git repositories, anongit is the subdomain for plain anonymous Git access in this instance. They provide access to the same repositories through different protocols. – David Foerster Mar 27 '15 at 17:41
  • OK I'll try all your instructions and tell you my results – user390525 Mar 27 '15 at 19:28
  • I tried to a) configure b) compile c) install with make util; so it seems to be installed now but still I cannot call quick_dump; I input "$sudo quick_dump" but I get "sudo: quick_dump: command not found" as an output :( pls give me a tip what I am doing wrong? – user390525 Apr 13 '15 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.