add_nvidia340.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- panda-0.2.orig/panda.py 2014-11-14 02:12:02.000000000 +0200
  2. +++ panda-0.2/panda.py 2014-11-14 02:20:47.921188120 +0200
  3. @@ -46,6 +46,10 @@
  4. "xorg-video-nvidia173",
  5. "nvidia-xconfig",
  6. "nvidia-settings"],
  7. + "nvidia340": ["module-nvidia340",
  8. + "xorg-video-nvidia340",
  9. + "nvidia-xconfig",
  10. + "nvidia-settings"],
  11. "nvidia304": ["module-nvidia304",
  12. "xorg-video-nvidia304",
  13. "nvidia-xconfig",
  14. @@ -53,6 +58,7 @@
  15. if util.get_platform() == "linux-x86_64":
  16. self.driver_packages["fglrx"].append("xorg-video-fglrx-32bit")
  17. self.driver_packages["nvidia-current"].append("xorg-video-nvidia-current-32bit")
  18. + self.driver_packages["nvidia340"].append("xorg-video-nvidia340-32bit")
  19. def __get_primary_driver(self):
  20. '''Get driver name for the working primary device'''
  21. @@ -124,7 +130,7 @@
  22. if self.driver_name == "fglrx":
  23. self.os_driver = "radeon"
  24. return self.os_driver
  25. - elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
  26. + elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304" ,"nvidia340"]:
  27. self.os_driver = "nouveau"
  28. return self.os_driver
  29. else:
  30. @@ -173,10 +179,10 @@
  31. status, modified = self.update_grub_default_entries(arg)
  32. if status in ["os", "generic", "vendor"] and modified:
  33. self.update_grub_cfg()
  34. - self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
  35. - if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
  36. + self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340", "fglrx"] and status == "vendor" else "mesa")
  37. + if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and status == "vendor":
  38. open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
  39. - elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
  40. + elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and os.path.isfile(nvidia_blacklist_file):
  41. os.remove(nvidia_blacklist_file)
  42. return status
  43. @@ -224,7 +230,7 @@
  44. if self.driver_name is None:
  45. self.__get_primary_driver()
  46. - if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
  47. + if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"]:
  48. return ["vendor", "os", "generic"]
  49. elif "Not defined" == self.driver_name:
  50. return ["os", "generic"]