Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Fixed some bumblebee bugs. More work is needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
karasu committed Jan 10, 2017
1 parent 8d65a2a commit 1f6844e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
26 changes: 9 additions & 17 deletions cnchi/hardware/modules/bumblebee.py_
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@ VENDOR_IDS = ["0x10de", "0x8086"]
DEVICES = ""
PRIORITY = 3

import i915
import nvidia


class Bumblebee(Hardware):
""" Bumblebee (Optimus cards) """
def __init__(self):
self.cards_detected = 0
Hardware.__init__(self, CLASS_NAME, CLASS_ID, VENDOR_IDS[0], DEVICES, PRIORITY)
Hardware.__init__(self, CLASS_NAME, CLASS_ID, VENDOR_IDS, DEVICES, PRIORITY)

def check_device(self, class_id, vendor_id, product_id):
""" Checks if the driver supports this device
Expand All @@ -67,6 +64,7 @@ class Bumblebee(Hardware):
return False

self.cards_detected = self.cards_detected + 1

if self.cards_detected >= 2:
return True
else:
Expand All @@ -75,30 +73,24 @@ class Bumblebee(Hardware):
@staticmethod
def get_packages():
""" Get all required packages """
pkgs = ["nvidia", "nvidia-utils", "nvidia-libgl", "libvdpau"]
pkgs = ["bumblebee", "mesa", "xf86-video-intel", "nvidia", "nvidia-settings", "bbswitch"]
if os.uname()[-1] == "x86_64":
pkgs.extend(["lib32-nvidia-libgl", "lib32-libvdpau"])
pkgs.extend(["lib32-nvidia-utils", "lib32-virtualgl", "lib32-mesa-libgl"])
return pkgs

@staticmethod
def get_conflicts():
""" Get conflicting packages """
pkgs = ["mesa-libgl"]
if os.uname()[-1] == "x86_64":
pkgs.append("lib32-mesa-libgl")
pkgs = ["mesa-libgl", "xf86-video-nouveau"]
#if os.uname()[-1] == "x86_64":
# pkgs.append("lib32-mesa-libgl")
return pkgs

@staticmethod
def post_install(dest_dir):
""" Post install commands """
path = os.path.join(dest_dir, "etc/X11/xorg.conf.d/20-nvidia.conf")
with open(path, 'w') as nvidia:
nvidia.write('Section "Device"\n')
nvidia.write(' Identifier "Nvidia Card"\n')
nvidia.write(' Driver "nvidia"\n')
nvidia.write(' VendorName "NVIDIA Corporation"\n')
nvidia.write(' Option "NoLogo" "true"\n')
nvidia.write('EndSection\n')
# Done in install.py
pass

@staticmethod
def is_proprietary():
Expand Down
2 changes: 1 addition & 1 deletion cnchi/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.14.223"
CNCHI_VERSION = "0.14.224"
CNCHI_WEBSITE = "http://www.antergos.com"
CNCHI_RELEASE_STAGE = "production"

Expand Down
3 changes: 3 additions & 0 deletions cnchi/installation/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,9 @@ def configure_system(self):
services.append(self.settings.get("desktop_manager"))
# In base we use systemd-networkd (setup already done above)
services.append(self.settings.get("network_manager"))
# If bumblebee (optimus cards) is installed, enable it
if os.path.exists(os.path.join(DEST_DIR, "usr/lib/systemd/system/bumblebeed.service")):
services.extend(["bumblebee"])

services.extend(["ModemManager", "haveged"])

Expand Down
1 change: 1 addition & 0 deletions data/packages.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
<pkgname>hplip</pkgname>
<pkgname lib='qt'>print-manager</pkgname>
<pkgname lib='gtk'>system-config-printer</pkgname>
<pkgname lib='gtk'>python2-gnomekeyring</pkgname>
<pkgname>splix</pkgname>
<!-- These two are required by hp-setup -->
<pkgname>python-pyqt5</pkgname>
Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.14.223","files":[
{"version":"0.14.224","files":[
]}

0 comments on commit 1f6844e

Please sign in to comment.