diff --git a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm index 0b5c071e34be..3c043de02bff 100644 --- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm @@ -463,6 +463,7 @@ function getGfxAdapter(aSuffix = "") { subsysID: getGfxField("adapterSubsysID" + aSuffix, null), RAM: memoryMB, driver: getGfxField("adapterDriver" + aSuffix, null), + driverVendor: getGfxField("adapterDriverVendor" + aSuffix, null), driverVersion: getGfxField("adapterDriverVersion" + aSuffix, null), driverDate: getGfxField("adapterDriverDate" + aSuffix, null), }; @@ -1772,7 +1773,7 @@ EnvironmentCache.prototype = { features: {}, }; - if (!["android", "linux"].includes(AppConstants.platform)) { + if (AppConstants.platform !== "android") { let gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo); try { gfxData.monitors = gfxInfo.getMonitors(); diff --git a/toolkit/components/telemetry/docs/data/environment.rst b/toolkit/components/telemetry/docs/data/environment.rst index 03bd24fa817f..fefc1fb19aab 100644 --- a/toolkit/components/telemetry/docs/data/environment.rst +++ b/toolkit/components/telemetry/docs/data/environment.rst @@ -164,6 +164,7 @@ Structure: subsysID: , // null on failure RAM: , // in MB, null on failure driver: , // null on failure + driverVendor: , // null on failure driverVersion: , // null on failure driverDate: , // null on failure GPUActive: , // currently always true for the first adapter @@ -171,7 +172,7 @@ Structure: ... ], // Note: currently only added on Desktop. On Linux, only a single - // monitor is returned representing the entire virtual screen. + // monitor is returned for the primary screen. monitors: [ { screenWidth: , // screen width in pixels diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js index ac23d7bc5fcb..e61677f6bca1 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js @@ -506,6 +506,7 @@ function checkGfxAdapter(data) { subsysID: "string", RAM: "number", driver: "string", + driverVendor: "string", driverVersion: "string", driverDate: "string", GPUActive: "boolean", @@ -631,7 +632,7 @@ function checkSystemSection(data) { Assert.ok(gfxData.adapters[0].GPUActive, "The first GFX adapter must be active."); Assert.ok(Array.isArray(gfxData.monitors)); - if (gIsWindows || gIsMac) { + if (gIsWindows || gIsMac || gIsLinux) { Assert.ok(gfxData.monitors.length >= 1, "There is at least one monitor."); Assert.equal(typeof gfxData.monitors[0].screenWidth, "number"); Assert.equal(typeof gfxData.monitors[0].screenHeight, "number"); diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index baa631f16607..f10100c10729 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -507,6 +507,7 @@ var snapshotFormatters = { ["adapterDescription", "gpu-description"], ["adapterVendorID", "gpu-vendor-id"], ["adapterDeviceID", "gpu-device-id"], + ["driverVendor", "gpu-driver-vendor"], ["driverVersion", "gpu-driver-version"], ["driverDate", "gpu-driver-date"], ["adapterDrivers", "gpu-drivers"], diff --git a/toolkit/crashreporter/CrashAnnotations.yaml b/toolkit/crashreporter/CrashAnnotations.yaml index 7eb69591bd35..cb062a50957a 100644 --- a/toolkit/crashreporter/CrashAnnotations.yaml +++ b/toolkit/crashreporter/CrashAnnotations.yaml @@ -49,6 +49,11 @@ AdapterDeviceID: Graphics adapter name. type: string +AdapterDriverVendor: + description: > + Graphics adapter driver vendor. + type: string + AdapterDriverVersion: description: > Graphics adapter driver version. diff --git a/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl b/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl index 28fdd0ebdf2c..f55ac2650029 100644 --- a/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl +++ b/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl @@ -206,6 +206,7 @@ gpu-device-id = Device ID gpu-subsys-id = Subsys ID gpu-drivers = Drivers gpu-ram = RAM +gpu-driver-vendor = Driver Vendor gpu-driver-version = Driver Version gpu-driver-date = Driver Date gpu-active = Active diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index 228d6c03a8ea..2895dc77b688 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -443,6 +443,7 @@ var dataProviders = { adapterSubsysID: null, adapterRAM: null, adapterDriver: "adapterDrivers", + adapterDriverVendor: "driverVendor", adapterDriverVersion: "driverVersion", adapterDriverDate: "driverDate", @@ -452,6 +453,7 @@ var dataProviders = { adapterSubsysID2: null, adapterRAM2: null, adapterDriver2: "adapterDrivers2", + adapterDriverVendor2: "driverVendor2", adapterDriverVersion2: "driverVersion2", adapterDriverDate2: "driverDate2", isGPU2Active: null, diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index 92ea7f09dfee..063cd623778e 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -326,6 +326,9 @@ const SNAPSHOT_SCHEMA = { adapterDrivers: { type: "string", }, + driverVendor: { + type: "string", + }, driverVersion: { type: "string", }, @@ -350,6 +353,9 @@ const SNAPSHOT_SCHEMA = { adapterDrivers2: { type: "string", }, + driverVendor2: { + type: "string", + }, driverVersion2: { type: "string", }, diff --git a/widget/GfxInfoX11.cpp b/widget/GfxInfoX11.cpp index 9326a74e25f0..4198b163cd44 100644 --- a/widget/GfxInfoX11.cpp +++ b/widget/GfxInfoX11.cpp @@ -48,6 +48,8 @@ void GfxInfo::AddCrashReportAnnotations() { mVendorId); CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::AdapterDeviceID, mDeviceId); + CrashReporter::AnnotateCrashReport( + CrashReporter::Annotation::AdapterDriverVendor, mDriverVendor); CrashReporter::AnnotateCrashReport( CrashReporter::Annotation::AdapterDriverVersion, mDriverVersion); }