linux. Part of the lcd display on my secondary monitor is broken. Can I set only part of…
- User
linux. Part of the lcd display on my secondary monitor is broken. Can I set only part of the disable as active and disable the broken parts? (Xorg) Display ID: DP-3 The lower left rectangle still works. I want to use the primary monitor normally
Assistant
Yes, you can configure your secondary monitor (Display ID: DP-3) to use only the working part (the lower left rectangle) while disabling the broken parts. This can be achieved by adjusting the display settings in your Xorg configuration. Here’s how you can do it:
Steps to Configure Partial Display Usage in Xorg:
-
Identify the Display Dimensions and Broken Area:
- Determine the resolution of your secondary monitor (e.g.,
1920x1080). - Identify the coordinates of the broken area and the working lower-left rectangle.
- Determine the resolution of your secondary monitor (e.g.,
-
Edit the Xorg Configuration File:
- Open the Xorg configuration file for editing. This file is usually located at
/etc/X11/xorg.confor in a specific directory like/etc/X11/xorg.conf.d/. If it doesn't exist, you can create a new file in/etc/X11/xorg.conf.d/.
sudo nano /etc/X11/xorg.conf.d/99-monitor-dp3.conf - Open the Xorg configuration file for editing. This file is usually located at
-
Add Configuration for DP-3:
- Add the following configuration to the file, adjusting the values according to your monitor's resolution and the working area.
Section "Device" Identifier "DP-3" Option "Primary" "false" # Ensure it's not the primary monitor SectionEnd Section "Screen" Identifier "ScreenDP3" Device "DP-3" SubSection "Display" Viewport 0 0 # Adjust these coordinates to match the working area Width 1024 # Example width of the working area Height 768 # Example height of the working area Virtual 1920 1080 # Full resolution of the monitor Depth 24 EndSubSection SectionEnd Section "Monitor" Identifier "DP-3" Option "PreferredMode" "1920x1080" # Original resolution Option "RightOf" "PrimaryMonitorName" # Adjust if needed Option "x" "1920" # Position relative to primary monitor Option "y" "0" SectionEnd- Adjust the
Viewport,Width, andHeight:Viewport 0 0: The starting point of the working area.WidthandHeight: The dimensions of the working lower-left rectangle.
-
Restart the Display Manager:
- After saving the configuration, restart your display manager or Xorg to apply the changes.
sudo systemctl restart display-manageror
sudo reboot -
Verify the Configuration:
- After restarting, check if the secondary monitor is using only the specified working area.
Alternative: Using
xrandr(Temporary Solution)If you prefer a temporary solution without modifying
xorg.conf, you can usexrandrto configure the display:xrandr --output DP-3 --mode 1024x768 --pos 0x0 --primary- Adjust
--modeto match the resolution of the working area. --pos 0x0sets the position of the secondary monitor relative to the primary.
Notes:
- Ensure the primary monitor remains unaffected by specifying the correct
Primaryoption or usingxrandrwith the--primaryflag for the primary monitor. - Test the configuration thoroughly to ensure it meets your needs.
This approach allows you to use the working part of the secondary monitor while keeping the primary monitor functioning normally.
-