PRIMARY OBJECTIVE:
I. To compare the overall survival (OS) of nivolumab/ipilimumab/sargramostim (GM-CSF) versus nivolumab/ipilimumab.
SECONDARY OBJECTIVES:
I. To evaluate progression free survival (PFS) of patients treated with nivolumab/ipilimumab/GM-CSF versus nivolumab/ipilimumab.
II. To assess for differences in tolerability, specifically the rate of grade III or higher adverse events, between nivolumab/ipilimumab/GM-CSF versus nivolumab/ipilimumab.
III. To evaluate immune-related response rate (based on immune-related response criteria) and response rate (based on Response Evaluation Criteria in Solid Tumors \[RECIST\] criteria) and to compare them.
EXPLORATORY TOBACCO USE OBJECTIVES:
I. To determine the effects of tobacco, operationalized as combustible tobacco (1a), other forms of tobacco (1b), and environmental tobacco exposure (ETS) (1c) on provider-reported cancer-treatment toxicity (adverse events \[both clinical and hematologic\] and dose modifications).
II. To determine the effects of tobacco on patient-reported physical symptoms and psychological symptoms.
III. To examine quitting behaviors and behavioral counseling/support and cessation medication utilization.
IV. To explore the effect of tobacco use and exposure on treatment duration, relative dose intensity, and therapeutic benefit.
OUTLINE: Patients are randomized to 1 of 2 treatment arms.
ARM A: INDUCTION THERAPY: Patients receive nivolumab intravenously (IV) over 30 minutes on day 1 of each cycle, ipilimumab IV over 30 minutes on day 1 of each age, and sargramostim subcutaneously (SC) on days 1-14 of each cycle. Treatment repeats every 21 days for 4 cycles in the absence of disease progression or unacceptable toxicity.
MAINTENANCE THERAPY: Patients receive nivolumab and sargramostim as in induction therapy. Patients with partial response (PR), stable disease (SD), or complete response (CR) at 24 weeks may continue maintenance therapy for up to 2 years in the absence of disease progression or unacceptable toxicity. Patients undergo magnetic resonance imaging (MRI), computed tomography (CT) scan, and blood sample collection throughout the study. Patients may also undergo a multigated acquisition (MUGA) during screening, as well as an echocardiography (ECHO) throughout the trial as clinically indicated.
ARM B: INDUCTION THERAPY: Patients receive nivolumab and ipilimumab as in Arm I. Treatment repeats every 21 days for 4 cycles in the absence of disease progression or unacceptable toxicity.
MAINTENANCE THERAPY: Patients receive nivolumab as in induction therapy. Patients with PR, SD, or CR at 24 weeks may continue maintenance therapy for up to 2 years in the absence of disease progression or unacceptable toxicity. Patients undergo MRI, CT scan, and blood sample collection throughout the study. Patients may also undergo a MUGA during screening, as well as an ECHO throughout the trial as clinically indicated.
After completion of study treatment, patients are followed up every 3 months for 2 years and then every 6 months for 3 years.
Inclusion Criteria:
* All patients must be \>= 18 years of age
* Eastern Cooperative Oncology Group (ECOG) performance status: 0 or 1
* Patients must have known BRAF mutational status of tumor; wild-type (WT) or mutated, prior to randomization
* Patients must not be pregnant or breast-feeding due to use of cytotoxic immunotherapy and risk of teratogenic side effects; all patients of childbearing potential must have a blood test or urine study within 2 weeks prior to randomization to rule out pregnancy; a patient of childbearing potential is anyone, regardless of sexual orientation or whether they have undergone tubal ligation, who meets the following criteria: 1) has not undergone a hysterectomy or bilateral oophorectomy; or 2) has not been naturally postmenopausal for at least 24 consecutive months (i.e., has had menses at any time in the preceding 24 consecutive months)
* Patients must not conceive or father children by using accepted and effective method(s) of contraception or by abstaining from sexual intercourse from the time of study registration and continuing (for patients of child bearing potential) for at least 5 months after the last dose of protocol treatment; patients of childbearing potential must also not donate eggs during this same time period
* Patients must have unresectable stage III or stage IV melanoma according to American Joint Committee on Cancer (AJCC) version (v)7; patients must have histological or cytological confirmation of melanoma that is metastatic or unresectable and clearly progressive
* Patients must have measurable disease per RECIST 1.1 criteria; all sites of disease must be evaluated within 4 weeks prior to randomization
* Patients may have had prior systemic therapy in the adjuvant setting (e.g. interferon, BRAF, or MEK agents). Patients may have had prior anti-CTLA-4 in the adjuvant setting, if at least one year from last dose of treatment has passed prior to beginning treatment. Patients may have had any prior anti-PD-1 or anti-PD-L1 agent in the adjuvant setting, if at least one year from last dose of treatment has passed prior to beginning treatment
* Patients may not have had any prior ipilimumab and/or anti-PD-1/PD-L1 agent in the metastatic setting
* Patients must have discontinued chemotherapy, immunotherapy or other investigational agents used in the adjuvant setting \>= 4 weeks prior to randomization and recovered from adverse events due to those agents; mitomycin and nitrosoureas must have been discontinued at least 6 weeks prior to entering the study; patients must have discontinued radiation therapy \>= 2 weeks prior to entering the study and recovered from any adverse events associated with treatment; prior surgery must be \>= 4 weeks from randomization and patients must be fully recovered from post-surgical complications
* Patients must not receive any other investigational agents while on study or within four weeks prior to randomization
* Patient must not have received any live vaccine within 30 days prior to randomization, while participating in the study, and for 4 weeks (28 days) after the last dose of protocol treatment; live vaccines include, but are not limited to, the following: measles, mumps, rubella, chicken pox, yellow fever, rabies, bacillus Calmette-Guerin (BCG), and typhoid (oral) vaccine; patients are permitted to receive inactivated vaccines and any non-live vaccines including those for the seasonal influenza and coronavirus disease 19 (COVID-19) (Note: intranasal influenza vaccines, such as Flu-Mist (registered trademark) are live attenuated vaccines and are not allowed); if possible, it is recommended to separate study drug administration from vaccine administration by about a week (primarily, in order to minimize an overlap of adverse events)
* Patients are ineligible if they have any currently active central nervous system (CNS) metastases; patients who have treated brain metastases (with either surgical resection or stereotactic radiosurgery) that have been stable on head magnetic resonance imaging (MRI) or contrast computed tomography (CT) scan for at least 4 weeks following treatment and within 4 weeks prior to randomization are eligible; patients must not have taken any steroids =\< 14 days prior to randomization for the purpose of managing their brain metastases; patients with only whole brain irradiation for treatment of CNS metastases will be ineligible
* Patients must not have other current malignancies, other than basal cell skin cancer, squamous cell skin cancer, in situ cervical cancer, ductal or lobular carcinoma in situ of the breast; patients with other malignancies are eligible if they have been continuously disease-free for \> 3 years prior to the time of randomization
* White blood count \>= 3,000/uL (obtained within 4 weeks prior to randomization)
* Absolute neutrophil count (ANC) \>= 1,500/uL (obtained within 4 weeks prior to randomization)
* Platelet count \>= 100,000/uL (obtained within 4 weeks prior to randomization)
* Hemoglobin \>= 9 g/dL (obtained within 4 weeks prior to randomization)
* Serum creatinine =\< 1.5 x upper limit of normal (ULN) or serum creatinine clearance (CrCl) \>= 40 ml/min (obtained within 4 weeks prior to randomization)
* Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) =\< 3 x ULN (=\< 5 x ULN for patients with documented liver metastases) (obtained within 4 weeks prior to randomization)
* Alkaline phosphatase =\< 2 x ULN (=\< 5 x ULN for patients with known liver involvement and =\< 7 x ULN for patients with known bone involvement) (obtained within 4 weeks prior to randomization)
* Total bilirubin =\< 1.5 x ULN except patients with normal direct bilirubin; those patients with known Gilbert's syndrome must have total bilirubin \< 3 x ULN (obtained within 4 weeks prior to randomization)
* Serum lactate dehydrogenase (LDH) =\< 10 X ULN (obtained within 4 weeks prior to randomization)
* Patients must not have any serious or unstable pre-existing medical conditions (aside from malignancy exceptions specified above), including but not limited to, ongoing or active infection requiring parenteral antibiotics on day 1, history of bleeding diathesis or need for concurrent anticoagulation (international normalized ratio \[INR\] =\< 1.5 and partial thromboplastin time \[PTT\] within 1.1 x ULN), or psychiatric illness/social situations that would limit compliance with study requirements, interfere with patient's safety, or obtaining informed consent
* Patients with human immunodeficiency virus (HIV) infection are ineligible; due to the mechanism of action of ipilimumab and GM-CSF, activity and side effects in an immune compromised patient are unknown
* Patients with evidence of active hepatitis B virus (HBV) or hepatitis C virus (HCV) infection are not eligible; patients with cleared HBV and HCV (0 viral load) infection will be allowed
* Patients must not have autoimmune disorders or conditions of immunosuppression that require current ongoing treatment with systemic corticosteroids (or other systemic immunosuppressants), including oral steroids (e.g., prednisone, dexamethasone) or continuous use of topical steroid creams or ointments or ophthalmologic steroids; a history of occasional (but not continuous) use of steroid inhalers is allowed; replacement doses of steroids for patients with adrenal insufficiency are allowed; patients who discontinue use of these classes of medication for at least 2 weeks prior to randomization are eligible if, in the judgment of the treating physician investigator, the patient is not likely to require resumption of treatment with these classes of drugs during the study
* Exclusion from this study also includes patients with a history of symptomatic autoimmune disease (e.g., rheumatoid arthritis, systemic progressive sclerosis \[scleroderma\], systemic lupus erythematosus, Sjogren's syndrome, autoimmune vasculitis \[e.g., Wegener's granulomatosis\]); motor neuropathy considered of autoimmune origin (e.g., Guillain-Barre syndrome and myasthenia gravis); other CNS autoimmune disease (e.g., multiple sclerosis)
* Patients with autoimmune hypothyroid disease or type I diabetes on replacement treatment are eligible
* Patients must not have a history of inflammatory bowel disease or diverticulitis (history of diverticulosis is allowed)
* Patients must not have other significant medical, surgical, or psychiatric conditions or require any medication or treatment that in the opinion of the investigator may interfere with compliance, make the administration of the study drugs hazardous or obscure the interpretation of adverse events (AEs), such as a condition associated with frequent diarrhea; patients must not have an active infection requiring current treatment with parenteral antibiotics