Jump to content

  • Log In with Google      Sign In   
  • Create Account


polyfrag

Member Since 20 Mar 2003
Offline Last Active Today, 03:23 AM
-----

Posts I've Made

In Topic: Ubuntu SDL_GL_CreateContext failing

26 June 2014 - 03:07 PM

Found the problem. I don't have a discrete videocard at all.


In Topic: Ubuntu SDL_GL_CreateContext failing

26 June 2014 - 04:01 AM

Yes, it shows Intel Bearlake G33 under video driver.

http://www.dell.com/support/home/us/en/19/product-support/product/inspiron-530/drivers

In Topic: Ubuntu SDL_GL_CreateContext failing

26 June 2014 - 03:36 AM

Bumblebee daemon doesn't detect the discrete videocard. I searched around and that might mean I need to update my BIOS. I tried booting FreeDOS from USB and CD but it just freezes at the Dell screen when I try USB. My laptop boots it fine.

 

The exact error messages happens here:

 

https://github.com/Bumblebee-Project/Bumblebee/blob/master/src/bumblebeed.c

int main(int argc, char* argv[]) {

...

pci_bus_id_discrete = pci_find_gfx_by_vendor(PCI_VENDOR_ID_NVIDIA, 0);
  if (!pci_bus_id_discrete) {
    bb_log(LOG_ERR, "No discrete video card found, quitting\n");
    return (EXIT_FAILURE);
  }

That function is defined in:

 

https://github.com/Bumblebee-Project/Bumblebee/blob/master/src/pci.c

struct pci_bus_id *pci_find_gfx_by_vendor(unsigned int vendor_id, unsigned int idx) {
...

fp = fopen("/proc/bus/pci/devices", "r");
  if (!fp) {
    return NULL;
  }

  result = malloc(sizeof (struct pci_bus_id));
  if (!result) {
    return NULL;
  }

  while (fgets(buf, sizeof(buf) - 1, fp)) {
    if (sscanf(buf, "%x %x", &bus_id_numeric, &vendor_device) != 2) {
      continue;
    }
    /* VVVVDDDD becomes VVVV */
    if (vendor_device >> 0x10 == vendor_id) {
      if (pci_parse_bus_id(result, bus_id_numeric)) {
        int pci_class = pci_get_class(result);
        if (pci_class == PCI_CLASS_DISPLAY_VGA ||
                pci_class == PCI_CLASS_DISPLAY_3D) {
          /* yay, found device. Now get next, or clean up and return */
          if (idx--) {
            /* It's not yet our device */
            continue;
          }
          fclose(fp);
          return result;
        }
      }
    }
  }

https://github.com/Bumblebee-Project/Bumblebee/blob/master/src/pci.h

#define PCI_VENDOR_ID_NVIDIA  0x10de 
#define PCI_VENDOR_ID_INTEL  0x8086 
#define PCI_CLASS_DISPLAY_VGA 0x0300 
#define PCI_CLASS_DISPLAY_3D  0x0302

I checked that file /proc/bus/pci/devices

0000  808629c0  0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  agpgart-intel
0008  808629c1  28                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  pcieport
0010  808629c2  2c          fdf00000              ff01          d0000008          fd800000                 0                 0                 2             80000                 8          10000000            100000                 0                 0                 0  i915
00c8  808610c0  2b          fdfc0000          fdfff000              fe01                 0                 0                 0                 0             20000              1000                20                 0                 0                 0                 0  e1000e
00d0  80862937  10                 0                 0                 0                 0              fd01                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00d1  80862938  15                 0                 0                 0                 0              fc01                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00d2  80862939  13                 0                 0                 0                 0              fb01                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00d7  8086293c  12          fdffe000                 0                 0                 0                 0                 0                 0               400                 0                 0                 0                 0                 0                 0  ehci-pci
00d8  8086293e  2d          fdff4004                 0                 0                 0                 0                 0                 0              4000                 0                 0                 0                 0                 0                 0  snd_hda_intel
00e0  80862940  29                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  pcieport
00e3  80862946  2a                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  pcieport
00e8  80862934  17                 0                 0                 0                 0              fa01                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00e9  80862935  13                 0                 0                 0                 0              f901                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00ea  80862936  12                 0                 0                 0                 0              f801                 0                 0                 0                 0                 0                 0                20                 0                 0  uhci_hcd
00ef  8086293a  17          fdffd000                 0                 0                 0                 0                 0                 0               400                 0                 0                 0                 0                 0                 0  ehci-pci
00f0  8086244e  0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  
00f8  80862916  0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0                 0  lpc_ich
00fa  80862920  13              f701              f601              f501              f401              f301              f201                 0                 8                 4                 8                 4                10                10                 0  ata_piix
00fb  80862930  b          fdffc004                 0                 0                 0               501                 0                 0               100                 0                 0                 0                20                 0                 0  
00fd  80862926  13              f001              ef01              ee01              ed01              ec01              eb01                 0                 8                 4                 8                 4                10                10                 0  ata_piix
0300  10024d51  b          fdc00004                 0          fa00000c                 0                 0                 0                 0            100000                 0           2000000                 0                 0                 0                 0  

Like it says in the code, it looks for a line where the second hexadecimal number is less than 2159 (in decimals).

Does sscanf(buf, "%x %x", &bus_id_numeric, &vendor_device) read ints or unsigned ints? bus_id_numeric and vendor_device are unsigned int.

The hex 10024d51 is 268,586,321 decimal. The highest unsigned int is 4,294,967,295 and signed int 2,147,483,647. Hex number 80862926 is 2,156,276,006 decimal, which is 8,792,359 higher than signed int max.

But I am not sure if bumblebee is for my desktop. It says my GL_RENDERER is Intel G33 Express if I don't specify which OpenGL version I need, so I assume I have an integrated videocard in addition to NVidia. 

I tried installing the NVidia driver like so

sudo apt-get install nvidia-current

Following http://www.dedoimedo.com/computers/ubuntu-ringtail-nvidia.html

 

But

sudo /sbin/lsmod | grep nvidia

Didn't show anything. I then followed

sudo depmod -a
sudo modprobe nvidia_current

But it couldn't find nvidia_current. I then rebooted and my GUI wouldn't work so I had to remove the NVidia driver from command line mode by

sudo apt-get remove nvidia-*

In Topic: Ubuntu SDL_GL_CreateContext failing

25 June 2014 - 03:22 PM

I'm now optimizing for an older Inspiron 530 with an integrated videocard that only supports OpenGL 1.4. Really annoying. I'll look into bumblebee. If I install nvidia drivers, will that let me use the high-performance card?


In Topic: Why does this matrix multiplication order matter?

24 June 2014 - 01:23 AM

By the way, here's what the glitch looked like. Looks cool. Looks like it's polluted. I might try to mimic that effect for a certain map.

 

2014-06-22%2002-39-13.jpg

 

2014-06-22%2006-20-50.jpg

 

2014-06-22%2006-32-44.jpg


PARTNERS