Screen freezes when attempting changes in xrandr
As you said when you plug the monitor before booting it gives a bad resolution, I believe adding a particular resolution in .profile
would solve this issue.
Open the terminal and run the following command.
xrandr
Note the display device name from the output.In my case its eDP-1.
next run the following command
cvt 1920 1080
Copy the whole Modeline from the output.
In my case it is as follows
"1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync.
And run the following command:
sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
NOTE the command sections after --newmode
are copied from the output I got in the previous step.
Now add the newly created mode for your display device.
sudo xrandr --addmode eDP-1 "1920x1080_60.00"
Finally Apply the new resolution in the Display settings. Select the "1920x1080" resolution as your preferred resolution.
IMPORTANT: To make Ubuntu remember the new created screen resolution at next start, you have to edit your .profile
. Use any text editor, for example:
vim ~/.profile
add the last 2 commands to the end
Save and reboot. Hopefully the system will detect 1920x1080
resolution in both your displays.
Related videos on Youtube
sjlh
Updated on September 18, 2022Comments
-
sjlh over 1 year
I am trying to use my external LCD display (BenQ V2200 Eco Specs) with my laptop (hp from about HP Compaq 6910 p with Lubuntu 17.10 with the latest updates).
When plugging the display while using monitor settings the screen stays black, no signal. When plugging it before booting, it runs but with the wrong resolution.
I believe
xrandr
is set in order to extend the desktop over both the laptop screen and the external LCD display, but the actual resolution on the LCD is 3200x1080 instead of 1920x1080, so the desktop is cropped on the right. The problem is that if I attempt any changes in the settings inxrandr
orarandr
, the screens freeze and I need to do a hard reboot. This also happens if I make changes without the external display being plugged in.$ lspci | grep VGA 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV516/M64-S [Mobility Radeon X2300] $ lspci -nnk | grep -i vga -A3 | grep 'in use' Kernel driver in use: radeon
This is the output of xrandr (if I plug the display in the running computer; if I plug it before booting, current changes to 3200x1080):
$ xrandr Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192 VGA-0 connected primary (normal left inverted right x axis y axis) 1920x1080 60.00 + 1680x1050 59.95 1600x900 60.00 1280x1024 75.02 60.02 1280x960 60.00 1280x800 59.81 1152x864 75.00 1280x720 60.00 1024x768 75.03 60.00 1024x576 59.97 832x624 74.55 800x600 75.00 60.32 640x480 75.00 59.94 720x400 70.08 LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 304mm x 190mm 1280x800 60.00*+ 1280x720 59.97 1152x768 59.95 1024x768 59.95 800x600 59.96 848x480 59.94 720x480 59.94 640x480 59.94 S-video disconnected (normal left inverted right x axis y axis) DVI-0 disconnected (normal left inverted right x axis y axis)
-
Rooney over 6 yearsSo you want to use a particular resolution all the time ?
-
sjlh over 6 yearsThe only mode I can currently run is a resolution of 3200 x 1080 on the external lcd display, which has a native resolution of 1920 x 1080. So the displayed desktop is stretched beyond the screen boundary on the right. I want the resolution to be 1920 x 1080. The problem: if I make any (!) changes in xrandr, the screens freeze
-
Panther over 6 yearsAre you using wayland ? xrandr will not work with wayland.
-
-
Panther over 6 yearsNice work, but you do know xrandr will not work with wayland ? For wayland see askubuntu.com/questions/973499/…